diff --git a/package.json b/package.json index cb2583c..539e5e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "rapida-nodejs", - "version": "1.0.11", + "name": "@rapidaai/nodejs", + "version": "1.0.12", "description": "Enable to interact with rapida platform", "main": "dist/index.cjs", "module": "dist/index.js", @@ -25,7 +25,7 @@ "keywords": [ "rapida" ], - "author": "Prashant Srivastav ", + "author": "Prashant Srivastav ", "bugs": { "url": "https://github.com/rapidaai/rapida-nodejs/issues" }, diff --git a/src/clients/protos/artifacts b/src/clients/protos/artifacts index c908da6..b9ec341 160000 --- a/src/clients/protos/artifacts +++ b/src/clients/protos/artifacts @@ -1 +1 @@ -Subproject commit c908da6e05edfe72d58d63006a2b07cf67719f06 +Subproject commit b9ec341c806484d58597193227009cb2a88d305d diff --git a/src/clients/protos/assistant-analysis.ts b/src/clients/protos/assistant-analysis.ts new file mode 100644 index 0000000..9fa3f7a --- /dev/null +++ b/src/clients/protos/assistant-analysis.ts @@ -0,0 +1,1477 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: assistant-analysis.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./common"; +import * as pb_1 from "google-protobuf"; +export namespace assistant_api { + export class AssistantAnalysis extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + description?: string; + endpointId?: string; + endpointVersion?: string; + endpointParameters?: Map; + assistantId?: string; + status?: string; + createdBy?: string; + createdUser?: dependency_2.User; + updatedBy?: string; + updatedUser?: dependency_2.User; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + executionPriority?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("endpointVersion" in data && data.endpointVersion != undefined) { + this.endpointVersion = data.endpointVersion; + } + if ("endpointParameters" in data && data.endpointParameters != undefined) { + this.endpointParameters = data.endpointParameters; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("createdUser" in data && data.createdUser != undefined) { + this.createdUser = data.createdUser; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("updatedUser" in data && data.updatedUser != undefined) { + this.updatedUser = data.updatedUser; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("executionPriority" in data && data.executionPriority != undefined) { + this.executionPriority = data.executionPriority; + } + } + if (!this.endpointParameters) + this.endpointParameters = new Map(); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 4, value); + } + get endpointVersion() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set endpointVersion(value: string) { + pb_1.Message.setField(this, 5, value); + } + get endpointParameters() { + return pb_1.Message.getField(this, 7) as any as Map; + } + set endpointParameters(value: Map) { + pb_1.Message.setField(this, 7, value as any); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 10, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 10, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 12, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 13, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 13, value); + } + get createdUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 14) as dependency_2.User; + } + set createdUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_createdUser() { + return pb_1.Message.getField(this, 14) != null; + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 15, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 15, value); + } + get updatedUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 16) as dependency_2.User; + } + set updatedUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 16, value); + } + get has_updatedUser() { + return pb_1.Message.getField(this, 16) != null; + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 17) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 17, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 17) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 18) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 18, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 18) != null; + } + get executionPriority() { + return pb_1.Message.getFieldWithDefault(this, 20, 0) as number; + } + set executionPriority(value: number) { + pb_1.Message.setField(this, 20, value); + } + static fromObject(data: { + id?: string; + name?: string; + description?: string; + endpointId?: string; + endpointVersion?: string; + endpointParameters?: { + [key: string]: string; + }; + assistantId?: string; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + executionPriority?: number; + }): AssistantAnalysis { + const message = new AssistantAnalysis({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.endpointVersion != null) { + message.endpointVersion = data.endpointVersion; + } + if (typeof data.endpointParameters == "object") { + message.endpointParameters = new Map(Object.entries(data.endpointParameters)); + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.createdUser != null) { + message.createdUser = dependency_2.User.fromObject(data.createdUser); + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.updatedUser != null) { + message.updatedUser = dependency_2.User.fromObject(data.updatedUser); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.executionPriority != null) { + message.executionPriority = data.executionPriority; + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + description?: string; + endpointId?: string; + endpointVersion?: string; + endpointParameters?: { + [key: string]: string; + }; + assistantId?: string; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + executionPriority?: number; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.endpointVersion != null) { + data.endpointVersion = this.endpointVersion; + } + if (this.endpointParameters != null) { + data.endpointParameters = (Object.fromEntries)(this.endpointParameters); + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.createdUser != null) { + data.createdUser = this.createdUser.toObject(); + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.updatedUser != null) { + data.updatedUser = this.updatedUser.toObject(); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.executionPriority != null) { + data.executionPriority = this.executionPriority; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.endpointId != "0") + writer.writeUint64String(4, this.endpointId); + if (this.endpointVersion.length) + writer.writeString(5, this.endpointVersion); + for (const [key, value] of this.endpointParameters) { + writer.writeMessage(7, this.endpointParameters, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (this.assistantId != "0") + writer.writeUint64String(10, this.assistantId); + if (this.status.length) + writer.writeString(12, this.status); + if (this.createdBy != "0") + writer.writeUint64String(13, this.createdBy); + if (this.has_createdUser) + writer.writeMessage(14, this.createdUser, () => this.createdUser.serialize(writer)); + if (this.updatedBy != "0") + writer.writeUint64String(15, this.updatedBy); + if (this.has_updatedUser) + writer.writeMessage(16, this.updatedUser, () => this.updatedUser.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(17, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(18, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.executionPriority != 0) + writer.writeUint32(20, this.executionPriority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantAnalysis { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantAnalysis(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.endpointId = reader.readUint64String(); + break; + case 5: + message.endpointVersion = reader.readString(); + break; + case 7: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.endpointParameters as any, reader, reader.readString, reader.readString)); + break; + case 10: + message.assistantId = reader.readUint64String(); + break; + case 12: + message.status = reader.readString(); + break; + case 13: + message.createdBy = reader.readUint64String(); + break; + case 14: + reader.readMessage(message.createdUser, () => message.createdUser = dependency_2.User.deserialize(reader)); + break; + case 15: + message.updatedBy = reader.readUint64String(); + break; + case 16: + reader.readMessage(message.updatedUser, () => message.updatedUser = dependency_2.User.deserialize(reader)); + break; + case 17: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 18: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 20: + message.executionPriority = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantAnalysis { + return AssistantAnalysis.deserialize(bytes); + } + } + export class CreateAssistantAnalysisRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + description?: string; + endpointId?: string; + endpointVersion?: string; + endpointParameters?: Map; + assistantId?: string; + executionPriority?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("endpointVersion" in data && data.endpointVersion != undefined) { + this.endpointVersion = data.endpointVersion; + } + if ("endpointParameters" in data && data.endpointParameters != undefined) { + this.endpointParameters = data.endpointParameters; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("executionPriority" in data && data.executionPriority != undefined) { + this.executionPriority = data.executionPriority; + } + } + if (!this.endpointParameters) + this.endpointParameters = new Map(); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 4, value); + } + get endpointVersion() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set endpointVersion(value: string) { + pb_1.Message.setField(this, 5, value); + } + get endpointParameters() { + return pb_1.Message.getField(this, 7) as any as Map; + } + set endpointParameters(value: Map) { + pb_1.Message.setField(this, 7, value as any); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 10, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 10, value); + } + get executionPriority() { + return pb_1.Message.getFieldWithDefault(this, 20, 0) as number; + } + set executionPriority(value: number) { + pb_1.Message.setField(this, 20, value); + } + static fromObject(data: { + name?: string; + description?: string; + endpointId?: string; + endpointVersion?: string; + endpointParameters?: { + [key: string]: string; + }; + assistantId?: string; + executionPriority?: number; + }): CreateAssistantAnalysisRequest { + const message = new CreateAssistantAnalysisRequest({}); + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.endpointVersion != null) { + message.endpointVersion = data.endpointVersion; + } + if (typeof data.endpointParameters == "object") { + message.endpointParameters = new Map(Object.entries(data.endpointParameters)); + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.executionPriority != null) { + message.executionPriority = data.executionPriority; + } + return message; + } + toObject() { + const data: { + name?: string; + description?: string; + endpointId?: string; + endpointVersion?: string; + endpointParameters?: { + [key: string]: string; + }; + assistantId?: string; + executionPriority?: number; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.endpointVersion != null) { + data.endpointVersion = this.endpointVersion; + } + if (this.endpointParameters != null) { + data.endpointParameters = (Object.fromEntries)(this.endpointParameters); + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.executionPriority != null) { + data.executionPriority = this.executionPriority; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.endpointId != "0") + writer.writeUint64String(4, this.endpointId); + if (this.endpointVersion.length) + writer.writeString(5, this.endpointVersion); + for (const [key, value] of this.endpointParameters) { + writer.writeMessage(7, this.endpointParameters, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (this.assistantId != "0") + writer.writeUint64String(10, this.assistantId); + if (this.executionPriority != 0) + writer.writeUint32(20, this.executionPriority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateAssistantAnalysisRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateAssistantAnalysisRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.endpointId = reader.readUint64String(); + break; + case 5: + message.endpointVersion = reader.readString(); + break; + case 7: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.endpointParameters as any, reader, reader.readString, reader.readString)); + break; + case 10: + message.assistantId = reader.readUint64String(); + break; + case 20: + message.executionPriority = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateAssistantAnalysisRequest { + return CreateAssistantAnalysisRequest.deserialize(bytes); + } + } + export class UpdateAssistantAnalysisRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + description?: string; + endpointId?: string; + endpointVersion?: string; + endpointParameters?: Map; + assistantId?: string; + executionPriority?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("endpointVersion" in data && data.endpointVersion != undefined) { + this.endpointVersion = data.endpointVersion; + } + if ("endpointParameters" in data && data.endpointParameters != undefined) { + this.endpointParameters = data.endpointParameters; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("executionPriority" in data && data.executionPriority != undefined) { + this.executionPriority = data.executionPriority; + } + } + if (!this.endpointParameters) + this.endpointParameters = new Map(); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 4, value); + } + get endpointVersion() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set endpointVersion(value: string) { + pb_1.Message.setField(this, 5, value); + } + get endpointParameters() { + return pb_1.Message.getField(this, 7) as any as Map; + } + set endpointParameters(value: Map) { + pb_1.Message.setField(this, 7, value as any); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 10, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 10, value); + } + get executionPriority() { + return pb_1.Message.getFieldWithDefault(this, 20, 0) as number; + } + set executionPriority(value: number) { + pb_1.Message.setField(this, 20, value); + } + static fromObject(data: { + id?: string; + name?: string; + description?: string; + endpointId?: string; + endpointVersion?: string; + endpointParameters?: { + [key: string]: string; + }; + assistantId?: string; + executionPriority?: number; + }): UpdateAssistantAnalysisRequest { + const message = new UpdateAssistantAnalysisRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.endpointVersion != null) { + message.endpointVersion = data.endpointVersion; + } + if (typeof data.endpointParameters == "object") { + message.endpointParameters = new Map(Object.entries(data.endpointParameters)); + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.executionPriority != null) { + message.executionPriority = data.executionPriority; + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + description?: string; + endpointId?: string; + endpointVersion?: string; + endpointParameters?: { + [key: string]: string; + }; + assistantId?: string; + executionPriority?: number; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.endpointVersion != null) { + data.endpointVersion = this.endpointVersion; + } + if (this.endpointParameters != null) { + data.endpointParameters = (Object.fromEntries)(this.endpointParameters); + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.executionPriority != null) { + data.executionPriority = this.executionPriority; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.endpointId != "0") + writer.writeUint64String(4, this.endpointId); + if (this.endpointVersion.length) + writer.writeString(5, this.endpointVersion); + for (const [key, value] of this.endpointParameters) { + writer.writeMessage(7, this.endpointParameters, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (this.assistantId != "0") + writer.writeUint64String(10, this.assistantId); + if (this.executionPriority != 0) + writer.writeUint32(20, this.executionPriority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateAssistantAnalysisRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateAssistantAnalysisRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.endpointId = reader.readUint64String(); + break; + case 5: + message.endpointVersion = reader.readString(); + break; + case 7: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.endpointParameters as any, reader, reader.readString, reader.readString)); + break; + case 10: + message.assistantId = reader.readUint64String(); + break; + case 20: + message.executionPriority = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateAssistantAnalysisRequest { + return UpdateAssistantAnalysisRequest.deserialize(bytes); + } + } + export class GetAssistantAnalysisRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: string; + assistantId?: string; + }): GetAssistantAnalysisRequest { + const message = new GetAssistantAnalysisRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantAnalysisRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantAnalysisRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantAnalysisRequest { + return GetAssistantAnalysisRequest.deserialize(bytes); + } + } + export class DeleteAssistantAnalysisRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: string; + assistantId?: string; + }): DeleteAssistantAnalysisRequest { + const message = new DeleteAssistantAnalysisRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeleteAssistantAnalysisRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteAssistantAnalysisRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DeleteAssistantAnalysisRequest { + return DeleteAssistantAnalysisRequest.deserialize(bytes); + } + } + export class GetAssistantAnalysisResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantAnalysis; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantAnalysis, 3) as AssistantAnalysis; + } + set data(value: AssistantAnalysis) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantAnalysisResponse { + const message = new GetAssistantAnalysisResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantAnalysis.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantAnalysisResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantAnalysisResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantAnalysis.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantAnalysisResponse { + return GetAssistantAnalysisResponse.deserialize(bytes); + } + } + export class GetAllAssistantAnalysisRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 2) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 2) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 3) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllAssistantAnalysisRequest { + const message = new GetAllAssistantAnalysisRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.has_paginate) + writer.writeMessage(2, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(3, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantAnalysisRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantAnalysisRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 3: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantAnalysisRequest { + return GetAllAssistantAnalysisRequest.deserialize(bytes); + } + } + export class GetAllAssistantAnalysisResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantAnalysis[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantAnalysis, 3) as AssistantAnalysis[]; + } + set data(value: AssistantAnalysis[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantAnalysisResponse { + const message = new GetAllAssistantAnalysisResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => AssistantAnalysis.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: AssistantAnalysis) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: AssistantAnalysis) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantAnalysisResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantAnalysisResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AssistantAnalysis.deserialize(reader), AssistantAnalysis)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantAnalysisResponse { + return GetAllAssistantAnalysisResponse.deserialize(bytes); + } + } +} diff --git a/src/clients/protos/assistant-analysis_grpc_pb.d.ts b/src/clients/protos/assistant-analysis_grpc_pb.d.ts deleted file mode 100644 index 51b4d69..0000000 --- a/src/clients/protos/assistant-analysis_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/src/clients/protos/assistant-analysis_pb.d.ts b/src/clients/protos/assistant-analysis_pb.d.ts deleted file mode 100644 index b2e9ece..0000000 --- a/src/clients/protos/assistant-analysis_pb.d.ts +++ /dev/null @@ -1,338 +0,0 @@ -// package: assistant_api -// file: assistant-analysis.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as common_pb from "./common_pb"; - -export class AssistantAnalysis extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - getEndpointid(): string; - setEndpointid(value: string): void; - - getEndpointversion(): string; - setEndpointversion(value: string): void; - - getEndpointparametersMap(): jspb.Map; - clearEndpointparametersMap(): void; - getAssistantid(): string; - setAssistantid(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - hasCreateduser(): boolean; - clearCreateduser(): void; - getCreateduser(): common_pb.User | undefined; - setCreateduser(value?: common_pb.User): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - hasUpdateduser(): boolean; - clearUpdateduser(): void; - getUpdateduser(): common_pb.User | undefined; - setUpdateduser(value?: common_pb.User): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getExecutionpriority(): number; - setExecutionpriority(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantAnalysis.AsObject; - static toObject(includeInstance: boolean, msg: AssistantAnalysis): AssistantAnalysis.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantAnalysis, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantAnalysis; - static deserializeBinaryFromReader(message: AssistantAnalysis, reader: jspb.BinaryReader): AssistantAnalysis; -} - -export namespace AssistantAnalysis { - export type AsObject = { - id: string, - name: string, - description: string, - endpointid: string, - endpointversion: string, - endpointparametersMap: Array<[string, string]>, - assistantid: string, - status: string, - createdby: string, - createduser?: common_pb.User.AsObject, - updatedby: string, - updateduser?: common_pb.User.AsObject, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - executionpriority: number, - } -} - -export class CreateAssistantAnalysisRequest extends jspb.Message { - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - getEndpointid(): string; - setEndpointid(value: string): void; - - getEndpointversion(): string; - setEndpointversion(value: string): void; - - getEndpointparametersMap(): jspb.Map; - clearEndpointparametersMap(): void; - getAssistantid(): string; - setAssistantid(value: string): void; - - getExecutionpriority(): number; - setExecutionpriority(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantAnalysisRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantAnalysisRequest): CreateAssistantAnalysisRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantAnalysisRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantAnalysisRequest; - static deserializeBinaryFromReader(message: CreateAssistantAnalysisRequest, reader: jspb.BinaryReader): CreateAssistantAnalysisRequest; -} - -export namespace CreateAssistantAnalysisRequest { - export type AsObject = { - name: string, - description: string, - endpointid: string, - endpointversion: string, - endpointparametersMap: Array<[string, string]>, - assistantid: string, - executionpriority: number, - } -} - -export class UpdateAssistantAnalysisRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - getEndpointid(): string; - setEndpointid(value: string): void; - - getEndpointversion(): string; - setEndpointversion(value: string): void; - - getEndpointparametersMap(): jspb.Map; - clearEndpointparametersMap(): void; - getAssistantid(): string; - setAssistantid(value: string): void; - - getExecutionpriority(): number; - setExecutionpriority(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateAssistantAnalysisRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateAssistantAnalysisRequest): UpdateAssistantAnalysisRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateAssistantAnalysisRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateAssistantAnalysisRequest; - static deserializeBinaryFromReader(message: UpdateAssistantAnalysisRequest, reader: jspb.BinaryReader): UpdateAssistantAnalysisRequest; -} - -export namespace UpdateAssistantAnalysisRequest { - export type AsObject = { - id: string, - name: string, - description: string, - endpointid: string, - endpointversion: string, - endpointparametersMap: Array<[string, string]>, - assistantid: string, - executionpriority: number, - } -} - -export class GetAssistantAnalysisRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantAnalysisRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantAnalysisRequest): GetAssistantAnalysisRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantAnalysisRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantAnalysisRequest; - static deserializeBinaryFromReader(message: GetAssistantAnalysisRequest, reader: jspb.BinaryReader): GetAssistantAnalysisRequest; -} - -export namespace GetAssistantAnalysisRequest { - export type AsObject = { - id: string, - assistantid: string, - } -} - -export class DeleteAssistantAnalysisRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteAssistantAnalysisRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeleteAssistantAnalysisRequest): DeleteAssistantAnalysisRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteAssistantAnalysisRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteAssistantAnalysisRequest; - static deserializeBinaryFromReader(message: DeleteAssistantAnalysisRequest, reader: jspb.BinaryReader): DeleteAssistantAnalysisRequest; -} - -export namespace DeleteAssistantAnalysisRequest { - export type AsObject = { - id: string, - assistantid: string, - } -} - -export class GetAssistantAnalysisResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantAnalysis | undefined; - setData(value?: AssistantAnalysis): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantAnalysisResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantAnalysisResponse): GetAssistantAnalysisResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantAnalysisResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantAnalysisResponse; - static deserializeBinaryFromReader(message: GetAssistantAnalysisResponse, reader: jspb.BinaryReader): GetAssistantAnalysisResponse; -} - -export namespace GetAssistantAnalysisResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantAnalysis.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAllAssistantAnalysisRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantAnalysisRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantAnalysisRequest): GetAllAssistantAnalysisRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantAnalysisRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantAnalysisRequest; - static deserializeBinaryFromReader(message: GetAllAssistantAnalysisRequest, reader: jspb.BinaryReader): GetAllAssistantAnalysisRequest; -} - -export namespace GetAllAssistantAnalysisRequest { - export type AsObject = { - assistantid: string, - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllAssistantAnalysisResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: AssistantAnalysis, index?: number): AssistantAnalysis; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantAnalysisResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantAnalysisResponse): GetAllAssistantAnalysisResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantAnalysisResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantAnalysisResponse; - static deserializeBinaryFromReader(message: GetAllAssistantAnalysisResponse, reader: jspb.BinaryReader): GetAllAssistantAnalysisResponse; -} - -export namespace GetAllAssistantAnalysisResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - diff --git a/src/clients/protos/assistant-api.ts b/src/clients/protos/assistant-api.ts new file mode 100644 index 0000000..b8be378 --- /dev/null +++ b/src/clients/protos/assistant-api.ts @@ -0,0 +1,4570 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: assistant-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./common"; +import * as dependency_3 from "./assistant-deployment"; +import * as dependency_4 from "./assistant-tool"; +import * as dependency_5 from "./assistant-analysis"; +import * as dependency_6 from "./assistant-webhook"; +import * as dependency_7 from "./assistant-knowledge"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace assistant_api { + export class Assistant extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + status?: string; + visibility?: string; + source?: string; + sourceIdentifier?: string; + assistantTools?: dependency_4.assistant_api.AssistantTool[]; + projectId?: string; + organizationId?: string; + assistantProviderModelId?: string; + assistantProviderModel?: AssistantProviderModel; + name?: string; + description?: string; + assistantTag?: dependency_2.Tag; + language?: string; + organization?: dependency_2.Organization; + createdBy?: string; + createdUser?: dependency_2.User; + updatedBy?: string; + updatedUser?: dependency_2.User; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + debuggerDeployment?: dependency_3.assistant_api.AssistantDebuggerDeployment; + phoneDeployment?: dependency_3.assistant_api.AssistantPhoneDeployment; + whatsappDeployment?: dependency_3.assistant_api.AssistantWhatsappDeployment; + webPluginDeployment?: dependency_3.assistant_api.AssistantWebpluginDeployment; + apiDeployment?: dependency_3.assistant_api.AssistantApiDeployment; + assistantConversations?: dependency_2.AssistantConversation[]; + assistantWebhooks?: dependency_6.assistant_api.AssistantWebhook[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6, 35, 36], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("visibility" in data && data.visibility != undefined) { + this.visibility = data.visibility; + } + if ("source" in data && data.source != undefined) { + this.source = data.source; + } + if ("sourceIdentifier" in data && data.sourceIdentifier != undefined) { + this.sourceIdentifier = data.sourceIdentifier; + } + if ("assistantTools" in data && data.assistantTools != undefined) { + this.assistantTools = data.assistantTools; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("assistantProviderModelId" in data && data.assistantProviderModelId != undefined) { + this.assistantProviderModelId = data.assistantProviderModelId; + } + if ("assistantProviderModel" in data && data.assistantProviderModel != undefined) { + this.assistantProviderModel = data.assistantProviderModel; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("assistantTag" in data && data.assistantTag != undefined) { + this.assistantTag = data.assistantTag; + } + if ("language" in data && data.language != undefined) { + this.language = data.language; + } + if ("organization" in data && data.organization != undefined) { + this.organization = data.organization; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("createdUser" in data && data.createdUser != undefined) { + this.createdUser = data.createdUser; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("updatedUser" in data && data.updatedUser != undefined) { + this.updatedUser = data.updatedUser; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("debuggerDeployment" in data && data.debuggerDeployment != undefined) { + this.debuggerDeployment = data.debuggerDeployment; + } + if ("phoneDeployment" in data && data.phoneDeployment != undefined) { + this.phoneDeployment = data.phoneDeployment; + } + if ("whatsappDeployment" in data && data.whatsappDeployment != undefined) { + this.whatsappDeployment = data.whatsappDeployment; + } + if ("webPluginDeployment" in data && data.webPluginDeployment != undefined) { + this.webPluginDeployment = data.webPluginDeployment; + } + if ("apiDeployment" in data && data.apiDeployment != undefined) { + this.apiDeployment = data.apiDeployment; + } + if ("assistantConversations" in data && data.assistantConversations != undefined) { + this.assistantConversations = data.assistantConversations; + } + if ("assistantWebhooks" in data && data.assistantWebhooks != undefined) { + this.assistantWebhooks = data.assistantWebhooks; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 2, value); + } + get visibility() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set visibility(value: string) { + pb_1.Message.setField(this, 3, value); + } + get source() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set source(value: string) { + pb_1.Message.setField(this, 4, value); + } + get sourceIdentifier() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set sourceIdentifier(value: string) { + pb_1.Message.setField(this, 5, value); + } + get assistantTools() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.assistant_api.AssistantTool, 6) as dependency_4.assistant_api.AssistantTool[]; + } + set assistantTools(value: dependency_4.assistant_api.AssistantTool[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 7, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 7, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 8, value); + } + get assistantProviderModelId() { + return pb_1.Message.getFieldWithDefault(this, 9, "0") as string; + } + set assistantProviderModelId(value: string) { + pb_1.Message.setField(this, 9, value); + } + get assistantProviderModel() { + return pb_1.Message.getWrapperField(this, AssistantProviderModel, 10) as AssistantProviderModel; + } + set assistantProviderModel(value: AssistantProviderModel) { + pb_1.Message.setWrapperField(this, 10, value); + } + get has_assistantProviderModel() { + return pb_1.Message.getField(this, 10) != null; + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 11, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 12, value); + } + get assistantTag() { + return pb_1.Message.getWrapperField(this, dependency_2.Tag, 14) as dependency_2.Tag; + } + set assistantTag(value: dependency_2.Tag) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_assistantTag() { + return pb_1.Message.getField(this, 14) != null; + } + get language() { + return pb_1.Message.getFieldWithDefault(this, 16, "") as string; + } + set language(value: string) { + pb_1.Message.setField(this, 16, value); + } + get organization() { + return pb_1.Message.getWrapperField(this, dependency_2.Organization, 17) as dependency_2.Organization; + } + set organization(value: dependency_2.Organization) { + pb_1.Message.setWrapperField(this, 17, value); + } + get has_organization() { + return pb_1.Message.getField(this, 17) != null; + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 22, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 22, value); + } + get createdUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 23) as dependency_2.User; + } + set createdUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 23, value); + } + get has_createdUser() { + return pb_1.Message.getField(this, 23) != null; + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 24, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 24, value); + } + get updatedUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 25) as dependency_2.User; + } + set updatedUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 25, value); + } + get has_updatedUser() { + return pb_1.Message.getField(this, 25) != null; + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + get debuggerDeployment() { + return pb_1.Message.getWrapperField(this, dependency_3.assistant_api.AssistantDebuggerDeployment, 30) as dependency_3.assistant_api.AssistantDebuggerDeployment; + } + set debuggerDeployment(value: dependency_3.assistant_api.AssistantDebuggerDeployment) { + pb_1.Message.setWrapperField(this, 30, value); + } + get has_debuggerDeployment() { + return pb_1.Message.getField(this, 30) != null; + } + get phoneDeployment() { + return pb_1.Message.getWrapperField(this, dependency_3.assistant_api.AssistantPhoneDeployment, 31) as dependency_3.assistant_api.AssistantPhoneDeployment; + } + set phoneDeployment(value: dependency_3.assistant_api.AssistantPhoneDeployment) { + pb_1.Message.setWrapperField(this, 31, value); + } + get has_phoneDeployment() { + return pb_1.Message.getField(this, 31) != null; + } + get whatsappDeployment() { + return pb_1.Message.getWrapperField(this, dependency_3.assistant_api.AssistantWhatsappDeployment, 32) as dependency_3.assistant_api.AssistantWhatsappDeployment; + } + set whatsappDeployment(value: dependency_3.assistant_api.AssistantWhatsappDeployment) { + pb_1.Message.setWrapperField(this, 32, value); + } + get has_whatsappDeployment() { + return pb_1.Message.getField(this, 32) != null; + } + get webPluginDeployment() { + return pb_1.Message.getWrapperField(this, dependency_3.assistant_api.AssistantWebpluginDeployment, 33) as dependency_3.assistant_api.AssistantWebpluginDeployment; + } + set webPluginDeployment(value: dependency_3.assistant_api.AssistantWebpluginDeployment) { + pb_1.Message.setWrapperField(this, 33, value); + } + get has_webPluginDeployment() { + return pb_1.Message.getField(this, 33) != null; + } + get apiDeployment() { + return pb_1.Message.getWrapperField(this, dependency_3.assistant_api.AssistantApiDeployment, 34) as dependency_3.assistant_api.AssistantApiDeployment; + } + set apiDeployment(value: dependency_3.assistant_api.AssistantApiDeployment) { + pb_1.Message.setWrapperField(this, 34, value); + } + get has_apiDeployment() { + return pb_1.Message.getField(this, 34) != null; + } + get assistantConversations() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.AssistantConversation, 35) as dependency_2.AssistantConversation[]; + } + set assistantConversations(value: dependency_2.AssistantConversation[]) { + pb_1.Message.setRepeatedWrapperField(this, 35, value); + } + get assistantWebhooks() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_6.assistant_api.AssistantWebhook, 36) as dependency_6.assistant_api.AssistantWebhook[]; + } + set assistantWebhooks(value: dependency_6.assistant_api.AssistantWebhook[]) { + pb_1.Message.setRepeatedWrapperField(this, 36, value); + } + static fromObject(data: { + id?: string; + status?: string; + visibility?: string; + source?: string; + sourceIdentifier?: string; + assistantTools?: ReturnType[]; + projectId?: string; + organizationId?: string; + assistantProviderModelId?: string; + assistantProviderModel?: ReturnType; + name?: string; + description?: string; + assistantTag?: ReturnType; + language?: string; + organization?: ReturnType; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + debuggerDeployment?: ReturnType; + phoneDeployment?: ReturnType; + whatsappDeployment?: ReturnType; + webPluginDeployment?: ReturnType; + apiDeployment?: ReturnType; + assistantConversations?: ReturnType[]; + assistantWebhooks?: ReturnType[]; + }): Assistant { + const message = new Assistant({}); + if (data.id != null) { + message.id = data.id; + } + if (data.status != null) { + message.status = data.status; + } + if (data.visibility != null) { + message.visibility = data.visibility; + } + if (data.source != null) { + message.source = data.source; + } + if (data.sourceIdentifier != null) { + message.sourceIdentifier = data.sourceIdentifier; + } + if (data.assistantTools != null) { + message.assistantTools = data.assistantTools.map(item => dependency_4.assistant_api.AssistantTool.fromObject(item)); + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.assistantProviderModelId != null) { + message.assistantProviderModelId = data.assistantProviderModelId; + } + if (data.assistantProviderModel != null) { + message.assistantProviderModel = AssistantProviderModel.fromObject(data.assistantProviderModel); + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.assistantTag != null) { + message.assistantTag = dependency_2.Tag.fromObject(data.assistantTag); + } + if (data.language != null) { + message.language = data.language; + } + if (data.organization != null) { + message.organization = dependency_2.Organization.fromObject(data.organization); + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.createdUser != null) { + message.createdUser = dependency_2.User.fromObject(data.createdUser); + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.updatedUser != null) { + message.updatedUser = dependency_2.User.fromObject(data.updatedUser); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.debuggerDeployment != null) { + message.debuggerDeployment = dependency_3.assistant_api.AssistantDebuggerDeployment.fromObject(data.debuggerDeployment); + } + if (data.phoneDeployment != null) { + message.phoneDeployment = dependency_3.assistant_api.AssistantPhoneDeployment.fromObject(data.phoneDeployment); + } + if (data.whatsappDeployment != null) { + message.whatsappDeployment = dependency_3.assistant_api.AssistantWhatsappDeployment.fromObject(data.whatsappDeployment); + } + if (data.webPluginDeployment != null) { + message.webPluginDeployment = dependency_3.assistant_api.AssistantWebpluginDeployment.fromObject(data.webPluginDeployment); + } + if (data.apiDeployment != null) { + message.apiDeployment = dependency_3.assistant_api.AssistantApiDeployment.fromObject(data.apiDeployment); + } + if (data.assistantConversations != null) { + message.assistantConversations = data.assistantConversations.map(item => dependency_2.AssistantConversation.fromObject(item)); + } + if (data.assistantWebhooks != null) { + message.assistantWebhooks = data.assistantWebhooks.map(item => dependency_6.assistant_api.AssistantWebhook.fromObject(item)); + } + return message; + } + toObject() { + const data: { + id?: string; + status?: string; + visibility?: string; + source?: string; + sourceIdentifier?: string; + assistantTools?: ReturnType[]; + projectId?: string; + organizationId?: string; + assistantProviderModelId?: string; + assistantProviderModel?: ReturnType; + name?: string; + description?: string; + assistantTag?: ReturnType; + language?: string; + organization?: ReturnType; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + debuggerDeployment?: ReturnType; + phoneDeployment?: ReturnType; + whatsappDeployment?: ReturnType; + webPluginDeployment?: ReturnType; + apiDeployment?: ReturnType; + assistantConversations?: ReturnType[]; + assistantWebhooks?: ReturnType[]; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.status != null) { + data.status = this.status; + } + if (this.visibility != null) { + data.visibility = this.visibility; + } + if (this.source != null) { + data.source = this.source; + } + if (this.sourceIdentifier != null) { + data.sourceIdentifier = this.sourceIdentifier; + } + if (this.assistantTools != null) { + data.assistantTools = this.assistantTools.map((item: dependency_4.assistant_api.AssistantTool) => item.toObject()); + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.assistantProviderModelId != null) { + data.assistantProviderModelId = this.assistantProviderModelId; + } + if (this.assistantProviderModel != null) { + data.assistantProviderModel = this.assistantProviderModel.toObject(); + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.assistantTag != null) { + data.assistantTag = this.assistantTag.toObject(); + } + if (this.language != null) { + data.language = this.language; + } + if (this.organization != null) { + data.organization = this.organization.toObject(); + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.createdUser != null) { + data.createdUser = this.createdUser.toObject(); + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.updatedUser != null) { + data.updatedUser = this.updatedUser.toObject(); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.debuggerDeployment != null) { + data.debuggerDeployment = this.debuggerDeployment.toObject(); + } + if (this.phoneDeployment != null) { + data.phoneDeployment = this.phoneDeployment.toObject(); + } + if (this.whatsappDeployment != null) { + data.whatsappDeployment = this.whatsappDeployment.toObject(); + } + if (this.webPluginDeployment != null) { + data.webPluginDeployment = this.webPluginDeployment.toObject(); + } + if (this.apiDeployment != null) { + data.apiDeployment = this.apiDeployment.toObject(); + } + if (this.assistantConversations != null) { + data.assistantConversations = this.assistantConversations.map((item: dependency_2.AssistantConversation) => item.toObject()); + } + if (this.assistantWebhooks != null) { + data.assistantWebhooks = this.assistantWebhooks.map((item: dependency_6.assistant_api.AssistantWebhook) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.status.length) + writer.writeString(2, this.status); + if (this.visibility.length) + writer.writeString(3, this.visibility); + if (this.source.length) + writer.writeString(4, this.source); + if (this.sourceIdentifier != "0") + writer.writeUint64String(5, this.sourceIdentifier); + if (this.assistantTools.length) + writer.writeRepeatedMessage(6, this.assistantTools, (item: dependency_4.assistant_api.AssistantTool) => item.serialize(writer)); + if (this.projectId != "0") + writer.writeUint64String(7, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(8, this.organizationId); + if (this.assistantProviderModelId != "0") + writer.writeUint64String(9, this.assistantProviderModelId); + if (this.has_assistantProviderModel) + writer.writeMessage(10, this.assistantProviderModel, () => this.assistantProviderModel.serialize(writer)); + if (this.name.length) + writer.writeString(11, this.name); + if (this.description.length) + writer.writeString(12, this.description); + if (this.has_assistantTag) + writer.writeMessage(14, this.assistantTag, () => this.assistantTag.serialize(writer)); + if (this.language.length) + writer.writeString(16, this.language); + if (this.has_organization) + writer.writeMessage(17, this.organization, () => this.organization.serialize(writer)); + if (this.createdBy != "0") + writer.writeUint64String(22, this.createdBy); + if (this.has_createdUser) + writer.writeMessage(23, this.createdUser, () => this.createdUser.serialize(writer)); + if (this.updatedBy != "0") + writer.writeUint64String(24, this.updatedBy); + if (this.has_updatedUser) + writer.writeMessage(25, this.updatedUser, () => this.updatedUser.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.has_debuggerDeployment) + writer.writeMessage(30, this.debuggerDeployment, () => this.debuggerDeployment.serialize(writer)); + if (this.has_phoneDeployment) + writer.writeMessage(31, this.phoneDeployment, () => this.phoneDeployment.serialize(writer)); + if (this.has_whatsappDeployment) + writer.writeMessage(32, this.whatsappDeployment, () => this.whatsappDeployment.serialize(writer)); + if (this.has_webPluginDeployment) + writer.writeMessage(33, this.webPluginDeployment, () => this.webPluginDeployment.serialize(writer)); + if (this.has_apiDeployment) + writer.writeMessage(34, this.apiDeployment, () => this.apiDeployment.serialize(writer)); + if (this.assistantConversations.length) + writer.writeRepeatedMessage(35, this.assistantConversations, (item: dependency_2.AssistantConversation) => item.serialize(writer)); + if (this.assistantWebhooks.length) + writer.writeRepeatedMessage(36, this.assistantWebhooks, (item: dependency_6.assistant_api.AssistantWebhook) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Assistant { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Assistant(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.status = reader.readString(); + break; + case 3: + message.visibility = reader.readString(); + break; + case 4: + message.source = reader.readString(); + break; + case 5: + message.sourceIdentifier = reader.readUint64String(); + break; + case 6: + reader.readMessage(message.assistantTools, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_4.assistant_api.AssistantTool.deserialize(reader), dependency_4.assistant_api.AssistantTool)); + break; + case 7: + message.projectId = reader.readUint64String(); + break; + case 8: + message.organizationId = reader.readUint64String(); + break; + case 9: + message.assistantProviderModelId = reader.readUint64String(); + break; + case 10: + reader.readMessage(message.assistantProviderModel, () => message.assistantProviderModel = AssistantProviderModel.deserialize(reader)); + break; + case 11: + message.name = reader.readString(); + break; + case 12: + message.description = reader.readString(); + break; + case 14: + reader.readMessage(message.assistantTag, () => message.assistantTag = dependency_2.Tag.deserialize(reader)); + break; + case 16: + message.language = reader.readString(); + break; + case 17: + reader.readMessage(message.organization, () => message.organization = dependency_2.Organization.deserialize(reader)); + break; + case 22: + message.createdBy = reader.readUint64String(); + break; + case 23: + reader.readMessage(message.createdUser, () => message.createdUser = dependency_2.User.deserialize(reader)); + break; + case 24: + message.updatedBy = reader.readUint64String(); + break; + case 25: + reader.readMessage(message.updatedUser, () => message.updatedUser = dependency_2.User.deserialize(reader)); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 30: + reader.readMessage(message.debuggerDeployment, () => message.debuggerDeployment = dependency_3.assistant_api.AssistantDebuggerDeployment.deserialize(reader)); + break; + case 31: + reader.readMessage(message.phoneDeployment, () => message.phoneDeployment = dependency_3.assistant_api.AssistantPhoneDeployment.deserialize(reader)); + break; + case 32: + reader.readMessage(message.whatsappDeployment, () => message.whatsappDeployment = dependency_3.assistant_api.AssistantWhatsappDeployment.deserialize(reader)); + break; + case 33: + reader.readMessage(message.webPluginDeployment, () => message.webPluginDeployment = dependency_3.assistant_api.AssistantWebpluginDeployment.deserialize(reader)); + break; + case 34: + reader.readMessage(message.apiDeployment, () => message.apiDeployment = dependency_3.assistant_api.AssistantApiDeployment.deserialize(reader)); + break; + case 35: + reader.readMessage(message.assistantConversations, () => pb_1.Message.addToRepeatedWrapperField(message, 35, dependency_2.AssistantConversation.deserialize(reader), dependency_2.AssistantConversation)); + break; + case 36: + reader.readMessage(message.assistantWebhooks, () => pb_1.Message.addToRepeatedWrapperField(message, 36, dependency_6.assistant_api.AssistantWebhook.deserialize(reader), dependency_6.assistant_api.AssistantWebhook)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Assistant { + return Assistant.deserialize(bytes); + } + } + export class AssistantProviderModel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + template?: dependency_2.TextChatCompletePrompt; + description?: string; + modelProviderId?: string; + modelProviderName?: string; + assistantModelOptions?: dependency_2.Metadata[]; + status?: string; + createdBy?: string; + createdUser?: dependency_2.User; + updatedBy?: string; + updatedUser?: dependency_2.User; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [9], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("template" in data && data.template != undefined) { + this.template = data.template; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("modelProviderId" in data && data.modelProviderId != undefined) { + this.modelProviderId = data.modelProviderId; + } + if ("modelProviderName" in data && data.modelProviderName != undefined) { + this.modelProviderName = data.modelProviderName; + } + if ("assistantModelOptions" in data && data.assistantModelOptions != undefined) { + this.assistantModelOptions = data.assistantModelOptions; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("createdUser" in data && data.createdUser != undefined) { + this.createdUser = data.createdUser; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("updatedUser" in data && data.updatedUser != undefined) { + this.updatedUser = data.updatedUser; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get template() { + return pb_1.Message.getWrapperField(this, dependency_2.TextChatCompletePrompt, 2) as dependency_2.TextChatCompletePrompt; + } + set template(value: dependency_2.TextChatCompletePrompt) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_template() { + return pb_1.Message.getField(this, 2) != null; + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get modelProviderId() { + return pb_1.Message.getFieldWithDefault(this, 6, "0") as string; + } + set modelProviderId(value: string) { + pb_1.Message.setField(this, 6, value); + } + get modelProviderName() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set modelProviderName(value: string) { + pb_1.Message.setField(this, 7, value); + } + get assistantModelOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 9) as dependency_2.Metadata[]; + } + set assistantModelOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 9, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 12, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 13, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 13, value); + } + get createdUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 14) as dependency_2.User; + } + set createdUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_createdUser() { + return pb_1.Message.getField(this, 14) != null; + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 15, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 15, value); + } + get updatedUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 16) as dependency_2.User; + } + set updatedUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 16, value); + } + get has_updatedUser() { + return pb_1.Message.getField(this, 16) != null; + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 17) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 17, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 17) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 18) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 18, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 18) != null; + } + static fromObject(data: { + id?: string; + template?: ReturnType; + description?: string; + modelProviderId?: string; + modelProviderName?: string; + assistantModelOptions?: ReturnType[]; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + }): AssistantProviderModel { + const message = new AssistantProviderModel({}); + if (data.id != null) { + message.id = data.id; + } + if (data.template != null) { + message.template = dependency_2.TextChatCompletePrompt.fromObject(data.template); + } + if (data.description != null) { + message.description = data.description; + } + if (data.modelProviderId != null) { + message.modelProviderId = data.modelProviderId; + } + if (data.modelProviderName != null) { + message.modelProviderName = data.modelProviderName; + } + if (data.assistantModelOptions != null) { + message.assistantModelOptions = data.assistantModelOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.createdUser != null) { + message.createdUser = dependency_2.User.fromObject(data.createdUser); + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.updatedUser != null) { + message.updatedUser = dependency_2.User.fromObject(data.updatedUser); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + return message; + } + toObject() { + const data: { + id?: string; + template?: ReturnType; + description?: string; + modelProviderId?: string; + modelProviderName?: string; + assistantModelOptions?: ReturnType[]; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.template != null) { + data.template = this.template.toObject(); + } + if (this.description != null) { + data.description = this.description; + } + if (this.modelProviderId != null) { + data.modelProviderId = this.modelProviderId; + } + if (this.modelProviderName != null) { + data.modelProviderName = this.modelProviderName; + } + if (this.assistantModelOptions != null) { + data.assistantModelOptions = this.assistantModelOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.createdUser != null) { + data.createdUser = this.createdUser.toObject(); + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.updatedUser != null) { + data.updatedUser = this.updatedUser.toObject(); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.has_template) + writer.writeMessage(2, this.template, () => this.template.serialize(writer)); + if (this.description.length) + writer.writeString(3, this.description); + if (this.modelProviderId != "0") + writer.writeUint64String(6, this.modelProviderId); + if (this.modelProviderName.length) + writer.writeString(7, this.modelProviderName); + if (this.assistantModelOptions.length) + writer.writeRepeatedMessage(9, this.assistantModelOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (this.status.length) + writer.writeString(12, this.status); + if (this.createdBy != "0") + writer.writeUint64String(13, this.createdBy); + if (this.has_createdUser) + writer.writeMessage(14, this.createdUser, () => this.createdUser.serialize(writer)); + if (this.updatedBy != "0") + writer.writeUint64String(15, this.updatedBy); + if (this.has_updatedUser) + writer.writeMessage(16, this.updatedUser, () => this.updatedUser.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(17, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(18, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantProviderModel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantProviderModel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.template, () => message.template = dependency_2.TextChatCompletePrompt.deserialize(reader)); + break; + case 3: + message.description = reader.readString(); + break; + case 6: + message.modelProviderId = reader.readUint64String(); + break; + case 7: + message.modelProviderName = reader.readString(); + break; + case 9: + reader.readMessage(message.assistantModelOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 9, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + case 12: + message.status = reader.readString(); + break; + case 13: + message.createdBy = reader.readUint64String(); + break; + case 14: + reader.readMessage(message.createdUser, () => message.createdUser = dependency_2.User.deserialize(reader)); + break; + case 15: + message.updatedBy = reader.readUint64String(); + break; + case 16: + reader.readMessage(message.updatedUser, () => message.updatedUser = dependency_2.User.deserialize(reader)); + break; + case 17: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 18: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantProviderModel { + return AssistantProviderModel.deserialize(bytes); + } + } + export class CreateAssistantRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantProviderModel?: CreateAssistantProviderModelRequest; + assistantKnowledges?: dependency_7.assistant_api.CreateAssistantKnowledgeRequest[]; + assistantTools?: dependency_4.assistant_api.CreateAssistantToolRequest[]; + description?: string; + visibility?: string; + language?: string; + source?: string; + sourceIdentifier?: string; + tags?: string[]; + name?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 9], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantProviderModel" in data && data.assistantProviderModel != undefined) { + this.assistantProviderModel = data.assistantProviderModel; + } + if ("assistantKnowledges" in data && data.assistantKnowledges != undefined) { + this.assistantKnowledges = data.assistantKnowledges; + } + if ("assistantTools" in data && data.assistantTools != undefined) { + this.assistantTools = data.assistantTools; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("visibility" in data && data.visibility != undefined) { + this.visibility = data.visibility; + } + if ("language" in data && data.language != undefined) { + this.language = data.language; + } + if ("source" in data && data.source != undefined) { + this.source = data.source; + } + if ("sourceIdentifier" in data && data.sourceIdentifier != undefined) { + this.sourceIdentifier = data.sourceIdentifier; + } + if ("tags" in data && data.tags != undefined) { + this.tags = data.tags; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + } + } + get assistantProviderModel() { + return pb_1.Message.getWrapperField(this, CreateAssistantProviderModelRequest, 1) as CreateAssistantProviderModelRequest; + } + set assistantProviderModel(value: CreateAssistantProviderModelRequest) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_assistantProviderModel() { + return pb_1.Message.getField(this, 1) != null; + } + get assistantKnowledges() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_7.assistant_api.CreateAssistantKnowledgeRequest, 2) as dependency_7.assistant_api.CreateAssistantKnowledgeRequest[]; + } + set assistantKnowledges(value: dependency_7.assistant_api.CreateAssistantKnowledgeRequest[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get assistantTools() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_4.assistant_api.CreateAssistantToolRequest, 3) as dependency_4.assistant_api.CreateAssistantToolRequest[]; + } + set assistantTools(value: dependency_4.assistant_api.CreateAssistantToolRequest[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 4, value); + } + get visibility() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set visibility(value: string) { + pb_1.Message.setField(this, 5, value); + } + get language() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set language(value: string) { + pb_1.Message.setField(this, 6, value); + } + get source() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set source(value: string) { + pb_1.Message.setField(this, 7, value); + } + get sourceIdentifier() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set sourceIdentifier(value: string) { + pb_1.Message.setField(this, 8, value); + } + get tags() { + return pb_1.Message.getFieldWithDefault(this, 9, []) as string[]; + } + set tags(value: string[]) { + pb_1.Message.setField(this, 9, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 10, value); + } + static fromObject(data: { + assistantProviderModel?: ReturnType; + assistantKnowledges?: ReturnType[]; + assistantTools?: ReturnType[]; + description?: string; + visibility?: string; + language?: string; + source?: string; + sourceIdentifier?: string; + tags?: string[]; + name?: string; + }): CreateAssistantRequest { + const message = new CreateAssistantRequest({}); + if (data.assistantProviderModel != null) { + message.assistantProviderModel = CreateAssistantProviderModelRequest.fromObject(data.assistantProviderModel); + } + if (data.assistantKnowledges != null) { + message.assistantKnowledges = data.assistantKnowledges.map(item => dependency_7.assistant_api.CreateAssistantKnowledgeRequest.fromObject(item)); + } + if (data.assistantTools != null) { + message.assistantTools = data.assistantTools.map(item => dependency_4.assistant_api.CreateAssistantToolRequest.fromObject(item)); + } + if (data.description != null) { + message.description = data.description; + } + if (data.visibility != null) { + message.visibility = data.visibility; + } + if (data.language != null) { + message.language = data.language; + } + if (data.source != null) { + message.source = data.source; + } + if (data.sourceIdentifier != null) { + message.sourceIdentifier = data.sourceIdentifier; + } + if (data.tags != null) { + message.tags = data.tags; + } + if (data.name != null) { + message.name = data.name; + } + return message; + } + toObject() { + const data: { + assistantProviderModel?: ReturnType; + assistantKnowledges?: ReturnType[]; + assistantTools?: ReturnType[]; + description?: string; + visibility?: string; + language?: string; + source?: string; + sourceIdentifier?: string; + tags?: string[]; + name?: string; + } = {}; + if (this.assistantProviderModel != null) { + data.assistantProviderModel = this.assistantProviderModel.toObject(); + } + if (this.assistantKnowledges != null) { + data.assistantKnowledges = this.assistantKnowledges.map((item: dependency_7.assistant_api.CreateAssistantKnowledgeRequest) => item.toObject()); + } + if (this.assistantTools != null) { + data.assistantTools = this.assistantTools.map((item: dependency_4.assistant_api.CreateAssistantToolRequest) => item.toObject()); + } + if (this.description != null) { + data.description = this.description; + } + if (this.visibility != null) { + data.visibility = this.visibility; + } + if (this.language != null) { + data.language = this.language; + } + if (this.source != null) { + data.source = this.source; + } + if (this.sourceIdentifier != null) { + data.sourceIdentifier = this.sourceIdentifier; + } + if (this.tags != null) { + data.tags = this.tags; + } + if (this.name != null) { + data.name = this.name; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_assistantProviderModel) + writer.writeMessage(1, this.assistantProviderModel, () => this.assistantProviderModel.serialize(writer)); + if (this.assistantKnowledges.length) + writer.writeRepeatedMessage(2, this.assistantKnowledges, (item: dependency_7.assistant_api.CreateAssistantKnowledgeRequest) => item.serialize(writer)); + if (this.assistantTools.length) + writer.writeRepeatedMessage(3, this.assistantTools, (item: dependency_4.assistant_api.CreateAssistantToolRequest) => item.serialize(writer)); + if (this.description.length) + writer.writeString(4, this.description); + if (this.visibility.length) + writer.writeString(5, this.visibility); + if (this.language.length) + writer.writeString(6, this.language); + if (this.source.length) + writer.writeString(7, this.source); + if (this.sourceIdentifier != "0") + writer.writeUint64String(8, this.sourceIdentifier); + if (this.tags.length) + writer.writeRepeatedString(9, this.tags); + if (this.name.length) + writer.writeString(10, this.name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateAssistantRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateAssistantRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.assistantProviderModel, () => message.assistantProviderModel = CreateAssistantProviderModelRequest.deserialize(reader)); + break; + case 2: + reader.readMessage(message.assistantKnowledges, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_7.assistant_api.CreateAssistantKnowledgeRequest.deserialize(reader), dependency_7.assistant_api.CreateAssistantKnowledgeRequest)); + break; + case 3: + reader.readMessage(message.assistantTools, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_4.assistant_api.CreateAssistantToolRequest.deserialize(reader), dependency_4.assistant_api.CreateAssistantToolRequest)); + break; + case 4: + message.description = reader.readString(); + break; + case 5: + message.visibility = reader.readString(); + break; + case 6: + message.language = reader.readString(); + break; + case 7: + message.source = reader.readString(); + break; + case 8: + message.sourceIdentifier = reader.readUint64String(); + break; + case 9: + pb_1.Message.addToRepeatedField(message, 9, reader.readString()); + break; + case 10: + message.name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateAssistantRequest { + return CreateAssistantRequest.deserialize(bytes); + } + } + export class CreateAssistantProviderModelRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + description?: string; + template?: dependency_2.TextChatCompletePrompt; + modelProviderId?: string; + modelProviderName?: string; + assistantModelOptions?: dependency_2.Metadata[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [8], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("template" in data && data.template != undefined) { + this.template = data.template; + } + if ("modelProviderId" in data && data.modelProviderId != undefined) { + this.modelProviderId = data.modelProviderId; + } + if ("modelProviderName" in data && data.modelProviderName != undefined) { + this.modelProviderName = data.modelProviderName; + } + if ("assistantModelOptions" in data && data.assistantModelOptions != undefined) { + this.assistantModelOptions = data.assistantModelOptions; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get template() { + return pb_1.Message.getWrapperField(this, dependency_2.TextChatCompletePrompt, 3) as dependency_2.TextChatCompletePrompt; + } + set template(value: dependency_2.TextChatCompletePrompt) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_template() { + return pb_1.Message.getField(this, 3) != null; + } + get modelProviderId() { + return pb_1.Message.getFieldWithDefault(this, 6, "0") as string; + } + set modelProviderId(value: string) { + pb_1.Message.setField(this, 6, value); + } + get modelProviderName() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set modelProviderName(value: string) { + pb_1.Message.setField(this, 7, value); + } + get assistantModelOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 8) as dependency_2.Metadata[]; + } + set assistantModelOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 8, value); + } + static fromObject(data: { + assistantId?: string; + description?: string; + template?: ReturnType; + modelProviderId?: string; + modelProviderName?: string; + assistantModelOptions?: ReturnType[]; + }): CreateAssistantProviderModelRequest { + const message = new CreateAssistantProviderModelRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.description != null) { + message.description = data.description; + } + if (data.template != null) { + message.template = dependency_2.TextChatCompletePrompt.fromObject(data.template); + } + if (data.modelProviderId != null) { + message.modelProviderId = data.modelProviderId; + } + if (data.modelProviderName != null) { + message.modelProviderName = data.modelProviderName; + } + if (data.assistantModelOptions != null) { + message.assistantModelOptions = data.assistantModelOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + return message; + } + toObject() { + const data: { + assistantId?: string; + description?: string; + template?: ReturnType; + modelProviderId?: string; + modelProviderName?: string; + assistantModelOptions?: ReturnType[]; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.description != null) { + data.description = this.description; + } + if (this.template != null) { + data.template = this.template.toObject(); + } + if (this.modelProviderId != null) { + data.modelProviderId = this.modelProviderId; + } + if (this.modelProviderName != null) { + data.modelProviderName = this.modelProviderName; + } + if (this.assistantModelOptions != null) { + data.assistantModelOptions = this.assistantModelOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.description.length) + writer.writeString(2, this.description); + if (this.has_template) + writer.writeMessage(3, this.template, () => this.template.serialize(writer)); + if (this.modelProviderId != "0") + writer.writeUint64String(6, this.modelProviderId); + if (this.modelProviderName.length) + writer.writeString(7, this.modelProviderName); + if (this.assistantModelOptions.length) + writer.writeRepeatedMessage(8, this.assistantModelOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateAssistantProviderModelRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateAssistantProviderModelRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + reader.readMessage(message.template, () => message.template = dependency_2.TextChatCompletePrompt.deserialize(reader)); + break; + case 6: + message.modelProviderId = reader.readUint64String(); + break; + case 7: + message.modelProviderName = reader.readString(); + break; + case 8: + reader.readMessage(message.assistantModelOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 8, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateAssistantProviderModelRequest { + return CreateAssistantProviderModelRequest.deserialize(bytes); + } + } + export class GetAssistantProviderModelResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantProviderModel; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantProviderModel, 3) as AssistantProviderModel; + } + set data(value: AssistantProviderModel) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantProviderModelResponse { + const message = new GetAssistantProviderModelResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantProviderModel.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantProviderModelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantProviderModelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantProviderModel.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantProviderModelResponse { + return GetAssistantProviderModelResponse.deserialize(bytes); + } + } + export class CreateAssistantTagRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + tags?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("tags" in data && data.tags != undefined) { + this.tags = data.tags; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get tags() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set tags(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + assistantId?: string; + tags?: string[]; + }): CreateAssistantTagRequest { + const message = new CreateAssistantTagRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.tags != null) { + message.tags = data.tags; + } + return message; + } + toObject() { + const data: { + assistantId?: string; + tags?: string[]; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.tags != null) { + data.tags = this.tags; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.tags.length) + writer.writeRepeatedString(2, this.tags); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateAssistantTagRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateAssistantTagRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateAssistantTagRequest { + return CreateAssistantTagRequest.deserialize(bytes); + } + } + export class GetAssistantRequest extends pb_1.Message { + #one_of_decls: number[][] = [[4]]; + constructor(data?: any[] | ({ + id?: string; + } & (({ + assistantProviderModelId?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantProviderModelId" in data && data.assistantProviderModelId != undefined) { + this.assistantProviderModelId = data.assistantProviderModelId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantProviderModelId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set assistantProviderModelId(value: string) { + pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value); + } + get has_assistantProviderModelId() { + return pb_1.Message.getField(this, 4) != null; + } + get _assistantProviderModelId() { + const cases: { + [index: number]: "none" | "assistantProviderModelId"; + } = { + 0: "none", + 4: "assistantProviderModelId" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + static fromObject(data: { + id?: string; + assistantProviderModelId?: string; + }): GetAssistantRequest { + const message = new GetAssistantRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantProviderModelId != null) { + message.assistantProviderModelId = data.assistantProviderModelId; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantProviderModelId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantProviderModelId != null) { + data.assistantProviderModelId = this.assistantProviderModelId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.has_assistantProviderModelId) + writer.writeUint64String(4, this.assistantProviderModelId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 4: + message.assistantProviderModelId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantRequest { + return GetAssistantRequest.deserialize(bytes); + } + } + export class DeleteAssistantRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + id?: string; + }): DeleteAssistantRequest { + const message = new DeleteAssistantRequest({}); + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + id?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeleteAssistantRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteAssistantRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DeleteAssistantRequest { + return DeleteAssistantRequest.deserialize(bytes); + } + } + export class GetAssistantResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Assistant; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, Assistant, 3) as Assistant; + } + set data(value: Assistant) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantResponse { + const message = new GetAssistantResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = Assistant.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = Assistant.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantResponse { + return GetAssistantResponse.deserialize(bytes); + } + } + export class GetAllAssistantRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllAssistantRequest { + const message = new GetAllAssistantRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantRequest { + return GetAllAssistantRequest.deserialize(bytes); + } + } + export class GetAllAssistantResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Assistant[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, Assistant, 3) as Assistant[]; + } + set data(value: Assistant[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantResponse { + const message = new GetAllAssistantResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => Assistant.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: Assistant) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: Assistant) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Assistant.deserialize(reader), Assistant)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantResponse { + return GetAllAssistantResponse.deserialize(bytes); + } + } + export class GetAllAssistantProviderModelRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + assistantId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + assistantId?: string; + }): GetAllAssistantProviderModelRequest { + const message = new GetAllAssistantProviderModelRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + assistantId?: string; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.assistantId != "0") + writer.writeUint64String(5, this.assistantId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantProviderModelRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantProviderModelRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 5: + message.assistantId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantProviderModelRequest { + return GetAllAssistantProviderModelRequest.deserialize(bytes); + } + } + export class GetAllAssistantProviderModelResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantProviderModel[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantProviderModel, 3) as AssistantProviderModel[]; + } + set data(value: AssistantProviderModel[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantProviderModelResponse { + const message = new GetAllAssistantProviderModelResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => AssistantProviderModel.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: AssistantProviderModel) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: AssistantProviderModel) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantProviderModelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantProviderModelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AssistantProviderModel.deserialize(reader), AssistantProviderModel)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantProviderModelResponse { + return GetAllAssistantProviderModelResponse.deserialize(bytes); + } + } + export class GetAllAssistantMessageRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + assistantId?: string; + order?: dependency_2.Ordering; + selectors?: dependency_2.FieldSelector[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("order" in data && data.order != undefined) { + this.order = data.order; + } + if ("selectors" in data && data.selectors != undefined) { + this.selectors = data.selectors; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get order() { + return pb_1.Message.getWrapperField(this, dependency_2.Ordering, 5) as dependency_2.Ordering; + } + set order(value: dependency_2.Ordering) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_order() { + return pb_1.Message.getField(this, 5) != null; + } + get selectors() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.FieldSelector, 6) as dependency_2.FieldSelector[]; + } + set selectors(value: dependency_2.FieldSelector[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + assistantId?: string; + order?: ReturnType; + selectors?: ReturnType[]; + }): GetAllAssistantMessageRequest { + const message = new GetAllAssistantMessageRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.order != null) { + message.order = dependency_2.Ordering.fromObject(data.order); + } + if (data.selectors != null) { + message.selectors = data.selectors.map(item => dependency_2.FieldSelector.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + assistantId?: string; + order?: ReturnType; + selectors?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.order != null) { + data.order = this.order.toObject(); + } + if (this.selectors != null) { + data.selectors = this.selectors.map((item: dependency_2.FieldSelector) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.assistantId != "0") + writer.writeUint64String(3, this.assistantId); + if (this.has_order) + writer.writeMessage(5, this.order, () => this.order.serialize(writer)); + if (this.selectors.length) + writer.writeRepeatedMessage(6, this.selectors, (item: dependency_2.FieldSelector) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantMessageRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantMessageRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 3: + message.assistantId = reader.readUint64String(); + break; + case 5: + reader.readMessage(message.order, () => message.order = dependency_2.Ordering.deserialize(reader)); + break; + case 6: + reader.readMessage(message.selectors, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_2.FieldSelector.deserialize(reader), dependency_2.FieldSelector)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantMessageRequest { + return GetAllAssistantMessageRequest.deserialize(bytes); + } + } + export class GetAllAssistantMessageResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.AssistantConversationMessage[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.AssistantConversationMessage, 3) as dependency_2.AssistantConversationMessage[]; + } + set data(value: dependency_2.AssistantConversationMessage[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantMessageResponse { + const message = new GetAllAssistantMessageResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_2.AssistantConversationMessage.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_2.AssistantConversationMessage) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_2.AssistantConversationMessage) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantMessageResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantMessageResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.AssistantConversationMessage.deserialize(reader), dependency_2.AssistantConversationMessage)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantMessageResponse { + return GetAllAssistantMessageResponse.deserialize(bytes); + } + } + export class GetAllMessageRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + order?: dependency_2.Ordering; + selectors?: dependency_2.FieldSelector[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("order" in data && data.order != undefined) { + this.order = data.order; + } + if ("selectors" in data && data.selectors != undefined) { + this.selectors = data.selectors; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get order() { + return pb_1.Message.getWrapperField(this, dependency_2.Ordering, 5) as dependency_2.Ordering; + } + set order(value: dependency_2.Ordering) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_order() { + return pb_1.Message.getField(this, 5) != null; + } + get selectors() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.FieldSelector, 6) as dependency_2.FieldSelector[]; + } + set selectors(value: dependency_2.FieldSelector[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + order?: ReturnType; + selectors?: ReturnType[]; + }): GetAllMessageRequest { + const message = new GetAllMessageRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.order != null) { + message.order = dependency_2.Ordering.fromObject(data.order); + } + if (data.selectors != null) { + message.selectors = data.selectors.map(item => dependency_2.FieldSelector.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + order?: ReturnType; + selectors?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.order != null) { + data.order = this.order.toObject(); + } + if (this.selectors != null) { + data.selectors = this.selectors.map((item: dependency_2.FieldSelector) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.has_order) + writer.writeMessage(5, this.order, () => this.order.serialize(writer)); + if (this.selectors.length) + writer.writeRepeatedMessage(6, this.selectors, (item: dependency_2.FieldSelector) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllMessageRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllMessageRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 5: + reader.readMessage(message.order, () => message.order = dependency_2.Ordering.deserialize(reader)); + break; + case 6: + reader.readMessage(message.selectors, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_2.FieldSelector.deserialize(reader), dependency_2.FieldSelector)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllMessageRequest { + return GetAllMessageRequest.deserialize(bytes); + } + } + export class GetAllMessageResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.AssistantConversationMessage[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.AssistantConversationMessage, 3) as dependency_2.AssistantConversationMessage[]; + } + set data(value: dependency_2.AssistantConversationMessage[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllMessageResponse { + const message = new GetAllMessageResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_2.AssistantConversationMessage.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_2.AssistantConversationMessage) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_2.AssistantConversationMessage) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllMessageResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllMessageResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.AssistantConversationMessage.deserialize(reader), dependency_2.AssistantConversationMessage)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllMessageResponse { + return GetAllMessageResponse.deserialize(bytes); + } + } + export class UpdateAssistantVersionRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + assistantProviderModelId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("assistantProviderModelId" in data && data.assistantProviderModelId != undefined) { + this.assistantProviderModelId = data.assistantProviderModelId; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantProviderModelId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantProviderModelId(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + assistantId?: string; + assistantProviderModelId?: string; + }): UpdateAssistantVersionRequest { + const message = new UpdateAssistantVersionRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.assistantProviderModelId != null) { + message.assistantProviderModelId = data.assistantProviderModelId; + } + return message; + } + toObject() { + const data: { + assistantId?: string; + assistantProviderModelId?: string; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.assistantProviderModelId != null) { + data.assistantProviderModelId = this.assistantProviderModelId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.assistantProviderModelId != "0") + writer.writeUint64String(2, this.assistantProviderModelId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateAssistantVersionRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateAssistantVersionRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + message.assistantProviderModelId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateAssistantVersionRequest { + return UpdateAssistantVersionRequest.deserialize(bytes); + } + } + export class UpdateAssistantDetailRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + name?: string; + description?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + assistantId?: string; + name?: string; + description?: string; + }): UpdateAssistantDetailRequest { + const message = new UpdateAssistantDetailRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + return message; + } + toObject() { + const data: { + assistantId?: string; + name?: string; + description?: string; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateAssistantDetailRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateAssistantDetailRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateAssistantDetailRequest { + return UpdateAssistantDetailRequest.deserialize(bytes); + } + } + export class GetAllAssistantUserConversationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + source?: dependency_2.Source; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("source" in data && data.source != undefined) { + this.source = data.source; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 2) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 2) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 3) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get source() { + return pb_1.Message.getFieldWithDefault(this, 7, dependency_2.Source.WEB_PLUGIN) as dependency_2.Source; + } + set source(value: dependency_2.Source) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + source?: dependency_2.Source; + }): GetAllAssistantUserConversationRequest { + const message = new GetAllAssistantUserConversationRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.source != null) { + message.source = data.source; + } + return message; + } + toObject() { + const data: { + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + source?: dependency_2.Source; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.source != null) { + data.source = this.source; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.has_paginate) + writer.writeMessage(2, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(3, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.source != dependency_2.Source.WEB_PLUGIN) + writer.writeEnum(7, this.source); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantUserConversationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantUserConversationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 3: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 7: + message.source = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantUserConversationRequest { + return GetAllAssistantUserConversationRequest.deserialize(bytes); + } + } + export class GetAllAssistantUserConversationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.AssistantConversation[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.AssistantConversation, 3) as dependency_2.AssistantConversation[]; + } + set data(value: dependency_2.AssistantConversation[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantUserConversationResponse { + const message = new GetAllAssistantUserConversationResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_2.AssistantConversation.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_2.AssistantConversation) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_2.AssistantConversation) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantUserConversationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantUserConversationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.AssistantConversation.deserialize(reader), dependency_2.AssistantConversation)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantUserConversationResponse { + return GetAllAssistantUserConversationResponse.deserialize(bytes); + } + } + export class GetAssistantConversationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + assistantConversationId?: string; + selectors?: dependency_2.FieldSelector[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("assistantConversationId" in data && data.assistantConversationId != undefined) { + this.assistantConversationId = data.assistantConversationId; + } + if ("selectors" in data && data.selectors != undefined) { + this.selectors = data.selectors; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantConversationId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantConversationId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get selectors() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.FieldSelector, 5) as dependency_2.FieldSelector[]; + } + set selectors(value: dependency_2.FieldSelector[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + static fromObject(data: { + assistantId?: string; + assistantConversationId?: string; + selectors?: ReturnType[]; + }): GetAssistantConversationRequest { + const message = new GetAssistantConversationRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.assistantConversationId != null) { + message.assistantConversationId = data.assistantConversationId; + } + if (data.selectors != null) { + message.selectors = data.selectors.map(item => dependency_2.FieldSelector.fromObject(item)); + } + return message; + } + toObject() { + const data: { + assistantId?: string; + assistantConversationId?: string; + selectors?: ReturnType[]; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.assistantConversationId != null) { + data.assistantConversationId = this.assistantConversationId; + } + if (this.selectors != null) { + data.selectors = this.selectors.map((item: dependency_2.FieldSelector) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.assistantConversationId != "0") + writer.writeUint64String(2, this.assistantConversationId); + if (this.selectors.length) + writer.writeRepeatedMessage(5, this.selectors, (item: dependency_2.FieldSelector) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantConversationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantConversationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + message.assistantConversationId = reader.readUint64String(); + break; + case 5: + reader.readMessage(message.selectors, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_2.FieldSelector.deserialize(reader), dependency_2.FieldSelector)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantConversationRequest { + return GetAssistantConversationRequest.deserialize(bytes); + } + } + export class GetAssistantConversationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.AssistantConversation; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_2.AssistantConversation, 3) as dependency_2.AssistantConversation; + } + set data(value: dependency_2.AssistantConversation) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantConversationResponse { + const message = new GetAssistantConversationResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = dependency_2.AssistantConversation.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantConversationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantConversationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = dependency_2.AssistantConversation.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantConversationResponse { + return GetAssistantConversationResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedAssistantServiceService { + static definition = { + GetAssistant: { + path: "/assistant_api.AssistantService/GetAssistant", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAssistantRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAssistantRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistant: { + path: "/assistant_api.AssistantService/GetAllAssistant", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllAssistantRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllAssistantRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllAssistantResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllAssistantResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistant: { + path: "/assistant_api.AssistantService/CreateAssistant", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateAssistantRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateAssistantRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantResponse.deserialize(new Uint8Array(bytes)) + }, + DeleteAssistant: { + path: "/assistant_api.AssistantService/DeleteAssistant", + requestStream: false, + responseStream: false, + requestSerialize: (message: DeleteAssistantRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => DeleteAssistantRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistantProviderModel: { + path: "/assistant_api.AssistantService/GetAllAssistantProviderModel", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllAssistantProviderModelRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllAssistantProviderModelRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllAssistantProviderModelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllAssistantProviderModelResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistantProviderModel: { + path: "/assistant_api.AssistantService/CreateAssistantProviderModel", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateAssistantProviderModelRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateAssistantProviderModelRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantProviderModelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantProviderModelResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistantTag: { + path: "/assistant_api.AssistantService/CreateAssistantTag", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateAssistantTagRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateAssistantTagRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateAssistantVersion: { + path: "/assistant_api.AssistantService/UpdateAssistantVersion", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateAssistantVersionRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateAssistantVersionRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateAssistantDetail: { + path: "/assistant_api.AssistantService/UpdateAssistantDetail", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateAssistantDetailRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateAssistantDetailRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistantMessage: { + path: "/assistant_api.AssistantService/GetAllAssistantMessage", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllAssistantMessageRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllAssistantMessageRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllAssistantMessageResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllAssistantMessageResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllConversationMessage: { + path: "/assistant_api.AssistantService/GetAllConversationMessage", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_2.GetAllConversationMessageRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_2.GetAllConversationMessageRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_2.GetAllConversationMessageResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_2.GetAllConversationMessageResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllMessage: { + path: "/assistant_api.AssistantService/GetAllMessage", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllMessageRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllMessageRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllMessageResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllMessageResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistantConversation: { + path: "/assistant_api.AssistantService/GetAllAssistantConversation", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_2.GetAllAssistantConversationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_2.GetAllAssistantConversationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_2.GetAllAssistantConversationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_2.GetAllAssistantConversationResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantConversation: { + path: "/assistant_api.AssistantService/GetAssistantConversation", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAssistantConversationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAssistantConversationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantConversationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantConversationResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantWebhookLog: { + path: "/assistant_api.AssistantService/GetAssistantWebhookLog", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_6.assistant_api.GetAssistantWebhookLogRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAssistantWebhookLogRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_6.assistant_api.GetAssistantWebhookLogResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAssistantWebhookLogResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistantWebhookLog: { + path: "/assistant_api.AssistantService/GetAllAssistantWebhookLog", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_6.assistant_api.GetAllAssistantWebhookLogRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAllAssistantWebhookLogRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_6.assistant_api.GetAllAssistantWebhookLogResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAllAssistantWebhookLogResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistantWebhook: { + path: "/assistant_api.AssistantService/GetAllAssistantWebhook", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_6.assistant_api.GetAllAssistantWebhookRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAllAssistantWebhookRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_6.assistant_api.GetAllAssistantWebhookResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAllAssistantWebhookResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantWebhook: { + path: "/assistant_api.AssistantService/GetAssistantWebhook", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_6.assistant_api.GetAssistantWebhookRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAssistantWebhookRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_6.assistant_api.GetAssistantWebhookResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAssistantWebhookResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistantWebhook: { + path: "/assistant_api.AssistantService/CreateAssistantWebhook", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_6.assistant_api.CreateAssistantWebhookRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_6.assistant_api.CreateAssistantWebhookRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_6.assistant_api.GetAssistantWebhookResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAssistantWebhookResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateAssistantWebhook: { + path: "/assistant_api.AssistantService/UpdateAssistantWebhook", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_6.assistant_api.UpdateAssistantWebhookRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_6.assistant_api.UpdateAssistantWebhookRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_6.assistant_api.GetAssistantWebhookResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAssistantWebhookResponse.deserialize(new Uint8Array(bytes)) + }, + DeleteAssistantWebhook: { + path: "/assistant_api.AssistantService/DeleteAssistantWebhook", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_6.assistant_api.DeleteAssistantWebhookRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_6.assistant_api.DeleteAssistantWebhookRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_6.assistant_api.GetAssistantWebhookResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_6.assistant_api.GetAssistantWebhookResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantToolLog: { + path: "/assistant_api.AssistantService/GetAssistantToolLog", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_4.assistant_api.GetAssistantToolLogRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAssistantToolLogRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_4.assistant_api.GetAssistantToolLogResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAssistantToolLogResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistantToolLog: { + path: "/assistant_api.AssistantService/GetAllAssistantToolLog", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_4.assistant_api.GetAllAssistantToolLogRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAllAssistantToolLogRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_4.assistant_api.GetAllAssistantToolLogResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAllAssistantToolLogResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantAnalysis: { + path: "/assistant_api.AssistantService/GetAssistantAnalysis", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_5.assistant_api.GetAssistantAnalysisRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_5.assistant_api.GetAssistantAnalysisRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_5.assistant_api.GetAssistantAnalysisResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_5.assistant_api.GetAssistantAnalysisResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateAssistantAnalysis: { + path: "/assistant_api.AssistantService/UpdateAssistantAnalysis", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_5.assistant_api.UpdateAssistantAnalysisRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_5.assistant_api.UpdateAssistantAnalysisRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_5.assistant_api.GetAssistantAnalysisResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_5.assistant_api.GetAssistantAnalysisResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistantAnalysis: { + path: "/assistant_api.AssistantService/CreateAssistantAnalysis", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_5.assistant_api.CreateAssistantAnalysisRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_5.assistant_api.CreateAssistantAnalysisRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_5.assistant_api.GetAssistantAnalysisResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_5.assistant_api.GetAssistantAnalysisResponse.deserialize(new Uint8Array(bytes)) + }, + DeleteAssistantAnalysis: { + path: "/assistant_api.AssistantService/DeleteAssistantAnalysis", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_5.assistant_api.DeleteAssistantAnalysisRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_5.assistant_api.DeleteAssistantAnalysisRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_5.assistant_api.GetAssistantAnalysisResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_5.assistant_api.GetAssistantAnalysisResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistantAnalysis: { + path: "/assistant_api.AssistantService/GetAllAssistantAnalysis", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_5.assistant_api.GetAllAssistantAnalysisRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_5.assistant_api.GetAllAssistantAnalysisRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_5.assistant_api.GetAllAssistantAnalysisResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_5.assistant_api.GetAllAssistantAnalysisResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistantTool: { + path: "/assistant_api.AssistantService/CreateAssistantTool", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_4.assistant_api.CreateAssistantToolRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_4.assistant_api.CreateAssistantToolRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_4.assistant_api.GetAssistantToolResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAssistantToolResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantTool: { + path: "/assistant_api.AssistantService/GetAssistantTool", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_4.assistant_api.GetAssistantToolRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAssistantToolRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_4.assistant_api.GetAssistantToolResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAssistantToolResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistantTool: { + path: "/assistant_api.AssistantService/GetAllAssistantTool", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_4.assistant_api.GetAllAssistantToolRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAllAssistantToolRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_4.assistant_api.GetAllAssistantToolResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAllAssistantToolResponse.deserialize(new Uint8Array(bytes)) + }, + DeleteAssistantTool: { + path: "/assistant_api.AssistantService/DeleteAssistantTool", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_4.assistant_api.DeleteAssistantToolRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_4.assistant_api.DeleteAssistantToolRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_4.assistant_api.GetAssistantToolResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAssistantToolResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateAssistantTool: { + path: "/assistant_api.AssistantService/UpdateAssistantTool", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_4.assistant_api.UpdateAssistantToolRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_4.assistant_api.UpdateAssistantToolRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_4.assistant_api.GetAssistantToolResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_4.assistant_api.GetAssistantToolResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistantKnowledge: { + path: "/assistant_api.AssistantService/CreateAssistantKnowledge", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_7.assistant_api.CreateAssistantKnowledgeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_7.assistant_api.CreateAssistantKnowledgeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_7.assistant_api.GetAssistantKnowledgeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_7.assistant_api.GetAssistantKnowledgeResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantKnowledge: { + path: "/assistant_api.AssistantService/GetAssistantKnowledge", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_7.assistant_api.GetAssistantKnowledgeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_7.assistant_api.GetAssistantKnowledgeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_7.assistant_api.GetAssistantKnowledgeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_7.assistant_api.GetAssistantKnowledgeResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistantKnowledge: { + path: "/assistant_api.AssistantService/GetAllAssistantKnowledge", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_7.assistant_api.GetAllAssistantKnowledgeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_7.assistant_api.GetAllAssistantKnowledgeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_7.assistant_api.GetAllAssistantKnowledgeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_7.assistant_api.GetAllAssistantKnowledgeResponse.deserialize(new Uint8Array(bytes)) + }, + DeleteAssistantKnowledge: { + path: "/assistant_api.AssistantService/DeleteAssistantKnowledge", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_7.assistant_api.DeleteAssistantKnowledgeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_7.assistant_api.DeleteAssistantKnowledgeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_7.assistant_api.GetAssistantKnowledgeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_7.assistant_api.GetAssistantKnowledgeResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateAssistantKnowledge: { + path: "/assistant_api.AssistantService/UpdateAssistantKnowledge", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_7.assistant_api.UpdateAssistantKnowledgeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_7.assistant_api.UpdateAssistantKnowledgeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_7.assistant_api.GetAssistantKnowledgeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_7.assistant_api.GetAssistantKnowledgeResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GetAssistant(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllAssistant(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistant(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DeleteAssistant(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllAssistantProviderModel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistantProviderModel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistantTag(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateAssistantVersion(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateAssistantDetail(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllAssistantMessage(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllConversationMessage(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllMessage(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllAssistantConversation(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantConversation(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantWebhookLog(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllAssistantWebhookLog(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllAssistantWebhook(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantWebhook(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistantWebhook(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateAssistantWebhook(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DeleteAssistantWebhook(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantToolLog(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllAssistantToolLog(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantAnalysis(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateAssistantAnalysis(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistantAnalysis(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DeleteAssistantAnalysis(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllAssistantAnalysis(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistantTool(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantTool(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllAssistantTool(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DeleteAssistantTool(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateAssistantTool(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistantKnowledge(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantKnowledge(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllAssistantKnowledge(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DeleteAssistantKnowledge(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateAssistantKnowledge(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class AssistantServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedAssistantServiceService.definition, "AssistantService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GetAssistant: GrpcUnaryServiceInterface = (message: GetAssistantRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistant(message, metadata, options, callback); + }; + GetAllAssistant: GrpcUnaryServiceInterface = (message: GetAllAssistantRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistant(message, metadata, options, callback); + }; + CreateAssistant: GrpcUnaryServiceInterface = (message: CreateAssistantRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistant(message, metadata, options, callback); + }; + DeleteAssistant: GrpcUnaryServiceInterface = (message: DeleteAssistantRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DeleteAssistant(message, metadata, options, callback); + }; + GetAllAssistantProviderModel: GrpcUnaryServiceInterface = (message: GetAllAssistantProviderModelRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistantProviderModel(message, metadata, options, callback); + }; + CreateAssistantProviderModel: GrpcUnaryServiceInterface = (message: CreateAssistantProviderModelRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantProviderModel(message, metadata, options, callback); + }; + CreateAssistantTag: GrpcUnaryServiceInterface = (message: CreateAssistantTagRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantTag(message, metadata, options, callback); + }; + UpdateAssistantVersion: GrpcUnaryServiceInterface = (message: UpdateAssistantVersionRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateAssistantVersion(message, metadata, options, callback); + }; + UpdateAssistantDetail: GrpcUnaryServiceInterface = (message: UpdateAssistantDetailRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateAssistantDetail(message, metadata, options, callback); + }; + GetAllAssistantMessage: GrpcUnaryServiceInterface = (message: GetAllAssistantMessageRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistantMessage(message, metadata, options, callback); + }; + GetAllConversationMessage: GrpcUnaryServiceInterface = (message: dependency_2.GetAllConversationMessageRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllConversationMessage(message, metadata, options, callback); + }; + GetAllMessage: GrpcUnaryServiceInterface = (message: GetAllMessageRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllMessage(message, metadata, options, callback); + }; + GetAllAssistantConversation: GrpcUnaryServiceInterface = (message: dependency_2.GetAllAssistantConversationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistantConversation(message, metadata, options, callback); + }; + GetAssistantConversation: GrpcUnaryServiceInterface = (message: GetAssistantConversationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantConversation(message, metadata, options, callback); + }; + GetAssistantWebhookLog: GrpcUnaryServiceInterface = (message: dependency_6.assistant_api.GetAssistantWebhookLogRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantWebhookLog(message, metadata, options, callback); + }; + GetAllAssistantWebhookLog: GrpcUnaryServiceInterface = (message: dependency_6.assistant_api.GetAllAssistantWebhookLogRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistantWebhookLog(message, metadata, options, callback); + }; + GetAllAssistantWebhook: GrpcUnaryServiceInterface = (message: dependency_6.assistant_api.GetAllAssistantWebhookRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistantWebhook(message, metadata, options, callback); + }; + GetAssistantWebhook: GrpcUnaryServiceInterface = (message: dependency_6.assistant_api.GetAssistantWebhookRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantWebhook(message, metadata, options, callback); + }; + CreateAssistantWebhook: GrpcUnaryServiceInterface = (message: dependency_6.assistant_api.CreateAssistantWebhookRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantWebhook(message, metadata, options, callback); + }; + UpdateAssistantWebhook: GrpcUnaryServiceInterface = (message: dependency_6.assistant_api.UpdateAssistantWebhookRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateAssistantWebhook(message, metadata, options, callback); + }; + DeleteAssistantWebhook: GrpcUnaryServiceInterface = (message: dependency_6.assistant_api.DeleteAssistantWebhookRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DeleteAssistantWebhook(message, metadata, options, callback); + }; + GetAssistantToolLog: GrpcUnaryServiceInterface = (message: dependency_4.assistant_api.GetAssistantToolLogRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantToolLog(message, metadata, options, callback); + }; + GetAllAssistantToolLog: GrpcUnaryServiceInterface = (message: dependency_4.assistant_api.GetAllAssistantToolLogRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistantToolLog(message, metadata, options, callback); + }; + GetAssistantAnalysis: GrpcUnaryServiceInterface = (message: dependency_5.assistant_api.GetAssistantAnalysisRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantAnalysis(message, metadata, options, callback); + }; + UpdateAssistantAnalysis: GrpcUnaryServiceInterface = (message: dependency_5.assistant_api.UpdateAssistantAnalysisRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateAssistantAnalysis(message, metadata, options, callback); + }; + CreateAssistantAnalysis: GrpcUnaryServiceInterface = (message: dependency_5.assistant_api.CreateAssistantAnalysisRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantAnalysis(message, metadata, options, callback); + }; + DeleteAssistantAnalysis: GrpcUnaryServiceInterface = (message: dependency_5.assistant_api.DeleteAssistantAnalysisRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DeleteAssistantAnalysis(message, metadata, options, callback); + }; + GetAllAssistantAnalysis: GrpcUnaryServiceInterface = (message: dependency_5.assistant_api.GetAllAssistantAnalysisRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistantAnalysis(message, metadata, options, callback); + }; + CreateAssistantTool: GrpcUnaryServiceInterface = (message: dependency_4.assistant_api.CreateAssistantToolRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantTool(message, metadata, options, callback); + }; + GetAssistantTool: GrpcUnaryServiceInterface = (message: dependency_4.assistant_api.GetAssistantToolRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantTool(message, metadata, options, callback); + }; + GetAllAssistantTool: GrpcUnaryServiceInterface = (message: dependency_4.assistant_api.GetAllAssistantToolRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistantTool(message, metadata, options, callback); + }; + DeleteAssistantTool: GrpcUnaryServiceInterface = (message: dependency_4.assistant_api.DeleteAssistantToolRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DeleteAssistantTool(message, metadata, options, callback); + }; + UpdateAssistantTool: GrpcUnaryServiceInterface = (message: dependency_4.assistant_api.UpdateAssistantToolRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateAssistantTool(message, metadata, options, callback); + }; + CreateAssistantKnowledge: GrpcUnaryServiceInterface = (message: dependency_7.assistant_api.CreateAssistantKnowledgeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantKnowledge(message, metadata, options, callback); + }; + GetAssistantKnowledge: GrpcUnaryServiceInterface = (message: dependency_7.assistant_api.GetAssistantKnowledgeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantKnowledge(message, metadata, options, callback); + }; + GetAllAssistantKnowledge: GrpcUnaryServiceInterface = (message: dependency_7.assistant_api.GetAllAssistantKnowledgeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistantKnowledge(message, metadata, options, callback); + }; + DeleteAssistantKnowledge: GrpcUnaryServiceInterface = (message: dependency_7.assistant_api.DeleteAssistantKnowledgeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DeleteAssistantKnowledge(message, metadata, options, callback); + }; + UpdateAssistantKnowledge: GrpcUnaryServiceInterface = (message: dependency_7.assistant_api.UpdateAssistantKnowledgeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateAssistantKnowledge(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/assistant-api_grpc_pb.d.ts b/src/clients/protos/assistant-api_grpc_pb.d.ts deleted file mode 100644 index 08fa510..0000000 --- a/src/clients/protos/assistant-api_grpc_pb.d.ts +++ /dev/null @@ -1,204 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: assistant_api -// file: assistant-api.proto - -import * as assistant_api_pb from "./assistant-api_pb"; -import * as common_pb from "./common_pb"; -import * as assistant_tool_pb from "./assistant-tool_pb"; -import * as assistant_analysis_pb from "./assistant-analysis_pb"; -import * as assistant_webhook_pb from "./assistant-webhook_pb"; -import * as assistant_knowledge_pb from "./assistant-knowledge_pb"; -import * as grpc from "grpc"; - -interface IAssistantServiceService extends grpc.ServiceDefinition { - getAssistant: grpc.MethodDefinition; - getAllAssistant: grpc.MethodDefinition; - createAssistant: grpc.MethodDefinition; - deleteAssistant: grpc.MethodDefinition; - getAllAssistantProviderModel: grpc.MethodDefinition; - createAssistantProviderModel: grpc.MethodDefinition; - createAssistantTag: grpc.MethodDefinition; - updateAssistantVersion: grpc.MethodDefinition; - updateAssistantDetail: grpc.MethodDefinition; - getAllAssistantMessage: grpc.MethodDefinition; - getAllConversationMessage: grpc.MethodDefinition; - getAllMessage: grpc.MethodDefinition; - getAllAssistantConversation: grpc.MethodDefinition; - getAssistantConversation: grpc.MethodDefinition; - getAssistantWebhookLog: grpc.MethodDefinition; - getAllAssistantWebhookLog: grpc.MethodDefinition; - getAllAssistantWebhook: grpc.MethodDefinition; - getAssistantWebhook: grpc.MethodDefinition; - createAssistantWebhook: grpc.MethodDefinition; - updateAssistantWebhook: grpc.MethodDefinition; - deleteAssistantWebhook: grpc.MethodDefinition; - getAssistantAnalysis: grpc.MethodDefinition; - updateAssistantAnalysis: grpc.MethodDefinition; - createAssistantAnalysis: grpc.MethodDefinition; - deleteAssistantAnalysis: grpc.MethodDefinition; - getAllAssistantAnalysis: grpc.MethodDefinition; - createAssistantTool: grpc.MethodDefinition; - getAssistantTool: grpc.MethodDefinition; - getAllAssistantTool: grpc.MethodDefinition; - deleteAssistantTool: grpc.MethodDefinition; - updateAssistantTool: grpc.MethodDefinition; - createAssistantKnowledge: grpc.MethodDefinition; - getAssistantKnowledge: grpc.MethodDefinition; - getAllAssistantKnowledge: grpc.MethodDefinition; - deleteAssistantKnowledge: grpc.MethodDefinition; - updateAssistantKnowledge: grpc.MethodDefinition; -} - -export const AssistantServiceService: IAssistantServiceService; - -export interface IAssistantServiceServer extends grpc.UntypedServiceImplementation { - getAssistant: grpc.handleUnaryCall; - getAllAssistant: grpc.handleUnaryCall; - createAssistant: grpc.handleUnaryCall; - deleteAssistant: grpc.handleUnaryCall; - getAllAssistantProviderModel: grpc.handleUnaryCall; - createAssistantProviderModel: grpc.handleUnaryCall; - createAssistantTag: grpc.handleUnaryCall; - updateAssistantVersion: grpc.handleUnaryCall; - updateAssistantDetail: grpc.handleUnaryCall; - getAllAssistantMessage: grpc.handleUnaryCall; - getAllConversationMessage: grpc.handleUnaryCall; - getAllMessage: grpc.handleUnaryCall; - getAllAssistantConversation: grpc.handleUnaryCall; - getAssistantConversation: grpc.handleUnaryCall; - getAssistantWebhookLog: grpc.handleUnaryCall; - getAllAssistantWebhookLog: grpc.handleUnaryCall; - getAllAssistantWebhook: grpc.handleUnaryCall; - getAssistantWebhook: grpc.handleUnaryCall; - createAssistantWebhook: grpc.handleUnaryCall; - updateAssistantWebhook: grpc.handleUnaryCall; - deleteAssistantWebhook: grpc.handleUnaryCall; - getAssistantAnalysis: grpc.handleUnaryCall; - updateAssistantAnalysis: grpc.handleUnaryCall; - createAssistantAnalysis: grpc.handleUnaryCall; - deleteAssistantAnalysis: grpc.handleUnaryCall; - getAllAssistantAnalysis: grpc.handleUnaryCall; - createAssistantTool: grpc.handleUnaryCall; - getAssistantTool: grpc.handleUnaryCall; - getAllAssistantTool: grpc.handleUnaryCall; - deleteAssistantTool: grpc.handleUnaryCall; - updateAssistantTool: grpc.handleUnaryCall; - createAssistantKnowledge: grpc.handleUnaryCall; - getAssistantKnowledge: grpc.handleUnaryCall; - getAllAssistantKnowledge: grpc.handleUnaryCall; - deleteAssistantKnowledge: grpc.handleUnaryCall; - updateAssistantKnowledge: grpc.handleUnaryCall; -} - -export class AssistantServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - getAssistant(argument: assistant_api_pb.GetAssistantRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistant(argument: assistant_api_pb.GetAssistantRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistant(argument: assistant_api_pb.GetAssistantRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistant(argument: assistant_api_pb.GetAllAssistantRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistant(argument: assistant_api_pb.GetAllAssistantRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistant(argument: assistant_api_pb.GetAllAssistantRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistant(argument: assistant_api_pb.CreateAssistantRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistant(argument: assistant_api_pb.CreateAssistantRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistant(argument: assistant_api_pb.CreateAssistantRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistant(argument: assistant_api_pb.DeleteAssistantRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistant(argument: assistant_api_pb.DeleteAssistantRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistant(argument: assistant_api_pb.DeleteAssistantRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantProviderModel(argument: assistant_api_pb.GetAllAssistantProviderModelRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantProviderModel(argument: assistant_api_pb.GetAllAssistantProviderModelRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantProviderModel(argument: assistant_api_pb.GetAllAssistantProviderModelRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantProviderModel(argument: assistant_api_pb.CreateAssistantProviderModelRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantProviderModel(argument: assistant_api_pb.CreateAssistantProviderModelRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantProviderModel(argument: assistant_api_pb.CreateAssistantProviderModelRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantTag(argument: assistant_api_pb.CreateAssistantTagRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantTag(argument: assistant_api_pb.CreateAssistantTagRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantTag(argument: assistant_api_pb.CreateAssistantTagRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantVersion(argument: assistant_api_pb.UpdateAssistantVersionRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantVersion(argument: assistant_api_pb.UpdateAssistantVersionRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantVersion(argument: assistant_api_pb.UpdateAssistantVersionRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantDetail(argument: assistant_api_pb.UpdateAssistantDetailRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantDetail(argument: assistant_api_pb.UpdateAssistantDetailRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantDetail(argument: assistant_api_pb.UpdateAssistantDetailRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantMessage(argument: assistant_api_pb.GetAllAssistantMessageRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantMessage(argument: assistant_api_pb.GetAllAssistantMessageRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantMessage(argument: assistant_api_pb.GetAllAssistantMessageRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllConversationMessage(argument: common_pb.GetAllConversationMessageRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllConversationMessage(argument: common_pb.GetAllConversationMessageRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllConversationMessage(argument: common_pb.GetAllConversationMessageRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllMessage(argument: assistant_api_pb.GetAllMessageRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllMessage(argument: assistant_api_pb.GetAllMessageRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllMessage(argument: assistant_api_pb.GetAllMessageRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantConversation(argument: common_pb.GetAllAssistantConversationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantConversation(argument: common_pb.GetAllAssistantConversationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantConversation(argument: common_pb.GetAllAssistantConversationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantConversation(argument: assistant_api_pb.GetAssistantConversationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantConversation(argument: assistant_api_pb.GetAssistantConversationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantConversation(argument: assistant_api_pb.GetAssistantConversationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWebhookLog(argument: assistant_webhook_pb.GetAssistantWebhookLogRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWebhookLog(argument: assistant_webhook_pb.GetAssistantWebhookLogRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWebhookLog(argument: assistant_webhook_pb.GetAssistantWebhookLogRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantWebhookLog(argument: assistant_webhook_pb.GetAllAssistantWebhookLogRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantWebhookLog(argument: assistant_webhook_pb.GetAllAssistantWebhookLogRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantWebhookLog(argument: assistant_webhook_pb.GetAllAssistantWebhookLogRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantWebhook(argument: assistant_webhook_pb.GetAllAssistantWebhookRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantWebhook(argument: assistant_webhook_pb.GetAllAssistantWebhookRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantWebhook(argument: assistant_webhook_pb.GetAllAssistantWebhookRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWebhook(argument: assistant_webhook_pb.GetAssistantWebhookRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWebhook(argument: assistant_webhook_pb.GetAssistantWebhookRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWebhook(argument: assistant_webhook_pb.GetAssistantWebhookRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantWebhook(argument: assistant_webhook_pb.CreateAssistantWebhookRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantWebhook(argument: assistant_webhook_pb.CreateAssistantWebhookRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantWebhook(argument: assistant_webhook_pb.CreateAssistantWebhookRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantWebhook(argument: assistant_webhook_pb.UpdateAssistantWebhookRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantWebhook(argument: assistant_webhook_pb.UpdateAssistantWebhookRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantWebhook(argument: assistant_webhook_pb.UpdateAssistantWebhookRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantWebhook(argument: assistant_webhook_pb.DeleteAssistantWebhookRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantWebhook(argument: assistant_webhook_pb.DeleteAssistantWebhookRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantWebhook(argument: assistant_webhook_pb.DeleteAssistantWebhookRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantAnalysis(argument: assistant_analysis_pb.GetAssistantAnalysisRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantAnalysis(argument: assistant_analysis_pb.GetAssistantAnalysisRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantAnalysis(argument: assistant_analysis_pb.GetAssistantAnalysisRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantAnalysis(argument: assistant_analysis_pb.UpdateAssistantAnalysisRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantAnalysis(argument: assistant_analysis_pb.UpdateAssistantAnalysisRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantAnalysis(argument: assistant_analysis_pb.UpdateAssistantAnalysisRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantAnalysis(argument: assistant_analysis_pb.CreateAssistantAnalysisRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantAnalysis(argument: assistant_analysis_pb.CreateAssistantAnalysisRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantAnalysis(argument: assistant_analysis_pb.CreateAssistantAnalysisRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantAnalysis(argument: assistant_analysis_pb.DeleteAssistantAnalysisRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantAnalysis(argument: assistant_analysis_pb.DeleteAssistantAnalysisRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantAnalysis(argument: assistant_analysis_pb.DeleteAssistantAnalysisRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantAnalysis(argument: assistant_analysis_pb.GetAllAssistantAnalysisRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantAnalysis(argument: assistant_analysis_pb.GetAllAssistantAnalysisRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantAnalysis(argument: assistant_analysis_pb.GetAllAssistantAnalysisRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantTool(argument: assistant_tool_pb.CreateAssistantToolRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantTool(argument: assistant_tool_pb.CreateAssistantToolRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantTool(argument: assistant_tool_pb.CreateAssistantToolRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantTool(argument: assistant_tool_pb.GetAssistantToolRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantTool(argument: assistant_tool_pb.GetAssistantToolRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantTool(argument: assistant_tool_pb.GetAssistantToolRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantTool(argument: assistant_tool_pb.GetAllAssistantToolRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantTool(argument: assistant_tool_pb.GetAllAssistantToolRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantTool(argument: assistant_tool_pb.GetAllAssistantToolRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantTool(argument: assistant_tool_pb.DeleteAssistantToolRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantTool(argument: assistant_tool_pb.DeleteAssistantToolRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantTool(argument: assistant_tool_pb.DeleteAssistantToolRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantTool(argument: assistant_tool_pb.UpdateAssistantToolRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantTool(argument: assistant_tool_pb.UpdateAssistantToolRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantTool(argument: assistant_tool_pb.UpdateAssistantToolRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantKnowledge(argument: assistant_knowledge_pb.CreateAssistantKnowledgeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantKnowledge(argument: assistant_knowledge_pb.CreateAssistantKnowledgeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantKnowledge(argument: assistant_knowledge_pb.CreateAssistantKnowledgeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantKnowledge(argument: assistant_knowledge_pb.GetAssistantKnowledgeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantKnowledge(argument: assistant_knowledge_pb.GetAssistantKnowledgeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantKnowledge(argument: assistant_knowledge_pb.GetAssistantKnowledgeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantKnowledge(argument: assistant_knowledge_pb.GetAllAssistantKnowledgeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantKnowledge(argument: assistant_knowledge_pb.GetAllAssistantKnowledgeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantKnowledge(argument: assistant_knowledge_pb.GetAllAssistantKnowledgeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantKnowledge(argument: assistant_knowledge_pb.DeleteAssistantKnowledgeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantKnowledge(argument: assistant_knowledge_pb.DeleteAssistantKnowledgeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteAssistantKnowledge(argument: assistant_knowledge_pb.DeleteAssistantKnowledgeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantKnowledge(argument: assistant_knowledge_pb.UpdateAssistantKnowledgeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantKnowledge(argument: assistant_knowledge_pb.UpdateAssistantKnowledgeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateAssistantKnowledge(argument: assistant_knowledge_pb.UpdateAssistantKnowledgeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/assistant-api_grpc_pb.js b/src/clients/protos/assistant-api_grpc_pb.js index 78c82f1..410aa80 100644 --- a/src/clients/protos/assistant-api_grpc_pb.js +++ b/src/clients/protos/assistant-api_grpc_pb.js @@ -297,6 +297,28 @@ function deserialize_assistant_api_GetAllAssistantResponse(buffer_arg) { return assistant$api_pb.GetAllAssistantResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_assistant_api_GetAllAssistantToolLogRequest(arg) { + if (!(arg instanceof assistant$tool_pb.GetAllAssistantToolLogRequest)) { + throw new Error('Expected argument of type assistant_api.GetAllAssistantToolLogRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_assistant_api_GetAllAssistantToolLogRequest(buffer_arg) { + return assistant$tool_pb.GetAllAssistantToolLogRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_assistant_api_GetAllAssistantToolLogResponse(arg) { + if (!(arg instanceof assistant$tool_pb.GetAllAssistantToolLogResponse)) { + throw new Error('Expected argument of type assistant_api.GetAllAssistantToolLogResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_assistant_api_GetAllAssistantToolLogResponse(buffer_arg) { + return assistant$tool_pb.GetAllAssistantToolLogResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_assistant_api_GetAllAssistantToolRequest(arg) { if (!(arg instanceof assistant$tool_pb.GetAllAssistantToolRequest)) { throw new Error('Expected argument of type assistant_api.GetAllAssistantToolRequest'); @@ -484,6 +506,28 @@ function deserialize_assistant_api_GetAssistantResponse(buffer_arg) { return assistant$api_pb.GetAssistantResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_assistant_api_GetAssistantToolLogRequest(arg) { + if (!(arg instanceof assistant$tool_pb.GetAssistantToolLogRequest)) { + throw new Error('Expected argument of type assistant_api.GetAssistantToolLogRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_assistant_api_GetAssistantToolLogRequest(buffer_arg) { + return assistant$tool_pb.GetAssistantToolLogRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_assistant_api_GetAssistantToolLogResponse(arg) { + if (!(arg instanceof assistant$tool_pb.GetAssistantToolLogResponse)) { + throw new Error('Expected argument of type assistant_api.GetAssistantToolLogResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_assistant_api_GetAssistantToolLogResponse(buffer_arg) { + return assistant$tool_pb.GetAssistantToolLogResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_assistant_api_GetAssistantToolRequest(arg) { if (!(arg instanceof assistant$tool_pb.GetAssistantToolRequest)) { throw new Error('Expected argument of type assistant_api.GetAssistantToolRequest'); @@ -850,6 +894,29 @@ getAssistantWebhookLog: { responseSerialize: serialize_assistant_api_GetAssistantWebhookResponse, responseDeserialize: deserialize_assistant_api_GetAssistantWebhookResponse, }, + // tool log +getAssistantToolLog: { + path: '/assistant_api.AssistantService/GetAssistantToolLog', + requestStream: false, + responseStream: false, + requestType: assistant$tool_pb.GetAssistantToolLogRequest, + responseType: assistant$tool_pb.GetAssistantToolLogResponse, + requestSerialize: serialize_assistant_api_GetAssistantToolLogRequest, + requestDeserialize: deserialize_assistant_api_GetAssistantToolLogRequest, + responseSerialize: serialize_assistant_api_GetAssistantToolLogResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantToolLogResponse, + }, + getAllAssistantToolLog: { + path: '/assistant_api.AssistantService/GetAllAssistantToolLog', + requestStream: false, + responseStream: false, + requestType: assistant$tool_pb.GetAllAssistantToolLogRequest, + responseType: assistant$tool_pb.GetAllAssistantToolLogResponse, + requestSerialize: serialize_assistant_api_GetAllAssistantToolLogRequest, + requestDeserialize: deserialize_assistant_api_GetAllAssistantToolLogRequest, + responseSerialize: serialize_assistant_api_GetAllAssistantToolLogResponse, + responseDeserialize: deserialize_assistant_api_GetAllAssistantToolLogResponse, + }, // analysis getAssistantAnalysis: { path: '/assistant_api.AssistantService/GetAssistantAnalysis', diff --git a/src/clients/protos/assistant-api_pb.d.ts b/src/clients/protos/assistant-api_pb.d.ts deleted file mode 100644 index 6335fed..0000000 --- a/src/clients/protos/assistant-api_pb.d.ts +++ /dev/null @@ -1,1028 +0,0 @@ -// package: assistant_api -// file: assistant-api.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as common_pb from "./common_pb"; -import * as assistant_deployment_pb from "./assistant-deployment_pb"; -import * as assistant_tool_pb from "./assistant-tool_pb"; -import * as assistant_analysis_pb from "./assistant-analysis_pb"; -import * as assistant_webhook_pb from "./assistant-webhook_pb"; -import * as assistant_knowledge_pb from "./assistant-knowledge_pb"; - -export class Assistant extends jspb.Message { - getId(): string; - setId(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - getVisibility(): string; - setVisibility(value: string): void; - - getSource(): string; - setSource(value: string): void; - - getSourceidentifier(): string; - setSourceidentifier(value: string): void; - - clearAssistanttoolsList(): void; - getAssistanttoolsList(): Array; - setAssistanttoolsList(value: Array): void; - addAssistanttools(value?: assistant_tool_pb.AssistantTool, index?: number): assistant_tool_pb.AssistantTool; - - getProjectid(): string; - setProjectid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - getAssistantprovidermodelid(): string; - setAssistantprovidermodelid(value: string): void; - - hasAssistantprovidermodel(): boolean; - clearAssistantprovidermodel(): void; - getAssistantprovidermodel(): AssistantProviderModel | undefined; - setAssistantprovidermodel(value?: AssistantProviderModel): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - hasAssistanttag(): boolean; - clearAssistanttag(): void; - getAssistanttag(): common_pb.Tag | undefined; - setAssistanttag(value?: common_pb.Tag): void; - - getLanguage(): string; - setLanguage(value: string): void; - - hasOrganization(): boolean; - clearOrganization(): void; - getOrganization(): common_pb.Organization | undefined; - setOrganization(value?: common_pb.Organization): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - hasCreateduser(): boolean; - clearCreateduser(): void; - getCreateduser(): common_pb.User | undefined; - setCreateduser(value?: common_pb.User): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - hasUpdateduser(): boolean; - clearUpdateduser(): void; - getUpdateduser(): common_pb.User | undefined; - setUpdateduser(value?: common_pb.User): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasDebuggerdeployment(): boolean; - clearDebuggerdeployment(): void; - getDebuggerdeployment(): assistant_deployment_pb.AssistantDebuggerDeployment | undefined; - setDebuggerdeployment(value?: assistant_deployment_pb.AssistantDebuggerDeployment): void; - - hasPhonedeployment(): boolean; - clearPhonedeployment(): void; - getPhonedeployment(): assistant_deployment_pb.AssistantPhoneDeployment | undefined; - setPhonedeployment(value?: assistant_deployment_pb.AssistantPhoneDeployment): void; - - hasWhatsappdeployment(): boolean; - clearWhatsappdeployment(): void; - getWhatsappdeployment(): assistant_deployment_pb.AssistantWhatsappDeployment | undefined; - setWhatsappdeployment(value?: assistant_deployment_pb.AssistantWhatsappDeployment): void; - - hasWebplugindeployment(): boolean; - clearWebplugindeployment(): void; - getWebplugindeployment(): assistant_deployment_pb.AssistantWebpluginDeployment | undefined; - setWebplugindeployment(value?: assistant_deployment_pb.AssistantWebpluginDeployment): void; - - hasApideployment(): boolean; - clearApideployment(): void; - getApideployment(): assistant_deployment_pb.AssistantApiDeployment | undefined; - setApideployment(value?: assistant_deployment_pb.AssistantApiDeployment): void; - - clearAssistantconversationsList(): void; - getAssistantconversationsList(): Array; - setAssistantconversationsList(value: Array): void; - addAssistantconversations(value?: common_pb.AssistantConversation, index?: number): common_pb.AssistantConversation; - - clearAssistantwebhooksList(): void; - getAssistantwebhooksList(): Array; - setAssistantwebhooksList(value: Array): void; - addAssistantwebhooks(value?: assistant_webhook_pb.AssistantWebhook, index?: number): assistant_webhook_pb.AssistantWebhook; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Assistant.AsObject; - static toObject(includeInstance: boolean, msg: Assistant): Assistant.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Assistant, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Assistant; - static deserializeBinaryFromReader(message: Assistant, reader: jspb.BinaryReader): Assistant; -} - -export namespace Assistant { - export type AsObject = { - id: string, - status: string, - visibility: string, - source: string, - sourceidentifier: string, - assistanttoolsList: Array, - projectid: string, - organizationid: string, - assistantprovidermodelid: string, - assistantprovidermodel?: AssistantProviderModel.AsObject, - name: string, - description: string, - assistanttag?: common_pb.Tag.AsObject, - language: string, - organization?: common_pb.Organization.AsObject, - createdby: string, - createduser?: common_pb.User.AsObject, - updatedby: string, - updateduser?: common_pb.User.AsObject, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - debuggerdeployment?: assistant_deployment_pb.AssistantDebuggerDeployment.AsObject, - phonedeployment?: assistant_deployment_pb.AssistantPhoneDeployment.AsObject, - whatsappdeployment?: assistant_deployment_pb.AssistantWhatsappDeployment.AsObject, - webplugindeployment?: assistant_deployment_pb.AssistantWebpluginDeployment.AsObject, - apideployment?: assistant_deployment_pb.AssistantApiDeployment.AsObject, - assistantconversationsList: Array, - assistantwebhooksList: Array, - } -} - -export class AssistantProviderModel extends jspb.Message { - getId(): string; - setId(value: string): void; - - hasTemplate(): boolean; - clearTemplate(): void; - getTemplate(): common_pb.TextChatCompletePrompt | undefined; - setTemplate(value?: common_pb.TextChatCompletePrompt): void; - - getDescription(): string; - setDescription(value: string): void; - - getModelproviderid(): string; - setModelproviderid(value: string): void; - - getModelprovidername(): string; - setModelprovidername(value: string): void; - - clearAssistantmodeloptionsList(): void; - getAssistantmodeloptionsList(): Array; - setAssistantmodeloptionsList(value: Array): void; - addAssistantmodeloptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - getStatus(): string; - setStatus(value: string): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - hasCreateduser(): boolean; - clearCreateduser(): void; - getCreateduser(): common_pb.User | undefined; - setCreateduser(value?: common_pb.User): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - hasUpdateduser(): boolean; - clearUpdateduser(): void; - getUpdateduser(): common_pb.User | undefined; - setUpdateduser(value?: common_pb.User): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantProviderModel.AsObject; - static toObject(includeInstance: boolean, msg: AssistantProviderModel): AssistantProviderModel.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantProviderModel, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantProviderModel; - static deserializeBinaryFromReader(message: AssistantProviderModel, reader: jspb.BinaryReader): AssistantProviderModel; -} - -export namespace AssistantProviderModel { - export type AsObject = { - id: string, - template?: common_pb.TextChatCompletePrompt.AsObject, - description: string, - modelproviderid: string, - modelprovidername: string, - assistantmodeloptionsList: Array, - status: string, - createdby: string, - createduser?: common_pb.User.AsObject, - updatedby: string, - updateduser?: common_pb.User.AsObject, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class CreateAssistantRequest extends jspb.Message { - hasAssistantprovidermodel(): boolean; - clearAssistantprovidermodel(): void; - getAssistantprovidermodel(): CreateAssistantProviderModelRequest | undefined; - setAssistantprovidermodel(value?: CreateAssistantProviderModelRequest): void; - - clearAssistantknowledgesList(): void; - getAssistantknowledgesList(): Array; - setAssistantknowledgesList(value: Array): void; - addAssistantknowledges(value?: assistant_knowledge_pb.CreateAssistantKnowledgeRequest, index?: number): assistant_knowledge_pb.CreateAssistantKnowledgeRequest; - - clearAssistanttoolsList(): void; - getAssistanttoolsList(): Array; - setAssistanttoolsList(value: Array): void; - addAssistanttools(value?: assistant_tool_pb.CreateAssistantToolRequest, index?: number): assistant_tool_pb.CreateAssistantToolRequest; - - getDescription(): string; - setDescription(value: string): void; - - getVisibility(): string; - setVisibility(value: string): void; - - getLanguage(): string; - setLanguage(value: string): void; - - getSource(): string; - setSource(value: string): void; - - getSourceidentifier(): string; - setSourceidentifier(value: string): void; - - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value: string, index?: number): string; - - getName(): string; - setName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantRequest): CreateAssistantRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantRequest; - static deserializeBinaryFromReader(message: CreateAssistantRequest, reader: jspb.BinaryReader): CreateAssistantRequest; -} - -export namespace CreateAssistantRequest { - export type AsObject = { - assistantprovidermodel?: CreateAssistantProviderModelRequest.AsObject, - assistantknowledgesList: Array, - assistanttoolsList: Array, - description: string, - visibility: string, - language: string, - source: string, - sourceidentifier: string, - tagsList: Array, - name: string, - } -} - -export class CreateAssistantProviderModelRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - hasTemplate(): boolean; - clearTemplate(): void; - getTemplate(): common_pb.TextChatCompletePrompt | undefined; - setTemplate(value?: common_pb.TextChatCompletePrompt): void; - - getModelproviderid(): string; - setModelproviderid(value: string): void; - - getModelprovidername(): string; - setModelprovidername(value: string): void; - - clearAssistantmodeloptionsList(): void; - getAssistantmodeloptionsList(): Array; - setAssistantmodeloptionsList(value: Array): void; - addAssistantmodeloptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantProviderModelRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantProviderModelRequest): CreateAssistantProviderModelRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantProviderModelRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantProviderModelRequest; - static deserializeBinaryFromReader(message: CreateAssistantProviderModelRequest, reader: jspb.BinaryReader): CreateAssistantProviderModelRequest; -} - -export namespace CreateAssistantProviderModelRequest { - export type AsObject = { - assistantid: string, - description: string, - template?: common_pb.TextChatCompletePrompt.AsObject, - modelproviderid: string, - modelprovidername: string, - assistantmodeloptionsList: Array, - } -} - -export class GetAssistantProviderModelResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantProviderModel | undefined; - setData(value?: AssistantProviderModel): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantProviderModelResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantProviderModelResponse): GetAssistantProviderModelResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantProviderModelResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantProviderModelResponse; - static deserializeBinaryFromReader(message: GetAssistantProviderModelResponse, reader: jspb.BinaryReader): GetAssistantProviderModelResponse; -} - -export namespace GetAssistantProviderModelResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantProviderModel.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class CreateAssistantTagRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantTagRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantTagRequest): CreateAssistantTagRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantTagRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantTagRequest; - static deserializeBinaryFromReader(message: CreateAssistantTagRequest, reader: jspb.BinaryReader): CreateAssistantTagRequest; -} - -export namespace CreateAssistantTagRequest { - export type AsObject = { - assistantid: string, - tagsList: Array, - } -} - -export class GetAssistantRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - hasAssistantprovidermodelid(): boolean; - clearAssistantprovidermodelid(): void; - getAssistantprovidermodelid(): string; - setAssistantprovidermodelid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantRequest): GetAssistantRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantRequest; - static deserializeBinaryFromReader(message: GetAssistantRequest, reader: jspb.BinaryReader): GetAssistantRequest; -} - -export namespace GetAssistantRequest { - export type AsObject = { - id: string, - assistantprovidermodelid: string, - } -} - -export class DeleteAssistantRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteAssistantRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeleteAssistantRequest): DeleteAssistantRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteAssistantRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteAssistantRequest; - static deserializeBinaryFromReader(message: DeleteAssistantRequest, reader: jspb.BinaryReader): DeleteAssistantRequest; -} - -export namespace DeleteAssistantRequest { - export type AsObject = { - id: string, - } -} - -export class GetAssistantResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): Assistant | undefined; - setData(value?: Assistant): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantResponse): GetAssistantResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantResponse; - static deserializeBinaryFromReader(message: GetAssistantResponse, reader: jspb.BinaryReader): GetAssistantResponse; -} - -export namespace GetAssistantResponse { - export type AsObject = { - code: number, - success: boolean, - data?: Assistant.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAllAssistantRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantRequest): GetAllAssistantRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantRequest; - static deserializeBinaryFromReader(message: GetAllAssistantRequest, reader: jspb.BinaryReader): GetAllAssistantRequest; -} - -export namespace GetAllAssistantRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllAssistantResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: Assistant, index?: number): Assistant; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantResponse): GetAllAssistantResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantResponse; - static deserializeBinaryFromReader(message: GetAllAssistantResponse, reader: jspb.BinaryReader): GetAllAssistantResponse; -} - -export namespace GetAllAssistantResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class GetAllAssistantProviderModelRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - getAssistantid(): string; - setAssistantid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantProviderModelRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantProviderModelRequest): GetAllAssistantProviderModelRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantProviderModelRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantProviderModelRequest; - static deserializeBinaryFromReader(message: GetAllAssistantProviderModelRequest, reader: jspb.BinaryReader): GetAllAssistantProviderModelRequest; -} - -export namespace GetAllAssistantProviderModelRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - assistantid: string, - } -} - -export class GetAllAssistantProviderModelResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: AssistantProviderModel, index?: number): AssistantProviderModel; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantProviderModelResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantProviderModelResponse): GetAllAssistantProviderModelResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantProviderModelResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantProviderModelResponse; - static deserializeBinaryFromReader(message: GetAllAssistantProviderModelResponse, reader: jspb.BinaryReader): GetAllAssistantProviderModelResponse; -} - -export namespace GetAllAssistantProviderModelResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class GetAllAssistantMessageRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - getAssistantid(): string; - setAssistantid(value: string): void; - - hasOrder(): boolean; - clearOrder(): void; - getOrder(): common_pb.Ordering | undefined; - setOrder(value?: common_pb.Ordering): void; - - clearSelectorsList(): void; - getSelectorsList(): Array; - setSelectorsList(value: Array): void; - addSelectors(value?: common_pb.FieldSelector, index?: number): common_pb.FieldSelector; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantMessageRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantMessageRequest): GetAllAssistantMessageRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantMessageRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantMessageRequest; - static deserializeBinaryFromReader(message: GetAllAssistantMessageRequest, reader: jspb.BinaryReader): GetAllAssistantMessageRequest; -} - -export namespace GetAllAssistantMessageRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - assistantid: string, - order?: common_pb.Ordering.AsObject, - selectorsList: Array, - } -} - -export class GetAllAssistantMessageResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.AssistantConversationMessage, index?: number): common_pb.AssistantConversationMessage; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantMessageResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantMessageResponse): GetAllAssistantMessageResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantMessageResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantMessageResponse; - static deserializeBinaryFromReader(message: GetAllAssistantMessageResponse, reader: jspb.BinaryReader): GetAllAssistantMessageResponse; -} - -export namespace GetAllAssistantMessageResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class GetAllMessageRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - hasOrder(): boolean; - clearOrder(): void; - getOrder(): common_pb.Ordering | undefined; - setOrder(value?: common_pb.Ordering): void; - - clearSelectorsList(): void; - getSelectorsList(): Array; - setSelectorsList(value: Array): void; - addSelectors(value?: common_pb.FieldSelector, index?: number): common_pb.FieldSelector; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllMessageRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllMessageRequest): GetAllMessageRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllMessageRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllMessageRequest; - static deserializeBinaryFromReader(message: GetAllMessageRequest, reader: jspb.BinaryReader): GetAllMessageRequest; -} - -export namespace GetAllMessageRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - order?: common_pb.Ordering.AsObject, - selectorsList: Array, - } -} - -export class GetAllMessageResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.AssistantConversationMessage, index?: number): common_pb.AssistantConversationMessage; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllMessageResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllMessageResponse): GetAllMessageResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllMessageResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllMessageResponse; - static deserializeBinaryFromReader(message: GetAllMessageResponse, reader: jspb.BinaryReader): GetAllMessageResponse; -} - -export namespace GetAllMessageResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class UpdateAssistantVersionRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - getAssistantprovidermodelid(): string; - setAssistantprovidermodelid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateAssistantVersionRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateAssistantVersionRequest): UpdateAssistantVersionRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateAssistantVersionRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateAssistantVersionRequest; - static deserializeBinaryFromReader(message: UpdateAssistantVersionRequest, reader: jspb.BinaryReader): UpdateAssistantVersionRequest; -} - -export namespace UpdateAssistantVersionRequest { - export type AsObject = { - assistantid: string, - assistantprovidermodelid: string, - } -} - -export class UpdateAssistantDetailRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateAssistantDetailRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateAssistantDetailRequest): UpdateAssistantDetailRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateAssistantDetailRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateAssistantDetailRequest; - static deserializeBinaryFromReader(message: UpdateAssistantDetailRequest, reader: jspb.BinaryReader): UpdateAssistantDetailRequest; -} - -export namespace UpdateAssistantDetailRequest { - export type AsObject = { - assistantid: string, - name: string, - description: string, - } -} - -export class GetAllAssistantUserConversationRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - getSource(): common_pb.SourceMap[keyof common_pb.SourceMap]; - setSource(value: common_pb.SourceMap[keyof common_pb.SourceMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantUserConversationRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantUserConversationRequest): GetAllAssistantUserConversationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantUserConversationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantUserConversationRequest; - static deserializeBinaryFromReader(message: GetAllAssistantUserConversationRequest, reader: jspb.BinaryReader): GetAllAssistantUserConversationRequest; -} - -export namespace GetAllAssistantUserConversationRequest { - export type AsObject = { - assistantid: string, - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - source: common_pb.SourceMap[keyof common_pb.SourceMap], - } -} - -export class GetAllAssistantUserConversationResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.AssistantConversation, index?: number): common_pb.AssistantConversation; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantUserConversationResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantUserConversationResponse): GetAllAssistantUserConversationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantUserConversationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantUserConversationResponse; - static deserializeBinaryFromReader(message: GetAllAssistantUserConversationResponse, reader: jspb.BinaryReader): GetAllAssistantUserConversationResponse; -} - -export namespace GetAllAssistantUserConversationResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class GetAssistantConversationRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - getConversationid(): string; - setConversationid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - clearSelectorsList(): void; - getSelectorsList(): Array; - setSelectorsList(value: Array): void; - addSelectors(value?: common_pb.FieldSelector, index?: number): common_pb.FieldSelector; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantConversationRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantConversationRequest): GetAssistantConversationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantConversationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantConversationRequest; - static deserializeBinaryFromReader(message: GetAssistantConversationRequest, reader: jspb.BinaryReader): GetAssistantConversationRequest; -} - -export namespace GetAssistantConversationRequest { - export type AsObject = { - assistantid: string, - conversationid: string, - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - selectorsList: Array, - } -} - -export class GetAssistantConversationResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): common_pb.AssistantConversation | undefined; - setData(value?: common_pb.AssistantConversation): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantConversationResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantConversationResponse): GetAssistantConversationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantConversationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantConversationResponse; - static deserializeBinaryFromReader(message: GetAssistantConversationResponse, reader: jspb.BinaryReader): GetAssistantConversationResponse; -} - -export namespace GetAssistantConversationResponse { - export type AsObject = { - code: number, - success: boolean, - data?: common_pb.AssistantConversation.AsObject, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - diff --git a/src/clients/protos/assistant-api_pb.js b/src/clients/protos/assistant-api_pb.js index e69a5b9..4de6e50 100644 --- a/src/clients/protos/assistant-api_pb.js +++ b/src/clients/protos/assistant-api_pb.js @@ -7625,7 +7625,7 @@ proto.assistant_api.GetAllAssistantUserConversationResponse.prototype.hasPaginat * @private {!Array} * @const */ -proto.assistant_api.GetAssistantConversationRequest.repeatedFields_ = [4,5]; +proto.assistant_api.GetAssistantConversationRequest.repeatedFields_ = [5]; @@ -7659,10 +7659,7 @@ proto.assistant_api.GetAssistantConversationRequest.prototype.toObject = functio proto.assistant_api.GetAssistantConversationRequest.toObject = function(includeInstance, msg) { var f, obj = { assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"), - conversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), - paginate: (f = msg.getPaginate()) && common_pb.Paginate.toObject(includeInstance, f), - criteriasList: jspb.Message.toObjectList(msg.getCriteriasList(), - common_pb.Criteria.toObject, includeInstance), + assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), selectorsList: jspb.Message.toObjectList(msg.getSelectorsList(), common_pb.FieldSelector.toObject, includeInstance) }; @@ -7707,17 +7704,7 @@ proto.assistant_api.GetAssistantConversationRequest.deserializeBinaryFromReader break; case 2: var value = /** @type {string} */ (reader.readUint64String()); - msg.setConversationid(value); - break; - case 3: - var value = new common_pb.Paginate; - reader.readMessage(value,common_pb.Paginate.deserializeBinaryFromReader); - msg.setPaginate(value); - break; - case 4: - var value = new common_pb.Criteria; - reader.readMessage(value,common_pb.Criteria.deserializeBinaryFromReader); - msg.addCriterias(value); + msg.setAssistantconversationid(value); break; case 5: var value = new common_pb.FieldSelector; @@ -7760,29 +7747,13 @@ proto.assistant_api.GetAssistantConversationRequest.serializeBinaryToWriter = fu f ); } - f = message.getConversationid(); + f = message.getAssistantconversationid(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( 2, f ); } - f = message.getPaginate(); - if (f != null) { - writer.writeMessage( - 3, - f, - common_pb.Paginate.serializeBinaryToWriter - ); - } - f = message.getCriteriasList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - common_pb.Criteria.serializeBinaryToWriter - ); - } f = message.getSelectorsList(); if (f.length > 0) { writer.writeRepeatedMessage( @@ -7813,10 +7784,10 @@ proto.assistant_api.GetAssistantConversationRequest.prototype.setAssistantid = f /** - * optional uint64 conversationId = 2; + * optional uint64 assistantConversationId = 2; * @return {string} */ -proto.assistant_api.GetAssistantConversationRequest.prototype.getConversationid = function() { +proto.assistant_api.GetAssistantConversationRequest.prototype.getAssistantconversationid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; @@ -7825,86 +7796,11 @@ proto.assistant_api.GetAssistantConversationRequest.prototype.getConversationid * @param {string} value * @return {!proto.assistant_api.GetAssistantConversationRequest} returns this */ -proto.assistant_api.GetAssistantConversationRequest.prototype.setConversationid = function(value) { +proto.assistant_api.GetAssistantConversationRequest.prototype.setAssistantconversationid = function(value) { return jspb.Message.setProto3StringIntField(this, 2, value); }; -/** - * optional Paginate paginate = 3; - * @return {?proto.Paginate} - */ -proto.assistant_api.GetAssistantConversationRequest.prototype.getPaginate = function() { - return /** @type{?proto.Paginate} */ ( - jspb.Message.getWrapperField(this, common_pb.Paginate, 3)); -}; - - -/** - * @param {?proto.Paginate|undefined} value - * @return {!proto.assistant_api.GetAssistantConversationRequest} returns this -*/ -proto.assistant_api.GetAssistantConversationRequest.prototype.setPaginate = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.assistant_api.GetAssistantConversationRequest} returns this - */ -proto.assistant_api.GetAssistantConversationRequest.prototype.clearPaginate = function() { - return this.setPaginate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.assistant_api.GetAssistantConversationRequest.prototype.hasPaginate = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * repeated Criteria criterias = 4; - * @return {!Array} - */ -proto.assistant_api.GetAssistantConversationRequest.prototype.getCriteriasList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, common_pb.Criteria, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.assistant_api.GetAssistantConversationRequest} returns this -*/ -proto.assistant_api.GetAssistantConversationRequest.prototype.setCriteriasList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.Criteria=} opt_value - * @param {number=} opt_index - * @return {!proto.Criteria} - */ -proto.assistant_api.GetAssistantConversationRequest.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.assistant_api.GetAssistantConversationRequest} returns this - */ -proto.assistant_api.GetAssistantConversationRequest.prototype.clearCriteriasList = function() { - return this.setCriteriasList([]); -}; - - /** * repeated FieldSelector selectors = 5; * @return {!Array} @@ -7978,8 +7874,7 @@ proto.assistant_api.GetAssistantConversationResponse.toObject = function(include 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), - paginated: (f = msg.getPaginated()) && common_pb.Paginated.toObject(includeInstance, f) + error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f) }; if (includeInstance) { @@ -8034,11 +7929,6 @@ proto.assistant_api.GetAssistantConversationResponse.deserializeBinaryFromReader reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); msg.setError(value); break; - case 5: - var value = new common_pb.Paginated; - reader.readMessage(value,common_pb.Paginated.deserializeBinaryFromReader); - msg.setPaginated(value); - break; default: reader.skipField(); break; @@ -8098,14 +7988,6 @@ proto.assistant_api.GetAssistantConversationResponse.serializeBinaryToWriter = f common_pb.Error.serializeBinaryToWriter ); } - f = message.getPaginated(); - if (f != null) { - writer.writeMessage( - 5, - f, - common_pb.Paginated.serializeBinaryToWriter - ); - } }; @@ -8219,41 +8101,4 @@ proto.assistant_api.GetAssistantConversationResponse.prototype.hasError = functi }; -/** - * optional Paginated paginated = 5; - * @return {?proto.Paginated} - */ -proto.assistant_api.GetAssistantConversationResponse.prototype.getPaginated = function() { - return /** @type{?proto.Paginated} */ ( - jspb.Message.getWrapperField(this, common_pb.Paginated, 5)); -}; - - -/** - * @param {?proto.Paginated|undefined} value - * @return {!proto.assistant_api.GetAssistantConversationResponse} returns this -*/ -proto.assistant_api.GetAssistantConversationResponse.prototype.setPaginated = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.assistant_api.GetAssistantConversationResponse} returns this - */ -proto.assistant_api.GetAssistantConversationResponse.prototype.clearPaginated = function() { - return this.setPaginated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.assistant_api.GetAssistantConversationResponse.prototype.hasPaginated = function() { - return jspb.Message.getField(this, 5) != null; -}; - - goog.object.extend(exports, proto.assistant_api); diff --git a/src/clients/protos/assistant-deployment.ts b/src/clients/protos/assistant-deployment.ts new file mode 100644 index 0000000..8722148 --- /dev/null +++ b/src/clients/protos/assistant-deployment.ts @@ -0,0 +1,3395 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: assistant-deployment.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./common"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace assistant_api { + export class DeploymentAudioProvider extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + audioProvider?: string; + audioOptions?: dependency_2.Metadata[]; + audioProviderId?: string; + status?: string; + audioType?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("audioProvider" in data && data.audioProvider != undefined) { + this.audioProvider = data.audioProvider; + } + if ("audioOptions" in data && data.audioOptions != undefined) { + this.audioOptions = data.audioOptions; + } + if ("audioProviderId" in data && data.audioProviderId != undefined) { + this.audioProviderId = data.audioProviderId; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("audioType" in data && data.audioType != undefined) { + this.audioType = data.audioType; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get audioProvider() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set audioProvider(value: string) { + pb_1.Message.setField(this, 2, value); + } + get audioOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 3) as dependency_2.Metadata[]; + } + set audioOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get audioProviderId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set audioProviderId(value: string) { + pb_1.Message.setField(this, 4, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 5, value); + } + get audioType() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set audioType(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + id?: string; + audioProvider?: string; + audioOptions?: ReturnType[]; + audioProviderId?: string; + status?: string; + audioType?: string; + }): DeploymentAudioProvider { + const message = new DeploymentAudioProvider({}); + if (data.id != null) { + message.id = data.id; + } + if (data.audioProvider != null) { + message.audioProvider = data.audioProvider; + } + if (data.audioOptions != null) { + message.audioOptions = data.audioOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + if (data.audioProviderId != null) { + message.audioProviderId = data.audioProviderId; + } + if (data.status != null) { + message.status = data.status; + } + if (data.audioType != null) { + message.audioType = data.audioType; + } + return message; + } + toObject() { + const data: { + id?: string; + audioProvider?: string; + audioOptions?: ReturnType[]; + audioProviderId?: string; + status?: string; + audioType?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.audioProvider != null) { + data.audioProvider = this.audioProvider; + } + if (this.audioOptions != null) { + data.audioOptions = this.audioOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + if (this.audioProviderId != null) { + data.audioProviderId = this.audioProviderId; + } + if (this.status != null) { + data.status = this.status; + } + if (this.audioType != null) { + data.audioType = this.audioType; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.audioProvider.length) + writer.writeString(2, this.audioProvider); + if (this.audioOptions.length) + writer.writeRepeatedMessage(3, this.audioOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (this.audioProviderId != "0") + writer.writeUint64String(4, this.audioProviderId); + if (this.status.length) + writer.writeString(5, this.status); + if (this.audioType.length) + writer.writeString(6, this.audioType); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeploymentAudioProvider { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeploymentAudioProvider(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.audioProvider = reader.readString(); + break; + case 3: + reader.readMessage(message.audioOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + case 4: + message.audioProviderId = reader.readUint64String(); + break; + case 5: + message.status = reader.readString(); + break; + case 6: + message.audioType = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DeploymentAudioProvider { + return DeploymentAudioProvider.deserialize(bytes); + } + } + export class AssistantWebpluginDeployment extends pb_1.Message { + #one_of_decls: number[][] = [[15, 16], [10], [11], [12]]; + constructor(data?: any[] | ({ + id?: string; + assistantId?: string; + name?: string; + inputAudio?: DeploymentAudioProvider; + outputAudio?: DeploymentAudioProvider; + suggestion?: string[]; + helpCenterEnabled?: boolean; + productCatalogEnabled?: boolean; + articleCatalogEnabled?: boolean; + uploadFileEnabled?: boolean; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + status?: string; + } & (({ + url?: string; + raw?: never; + } | { + url?: never; + raw?: dependency_2.Content; + }) | ({ + greeting?: string; + }) | ({ + mistake?: string; + }) | ({ + ending?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [20], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("greeting" in data && data.greeting != undefined) { + this.greeting = data.greeting; + } + if ("mistake" in data && data.mistake != undefined) { + this.mistake = data.mistake; + } + if ("ending" in data && data.ending != undefined) { + this.ending = data.ending; + } + if ("inputAudio" in data && data.inputAudio != undefined) { + this.inputAudio = data.inputAudio; + } + if ("outputAudio" in data && data.outputAudio != undefined) { + this.outputAudio = data.outputAudio; + } + if ("url" in data && data.url != undefined) { + this.url = data.url; + } + if ("raw" in data && data.raw != undefined) { + this.raw = data.raw; + } + if ("suggestion" in data && data.suggestion != undefined) { + this.suggestion = data.suggestion; + } + if ("helpCenterEnabled" in data && data.helpCenterEnabled != undefined) { + this.helpCenterEnabled = data.helpCenterEnabled; + } + if ("productCatalogEnabled" in data && data.productCatalogEnabled != undefined) { + this.productCatalogEnabled = data.productCatalogEnabled; + } + if ("articleCatalogEnabled" in data && data.articleCatalogEnabled != undefined) { + this.articleCatalogEnabled = data.articleCatalogEnabled; + } + if ("uploadFileEnabled" in data && data.uploadFileEnabled != undefined) { + this.uploadFileEnabled = data.uploadFileEnabled; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 5, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 6, value); + } + get greeting() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set greeting(value: string) { + pb_1.Message.setOneofField(this, 10, this.#one_of_decls[1], value); + } + get has_greeting() { + return pb_1.Message.getField(this, 10) != null; + } + get mistake() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set mistake(value: string) { + pb_1.Message.setOneofField(this, 11, this.#one_of_decls[2], value); + } + get has_mistake() { + return pb_1.Message.getField(this, 11) != null; + } + get ending() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set ending(value: string) { + pb_1.Message.setOneofField(this, 12, this.#one_of_decls[3], value); + } + get has_ending() { + return pb_1.Message.getField(this, 12) != null; + } + get inputAudio() { + return pb_1.Message.getWrapperField(this, DeploymentAudioProvider, 13) as DeploymentAudioProvider; + } + set inputAudio(value: DeploymentAudioProvider) { + pb_1.Message.setWrapperField(this, 13, value); + } + get has_inputAudio() { + return pb_1.Message.getField(this, 13) != null; + } + get outputAudio() { + return pb_1.Message.getWrapperField(this, DeploymentAudioProvider, 14) as DeploymentAudioProvider; + } + set outputAudio(value: DeploymentAudioProvider) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_outputAudio() { + return pb_1.Message.getField(this, 14) != null; + } + get url() { + return pb_1.Message.getFieldWithDefault(this, 15, "") as string; + } + set url(value: string) { + pb_1.Message.setOneofField(this, 15, this.#one_of_decls[0], value); + } + get has_url() { + return pb_1.Message.getField(this, 15) != null; + } + get raw() { + return pb_1.Message.getWrapperField(this, dependency_2.Content, 16) as dependency_2.Content; + } + set raw(value: dependency_2.Content) { + pb_1.Message.setOneofWrapperField(this, 16, this.#one_of_decls[0], value); + } + get has_raw() { + return pb_1.Message.getField(this, 16) != null; + } + get suggestion() { + return pb_1.Message.getFieldWithDefault(this, 20, []) as string[]; + } + set suggestion(value: string[]) { + pb_1.Message.setField(this, 20, value); + } + get helpCenterEnabled() { + return pb_1.Message.getFieldWithDefault(this, 21, false) as boolean; + } + set helpCenterEnabled(value: boolean) { + pb_1.Message.setField(this, 21, value); + } + get productCatalogEnabled() { + return pb_1.Message.getFieldWithDefault(this, 22, false) as boolean; + } + set productCatalogEnabled(value: boolean) { + pb_1.Message.setField(this, 22, value); + } + get articleCatalogEnabled() { + return pb_1.Message.getFieldWithDefault(this, 23, false) as boolean; + } + set articleCatalogEnabled(value: boolean) { + pb_1.Message.setField(this, 23, value); + } + get uploadFileEnabled() { + return pb_1.Message.getFieldWithDefault(this, 24, false) as boolean; + } + set uploadFileEnabled(value: boolean) { + pb_1.Message.setField(this, 24, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 28, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 28, value); + } + get icon() { + const cases: { + [index: number]: "none" | "url" | "raw"; + } = { + 0: "none", + 15: "url", + 16: "raw" + }; + return cases[pb_1.Message.computeOneofCase(this, [15, 16])]; + } + get _greeting() { + const cases: { + [index: number]: "none" | "greeting"; + } = { + 0: "none", + 10: "greeting" + }; + return cases[pb_1.Message.computeOneofCase(this, [10])]; + } + get _mistake() { + const cases: { + [index: number]: "none" | "mistake"; + } = { + 0: "none", + 11: "mistake" + }; + return cases[pb_1.Message.computeOneofCase(this, [11])]; + } + get _ending() { + const cases: { + [index: number]: "none" | "ending"; + } = { + 0: "none", + 12: "ending" + }; + return cases[pb_1.Message.computeOneofCase(this, [12])]; + } + static fromObject(data: { + id?: string; + assistantId?: string; + name?: string; + greeting?: string; + mistake?: string; + ending?: string; + inputAudio?: ReturnType; + outputAudio?: ReturnType; + url?: string; + raw?: ReturnType; + suggestion?: string[]; + helpCenterEnabled?: boolean; + productCatalogEnabled?: boolean; + articleCatalogEnabled?: boolean; + uploadFileEnabled?: boolean; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + }): AssistantWebpluginDeployment { + const message = new AssistantWebpluginDeployment({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.greeting != null) { + message.greeting = data.greeting; + } + if (data.mistake != null) { + message.mistake = data.mistake; + } + if (data.ending != null) { + message.ending = data.ending; + } + if (data.inputAudio != null) { + message.inputAudio = DeploymentAudioProvider.fromObject(data.inputAudio); + } + if (data.outputAudio != null) { + message.outputAudio = DeploymentAudioProvider.fromObject(data.outputAudio); + } + if (data.url != null) { + message.url = data.url; + } + if (data.raw != null) { + message.raw = dependency_2.Content.fromObject(data.raw); + } + if (data.suggestion != null) { + message.suggestion = data.suggestion; + } + if (data.helpCenterEnabled != null) { + message.helpCenterEnabled = data.helpCenterEnabled; + } + if (data.productCatalogEnabled != null) { + message.productCatalogEnabled = data.productCatalogEnabled; + } + if (data.articleCatalogEnabled != null) { + message.articleCatalogEnabled = data.articleCatalogEnabled; + } + if (data.uploadFileEnabled != null) { + message.uploadFileEnabled = data.uploadFileEnabled; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + name?: string; + greeting?: string; + mistake?: string; + ending?: string; + inputAudio?: ReturnType; + outputAudio?: ReturnType; + url?: string; + raw?: ReturnType; + suggestion?: string[]; + helpCenterEnabled?: boolean; + productCatalogEnabled?: boolean; + articleCatalogEnabled?: boolean; + uploadFileEnabled?: boolean; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.greeting != null) { + data.greeting = this.greeting; + } + if (this.mistake != null) { + data.mistake = this.mistake; + } + if (this.ending != null) { + data.ending = this.ending; + } + if (this.inputAudio != null) { + data.inputAudio = this.inputAudio.toObject(); + } + if (this.outputAudio != null) { + data.outputAudio = this.outputAudio.toObject(); + } + if (this.url != null) { + data.url = this.url; + } + if (this.raw != null) { + data.raw = this.raw.toObject(); + } + if (this.suggestion != null) { + data.suggestion = this.suggestion; + } + if (this.helpCenterEnabled != null) { + data.helpCenterEnabled = this.helpCenterEnabled; + } + if (this.productCatalogEnabled != null) { + data.productCatalogEnabled = this.productCatalogEnabled; + } + if (this.articleCatalogEnabled != null) { + data.articleCatalogEnabled = this.articleCatalogEnabled; + } + if (this.uploadFileEnabled != null) { + data.uploadFileEnabled = this.uploadFileEnabled; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(5, this.assistantId); + if (this.name.length) + writer.writeString(6, this.name); + if (this.has_greeting) + writer.writeString(10, this.greeting); + if (this.has_mistake) + writer.writeString(11, this.mistake); + if (this.has_ending) + writer.writeString(12, this.ending); + if (this.has_inputAudio) + writer.writeMessage(13, this.inputAudio, () => this.inputAudio.serialize(writer)); + if (this.has_outputAudio) + writer.writeMessage(14, this.outputAudio, () => this.outputAudio.serialize(writer)); + if (this.has_url) + writer.writeString(15, this.url); + if (this.has_raw) + writer.writeMessage(16, this.raw, () => this.raw.serialize(writer)); + if (this.suggestion.length) + writer.writeRepeatedString(20, this.suggestion); + if (this.helpCenterEnabled != false) + writer.writeBool(21, this.helpCenterEnabled); + if (this.productCatalogEnabled != false) + writer.writeBool(22, this.productCatalogEnabled); + if (this.articleCatalogEnabled != false) + writer.writeBool(23, this.articleCatalogEnabled); + if (this.uploadFileEnabled != false) + writer.writeBool(24, this.uploadFileEnabled); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.status.length) + writer.writeString(28, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantWebpluginDeployment { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantWebpluginDeployment(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 5: + message.assistantId = reader.readUint64String(); + break; + case 6: + message.name = reader.readString(); + break; + case 10: + message.greeting = reader.readString(); + break; + case 11: + message.mistake = reader.readString(); + break; + case 12: + message.ending = reader.readString(); + break; + case 13: + reader.readMessage(message.inputAudio, () => message.inputAudio = DeploymentAudioProvider.deserialize(reader)); + break; + case 14: + reader.readMessage(message.outputAudio, () => message.outputAudio = DeploymentAudioProvider.deserialize(reader)); + break; + case 15: + message.url = reader.readString(); + break; + case 16: + reader.readMessage(message.raw, () => message.raw = dependency_2.Content.deserialize(reader)); + break; + case 20: + pb_1.Message.addToRepeatedField(message, 20, reader.readString()); + break; + case 21: + message.helpCenterEnabled = reader.readBool(); + break; + case 22: + message.productCatalogEnabled = reader.readBool(); + break; + case 23: + message.articleCatalogEnabled = reader.readBool(); + break; + case 24: + message.uploadFileEnabled = reader.readBool(); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 28: + message.status = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantWebpluginDeployment { + return AssistantWebpluginDeployment.deserialize(bytes); + } + } + export class AssistantPhoneDeployment extends pb_1.Message { + #one_of_decls: number[][] = [[10], [11], [12]]; + constructor(data?: any[] | ({ + id?: string; + assistantId?: string; + inputAudio?: DeploymentAudioProvider; + outputAudio?: DeploymentAudioProvider; + phoneProviderName?: string; + phoneProviderId?: string; + phoneOptions?: dependency_2.Metadata[]; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + status?: string; + } & (({ + greeting?: string; + }) | ({ + mistake?: string; + }) | ({ + ending?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [17], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("greeting" in data && data.greeting != undefined) { + this.greeting = data.greeting; + } + if ("mistake" in data && data.mistake != undefined) { + this.mistake = data.mistake; + } + if ("ending" in data && data.ending != undefined) { + this.ending = data.ending; + } + if ("inputAudio" in data && data.inputAudio != undefined) { + this.inputAudio = data.inputAudio; + } + if ("outputAudio" in data && data.outputAudio != undefined) { + this.outputAudio = data.outputAudio; + } + if ("phoneProviderName" in data && data.phoneProviderName != undefined) { + this.phoneProviderName = data.phoneProviderName; + } + if ("phoneProviderId" in data && data.phoneProviderId != undefined) { + this.phoneProviderId = data.phoneProviderId; + } + if ("phoneOptions" in data && data.phoneOptions != undefined) { + this.phoneOptions = data.phoneOptions; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 5, value); + } + get greeting() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set greeting(value: string) { + pb_1.Message.setOneofField(this, 10, this.#one_of_decls[0], value); + } + get has_greeting() { + return pb_1.Message.getField(this, 10) != null; + } + get mistake() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set mistake(value: string) { + pb_1.Message.setOneofField(this, 11, this.#one_of_decls[1], value); + } + get has_mistake() { + return pb_1.Message.getField(this, 11) != null; + } + get ending() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set ending(value: string) { + pb_1.Message.setOneofField(this, 12, this.#one_of_decls[2], value); + } + get has_ending() { + return pb_1.Message.getField(this, 12) != null; + } + get inputAudio() { + return pb_1.Message.getWrapperField(this, DeploymentAudioProvider, 13) as DeploymentAudioProvider; + } + set inputAudio(value: DeploymentAudioProvider) { + pb_1.Message.setWrapperField(this, 13, value); + } + get has_inputAudio() { + return pb_1.Message.getField(this, 13) != null; + } + get outputAudio() { + return pb_1.Message.getWrapperField(this, DeploymentAudioProvider, 14) as DeploymentAudioProvider; + } + set outputAudio(value: DeploymentAudioProvider) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_outputAudio() { + return pb_1.Message.getField(this, 14) != null; + } + get phoneProviderName() { + return pb_1.Message.getFieldWithDefault(this, 15, "") as string; + } + set phoneProviderName(value: string) { + pb_1.Message.setField(this, 15, value); + } + get phoneProviderId() { + return pb_1.Message.getFieldWithDefault(this, 16, "0") as string; + } + set phoneProviderId(value: string) { + pb_1.Message.setField(this, 16, value); + } + get phoneOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 17) as dependency_2.Metadata[]; + } + set phoneOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 17, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 28, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 28, value); + } + get _greeting() { + const cases: { + [index: number]: "none" | "greeting"; + } = { + 0: "none", + 10: "greeting" + }; + return cases[pb_1.Message.computeOneofCase(this, [10])]; + } + get _mistake() { + const cases: { + [index: number]: "none" | "mistake"; + } = { + 0: "none", + 11: "mistake" + }; + return cases[pb_1.Message.computeOneofCase(this, [11])]; + } + get _ending() { + const cases: { + [index: number]: "none" | "ending"; + } = { + 0: "none", + 12: "ending" + }; + return cases[pb_1.Message.computeOneofCase(this, [12])]; + } + static fromObject(data: { + id?: string; + assistantId?: string; + greeting?: string; + mistake?: string; + ending?: string; + inputAudio?: ReturnType; + outputAudio?: ReturnType; + phoneProviderName?: string; + phoneProviderId?: string; + phoneOptions?: ReturnType[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + }): AssistantPhoneDeployment { + const message = new AssistantPhoneDeployment({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.greeting != null) { + message.greeting = data.greeting; + } + if (data.mistake != null) { + message.mistake = data.mistake; + } + if (data.ending != null) { + message.ending = data.ending; + } + if (data.inputAudio != null) { + message.inputAudio = DeploymentAudioProvider.fromObject(data.inputAudio); + } + if (data.outputAudio != null) { + message.outputAudio = DeploymentAudioProvider.fromObject(data.outputAudio); + } + if (data.phoneProviderName != null) { + message.phoneProviderName = data.phoneProviderName; + } + if (data.phoneProviderId != null) { + message.phoneProviderId = data.phoneProviderId; + } + if (data.phoneOptions != null) { + message.phoneOptions = data.phoneOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + greeting?: string; + mistake?: string; + ending?: string; + inputAudio?: ReturnType; + outputAudio?: ReturnType; + phoneProviderName?: string; + phoneProviderId?: string; + phoneOptions?: ReturnType[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.greeting != null) { + data.greeting = this.greeting; + } + if (this.mistake != null) { + data.mistake = this.mistake; + } + if (this.ending != null) { + data.ending = this.ending; + } + if (this.inputAudio != null) { + data.inputAudio = this.inputAudio.toObject(); + } + if (this.outputAudio != null) { + data.outputAudio = this.outputAudio.toObject(); + } + if (this.phoneProviderName != null) { + data.phoneProviderName = this.phoneProviderName; + } + if (this.phoneProviderId != null) { + data.phoneProviderId = this.phoneProviderId; + } + if (this.phoneOptions != null) { + data.phoneOptions = this.phoneOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(5, this.assistantId); + if (this.has_greeting) + writer.writeString(10, this.greeting); + if (this.has_mistake) + writer.writeString(11, this.mistake); + if (this.has_ending) + writer.writeString(12, this.ending); + if (this.has_inputAudio) + writer.writeMessage(13, this.inputAudio, () => this.inputAudio.serialize(writer)); + if (this.has_outputAudio) + writer.writeMessage(14, this.outputAudio, () => this.outputAudio.serialize(writer)); + if (this.phoneProviderName.length) + writer.writeString(15, this.phoneProviderName); + if (this.phoneProviderId != "0") + writer.writeUint64String(16, this.phoneProviderId); + if (this.phoneOptions.length) + writer.writeRepeatedMessage(17, this.phoneOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.status.length) + writer.writeString(28, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantPhoneDeployment { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantPhoneDeployment(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 5: + message.assistantId = reader.readUint64String(); + break; + case 10: + message.greeting = reader.readString(); + break; + case 11: + message.mistake = reader.readString(); + break; + case 12: + message.ending = reader.readString(); + break; + case 13: + reader.readMessage(message.inputAudio, () => message.inputAudio = DeploymentAudioProvider.deserialize(reader)); + break; + case 14: + reader.readMessage(message.outputAudio, () => message.outputAudio = DeploymentAudioProvider.deserialize(reader)); + break; + case 15: + message.phoneProviderName = reader.readString(); + break; + case 16: + message.phoneProviderId = reader.readUint64String(); + break; + case 17: + reader.readMessage(message.phoneOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 17, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 28: + message.status = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantPhoneDeployment { + return AssistantPhoneDeployment.deserialize(bytes); + } + } + export class AssistantWhatsappDeployment extends pb_1.Message { + #one_of_decls: number[][] = [[10], [11], [12]]; + constructor(data?: any[] | ({ + id?: string; + assistantId?: string; + name?: string; + whatsappProviderName?: string; + whatsappProviderId?: string; + whatsappOptions?: dependency_2.Metadata[]; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + status?: string; + } & (({ + greeting?: string; + }) | ({ + mistake?: string; + }) | ({ + ending?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [17], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("greeting" in data && data.greeting != undefined) { + this.greeting = data.greeting; + } + if ("mistake" in data && data.mistake != undefined) { + this.mistake = data.mistake; + } + if ("ending" in data && data.ending != undefined) { + this.ending = data.ending; + } + if ("whatsappProviderName" in data && data.whatsappProviderName != undefined) { + this.whatsappProviderName = data.whatsappProviderName; + } + if ("whatsappProviderId" in data && data.whatsappProviderId != undefined) { + this.whatsappProviderId = data.whatsappProviderId; + } + if ("whatsappOptions" in data && data.whatsappOptions != undefined) { + this.whatsappOptions = data.whatsappOptions; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 5, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 6, value); + } + get greeting() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set greeting(value: string) { + pb_1.Message.setOneofField(this, 10, this.#one_of_decls[0], value); + } + get has_greeting() { + return pb_1.Message.getField(this, 10) != null; + } + get mistake() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set mistake(value: string) { + pb_1.Message.setOneofField(this, 11, this.#one_of_decls[1], value); + } + get has_mistake() { + return pb_1.Message.getField(this, 11) != null; + } + get ending() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set ending(value: string) { + pb_1.Message.setOneofField(this, 12, this.#one_of_decls[2], value); + } + get has_ending() { + return pb_1.Message.getField(this, 12) != null; + } + get whatsappProviderName() { + return pb_1.Message.getFieldWithDefault(this, 15, "") as string; + } + set whatsappProviderName(value: string) { + pb_1.Message.setField(this, 15, value); + } + get whatsappProviderId() { + return pb_1.Message.getFieldWithDefault(this, 16, "0") as string; + } + set whatsappProviderId(value: string) { + pb_1.Message.setField(this, 16, value); + } + get whatsappOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 17) as dependency_2.Metadata[]; + } + set whatsappOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 17, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 28, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 28, value); + } + get _greeting() { + const cases: { + [index: number]: "none" | "greeting"; + } = { + 0: "none", + 10: "greeting" + }; + return cases[pb_1.Message.computeOneofCase(this, [10])]; + } + get _mistake() { + const cases: { + [index: number]: "none" | "mistake"; + } = { + 0: "none", + 11: "mistake" + }; + return cases[pb_1.Message.computeOneofCase(this, [11])]; + } + get _ending() { + const cases: { + [index: number]: "none" | "ending"; + } = { + 0: "none", + 12: "ending" + }; + return cases[pb_1.Message.computeOneofCase(this, [12])]; + } + static fromObject(data: { + id?: string; + assistantId?: string; + name?: string; + greeting?: string; + mistake?: string; + ending?: string; + whatsappProviderName?: string; + whatsappProviderId?: string; + whatsappOptions?: ReturnType[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + }): AssistantWhatsappDeployment { + const message = new AssistantWhatsappDeployment({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.greeting != null) { + message.greeting = data.greeting; + } + if (data.mistake != null) { + message.mistake = data.mistake; + } + if (data.ending != null) { + message.ending = data.ending; + } + if (data.whatsappProviderName != null) { + message.whatsappProviderName = data.whatsappProviderName; + } + if (data.whatsappProviderId != null) { + message.whatsappProviderId = data.whatsappProviderId; + } + if (data.whatsappOptions != null) { + message.whatsappOptions = data.whatsappOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + name?: string; + greeting?: string; + mistake?: string; + ending?: string; + whatsappProviderName?: string; + whatsappProviderId?: string; + whatsappOptions?: ReturnType[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.greeting != null) { + data.greeting = this.greeting; + } + if (this.mistake != null) { + data.mistake = this.mistake; + } + if (this.ending != null) { + data.ending = this.ending; + } + if (this.whatsappProviderName != null) { + data.whatsappProviderName = this.whatsappProviderName; + } + if (this.whatsappProviderId != null) { + data.whatsappProviderId = this.whatsappProviderId; + } + if (this.whatsappOptions != null) { + data.whatsappOptions = this.whatsappOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(5, this.assistantId); + if (this.name.length) + writer.writeString(6, this.name); + if (this.has_greeting) + writer.writeString(10, this.greeting); + if (this.has_mistake) + writer.writeString(11, this.mistake); + if (this.has_ending) + writer.writeString(12, this.ending); + if (this.whatsappProviderName.length) + writer.writeString(15, this.whatsappProviderName); + if (this.whatsappProviderId != "0") + writer.writeUint64String(16, this.whatsappProviderId); + if (this.whatsappOptions.length) + writer.writeRepeatedMessage(17, this.whatsappOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.status.length) + writer.writeString(28, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantWhatsappDeployment { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantWhatsappDeployment(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 5: + message.assistantId = reader.readUint64String(); + break; + case 6: + message.name = reader.readString(); + break; + case 10: + message.greeting = reader.readString(); + break; + case 11: + message.mistake = reader.readString(); + break; + case 12: + message.ending = reader.readString(); + break; + case 15: + message.whatsappProviderName = reader.readString(); + break; + case 16: + message.whatsappProviderId = reader.readUint64String(); + break; + case 17: + reader.readMessage(message.whatsappOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 17, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 28: + message.status = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantWhatsappDeployment { + return AssistantWhatsappDeployment.deserialize(bytes); + } + } + export class AssistantDebuggerDeployment extends pb_1.Message { + #one_of_decls: number[][] = [[15, 16], [10], [11], [12]]; + constructor(data?: any[] | ({ + id?: string; + assistantId?: string; + name?: string; + inputAudio?: DeploymentAudioProvider; + outputAudio?: DeploymentAudioProvider; + suggestion?: string[]; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + status?: string; + } & (({ + url?: string; + raw?: never; + } | { + url?: never; + raw?: dependency_2.Content; + }) | ({ + greeting?: string; + }) | ({ + mistake?: string; + }) | ({ + ending?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [20], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("greeting" in data && data.greeting != undefined) { + this.greeting = data.greeting; + } + if ("mistake" in data && data.mistake != undefined) { + this.mistake = data.mistake; + } + if ("ending" in data && data.ending != undefined) { + this.ending = data.ending; + } + if ("inputAudio" in data && data.inputAudio != undefined) { + this.inputAudio = data.inputAudio; + } + if ("outputAudio" in data && data.outputAudio != undefined) { + this.outputAudio = data.outputAudio; + } + if ("url" in data && data.url != undefined) { + this.url = data.url; + } + if ("raw" in data && data.raw != undefined) { + this.raw = data.raw; + } + if ("suggestion" in data && data.suggestion != undefined) { + this.suggestion = data.suggestion; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 5, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 6, value); + } + get greeting() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set greeting(value: string) { + pb_1.Message.setOneofField(this, 10, this.#one_of_decls[1], value); + } + get has_greeting() { + return pb_1.Message.getField(this, 10) != null; + } + get mistake() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set mistake(value: string) { + pb_1.Message.setOneofField(this, 11, this.#one_of_decls[2], value); + } + get has_mistake() { + return pb_1.Message.getField(this, 11) != null; + } + get ending() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set ending(value: string) { + pb_1.Message.setOneofField(this, 12, this.#one_of_decls[3], value); + } + get has_ending() { + return pb_1.Message.getField(this, 12) != null; + } + get inputAudio() { + return pb_1.Message.getWrapperField(this, DeploymentAudioProvider, 13) as DeploymentAudioProvider; + } + set inputAudio(value: DeploymentAudioProvider) { + pb_1.Message.setWrapperField(this, 13, value); + } + get has_inputAudio() { + return pb_1.Message.getField(this, 13) != null; + } + get outputAudio() { + return pb_1.Message.getWrapperField(this, DeploymentAudioProvider, 14) as DeploymentAudioProvider; + } + set outputAudio(value: DeploymentAudioProvider) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_outputAudio() { + return pb_1.Message.getField(this, 14) != null; + } + get url() { + return pb_1.Message.getFieldWithDefault(this, 15, "") as string; + } + set url(value: string) { + pb_1.Message.setOneofField(this, 15, this.#one_of_decls[0], value); + } + get has_url() { + return pb_1.Message.getField(this, 15) != null; + } + get raw() { + return pb_1.Message.getWrapperField(this, dependency_2.Content, 16) as dependency_2.Content; + } + set raw(value: dependency_2.Content) { + pb_1.Message.setOneofWrapperField(this, 16, this.#one_of_decls[0], value); + } + get has_raw() { + return pb_1.Message.getField(this, 16) != null; + } + get suggestion() { + return pb_1.Message.getFieldWithDefault(this, 20, []) as string[]; + } + set suggestion(value: string[]) { + pb_1.Message.setField(this, 20, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 28, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 28, value); + } + get icon() { + const cases: { + [index: number]: "none" | "url" | "raw"; + } = { + 0: "none", + 15: "url", + 16: "raw" + }; + return cases[pb_1.Message.computeOneofCase(this, [15, 16])]; + } + get _greeting() { + const cases: { + [index: number]: "none" | "greeting"; + } = { + 0: "none", + 10: "greeting" + }; + return cases[pb_1.Message.computeOneofCase(this, [10])]; + } + get _mistake() { + const cases: { + [index: number]: "none" | "mistake"; + } = { + 0: "none", + 11: "mistake" + }; + return cases[pb_1.Message.computeOneofCase(this, [11])]; + } + get _ending() { + const cases: { + [index: number]: "none" | "ending"; + } = { + 0: "none", + 12: "ending" + }; + return cases[pb_1.Message.computeOneofCase(this, [12])]; + } + static fromObject(data: { + id?: string; + assistantId?: string; + name?: string; + greeting?: string; + mistake?: string; + ending?: string; + inputAudio?: ReturnType; + outputAudio?: ReturnType; + url?: string; + raw?: ReturnType; + suggestion?: string[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + }): AssistantDebuggerDeployment { + const message = new AssistantDebuggerDeployment({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.greeting != null) { + message.greeting = data.greeting; + } + if (data.mistake != null) { + message.mistake = data.mistake; + } + if (data.ending != null) { + message.ending = data.ending; + } + if (data.inputAudio != null) { + message.inputAudio = DeploymentAudioProvider.fromObject(data.inputAudio); + } + if (data.outputAudio != null) { + message.outputAudio = DeploymentAudioProvider.fromObject(data.outputAudio); + } + if (data.url != null) { + message.url = data.url; + } + if (data.raw != null) { + message.raw = dependency_2.Content.fromObject(data.raw); + } + if (data.suggestion != null) { + message.suggestion = data.suggestion; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + name?: string; + greeting?: string; + mistake?: string; + ending?: string; + inputAudio?: ReturnType; + outputAudio?: ReturnType; + url?: string; + raw?: ReturnType; + suggestion?: string[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.greeting != null) { + data.greeting = this.greeting; + } + if (this.mistake != null) { + data.mistake = this.mistake; + } + if (this.ending != null) { + data.ending = this.ending; + } + if (this.inputAudio != null) { + data.inputAudio = this.inputAudio.toObject(); + } + if (this.outputAudio != null) { + data.outputAudio = this.outputAudio.toObject(); + } + if (this.url != null) { + data.url = this.url; + } + if (this.raw != null) { + data.raw = this.raw.toObject(); + } + if (this.suggestion != null) { + data.suggestion = this.suggestion; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(5, this.assistantId); + if (this.name.length) + writer.writeString(6, this.name); + if (this.has_greeting) + writer.writeString(10, this.greeting); + if (this.has_mistake) + writer.writeString(11, this.mistake); + if (this.has_ending) + writer.writeString(12, this.ending); + if (this.has_inputAudio) + writer.writeMessage(13, this.inputAudio, () => this.inputAudio.serialize(writer)); + if (this.has_outputAudio) + writer.writeMessage(14, this.outputAudio, () => this.outputAudio.serialize(writer)); + if (this.has_url) + writer.writeString(15, this.url); + if (this.has_raw) + writer.writeMessage(16, this.raw, () => this.raw.serialize(writer)); + if (this.suggestion.length) + writer.writeRepeatedString(20, this.suggestion); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.status.length) + writer.writeString(28, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantDebuggerDeployment { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantDebuggerDeployment(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 5: + message.assistantId = reader.readUint64String(); + break; + case 6: + message.name = reader.readString(); + break; + case 10: + message.greeting = reader.readString(); + break; + case 11: + message.mistake = reader.readString(); + break; + case 12: + message.ending = reader.readString(); + break; + case 13: + reader.readMessage(message.inputAudio, () => message.inputAudio = DeploymentAudioProvider.deserialize(reader)); + break; + case 14: + reader.readMessage(message.outputAudio, () => message.outputAudio = DeploymentAudioProvider.deserialize(reader)); + break; + case 15: + message.url = reader.readString(); + break; + case 16: + reader.readMessage(message.raw, () => message.raw = dependency_2.Content.deserialize(reader)); + break; + case 20: + pb_1.Message.addToRepeatedField(message, 20, reader.readString()); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 28: + message.status = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantDebuggerDeployment { + return AssistantDebuggerDeployment.deserialize(bytes); + } + } + export class AssistantApiDeployment extends pb_1.Message { + #one_of_decls: number[][] = [[10], [11], [12]]; + constructor(data?: any[] | ({ + id?: string; + assistantId?: string; + inputAudio?: DeploymentAudioProvider; + outputAudio?: DeploymentAudioProvider; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + status?: string; + } & (({ + greeting?: string; + }) | ({ + mistake?: string; + }) | ({ + ending?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("greeting" in data && data.greeting != undefined) { + this.greeting = data.greeting; + } + if ("mistake" in data && data.mistake != undefined) { + this.mistake = data.mistake; + } + if ("ending" in data && data.ending != undefined) { + this.ending = data.ending; + } + if ("inputAudio" in data && data.inputAudio != undefined) { + this.inputAudio = data.inputAudio; + } + if ("outputAudio" in data && data.outputAudio != undefined) { + this.outputAudio = data.outputAudio; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 5, value); + } + get greeting() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set greeting(value: string) { + pb_1.Message.setOneofField(this, 10, this.#one_of_decls[0], value); + } + get has_greeting() { + return pb_1.Message.getField(this, 10) != null; + } + get mistake() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set mistake(value: string) { + pb_1.Message.setOneofField(this, 11, this.#one_of_decls[1], value); + } + get has_mistake() { + return pb_1.Message.getField(this, 11) != null; + } + get ending() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set ending(value: string) { + pb_1.Message.setOneofField(this, 12, this.#one_of_decls[2], value); + } + get has_ending() { + return pb_1.Message.getField(this, 12) != null; + } + get inputAudio() { + return pb_1.Message.getWrapperField(this, DeploymentAudioProvider, 13) as DeploymentAudioProvider; + } + set inputAudio(value: DeploymentAudioProvider) { + pb_1.Message.setWrapperField(this, 13, value); + } + get has_inputAudio() { + return pb_1.Message.getField(this, 13) != null; + } + get outputAudio() { + return pb_1.Message.getWrapperField(this, DeploymentAudioProvider, 14) as DeploymentAudioProvider; + } + set outputAudio(value: DeploymentAudioProvider) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_outputAudio() { + return pb_1.Message.getField(this, 14) != null; + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 28, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 28, value); + } + get _greeting() { + const cases: { + [index: number]: "none" | "greeting"; + } = { + 0: "none", + 10: "greeting" + }; + return cases[pb_1.Message.computeOneofCase(this, [10])]; + } + get _mistake() { + const cases: { + [index: number]: "none" | "mistake"; + } = { + 0: "none", + 11: "mistake" + }; + return cases[pb_1.Message.computeOneofCase(this, [11])]; + } + get _ending() { + const cases: { + [index: number]: "none" | "ending"; + } = { + 0: "none", + 12: "ending" + }; + return cases[pb_1.Message.computeOneofCase(this, [12])]; + } + static fromObject(data: { + id?: string; + assistantId?: string; + greeting?: string; + mistake?: string; + ending?: string; + inputAudio?: ReturnType; + outputAudio?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + }): AssistantApiDeployment { + const message = new AssistantApiDeployment({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.greeting != null) { + message.greeting = data.greeting; + } + if (data.mistake != null) { + message.mistake = data.mistake; + } + if (data.ending != null) { + message.ending = data.ending; + } + if (data.inputAudio != null) { + message.inputAudio = DeploymentAudioProvider.fromObject(data.inputAudio); + } + if (data.outputAudio != null) { + message.outputAudio = DeploymentAudioProvider.fromObject(data.outputAudio); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + greeting?: string; + mistake?: string; + ending?: string; + inputAudio?: ReturnType; + outputAudio?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.greeting != null) { + data.greeting = this.greeting; + } + if (this.mistake != null) { + data.mistake = this.mistake; + } + if (this.ending != null) { + data.ending = this.ending; + } + if (this.inputAudio != null) { + data.inputAudio = this.inputAudio.toObject(); + } + if (this.outputAudio != null) { + data.outputAudio = this.outputAudio.toObject(); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(5, this.assistantId); + if (this.has_greeting) + writer.writeString(10, this.greeting); + if (this.has_mistake) + writer.writeString(11, this.mistake); + if (this.has_ending) + writer.writeString(12, this.ending); + if (this.has_inputAudio) + writer.writeMessage(13, this.inputAudio, () => this.inputAudio.serialize(writer)); + if (this.has_outputAudio) + writer.writeMessage(14, this.outputAudio, () => this.outputAudio.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.status.length) + writer.writeString(28, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantApiDeployment { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantApiDeployment(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 5: + message.assistantId = reader.readUint64String(); + break; + case 10: + message.greeting = reader.readString(); + break; + case 11: + message.mistake = reader.readString(); + break; + case 12: + message.ending = reader.readString(); + break; + case 13: + reader.readMessage(message.inputAudio, () => message.inputAudio = DeploymentAudioProvider.deserialize(reader)); + break; + case 14: + reader.readMessage(message.outputAudio, () => message.outputAudio = DeploymentAudioProvider.deserialize(reader)); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 28: + message.status = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantApiDeployment { + return AssistantApiDeployment.deserialize(bytes); + } + } + export class CreateAssistantDeploymentRequest extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2, 3, 4, 5]]; + constructor(data?: any[] | ({} & (({ + api?: AssistantApiDeployment; + debugger?: never; + whatsapp?: never; + phone?: never; + plugin?: never; + } | { + api?: never; + debugger?: AssistantDebuggerDeployment; + whatsapp?: never; + phone?: never; + plugin?: never; + } | { + api?: never; + debugger?: never; + whatsapp?: AssistantWhatsappDeployment; + phone?: never; + plugin?: never; + } | { + api?: never; + debugger?: never; + whatsapp?: never; + phone?: AssistantPhoneDeployment; + plugin?: never; + } | { + api?: never; + debugger?: never; + whatsapp?: never; + phone?: never; + plugin?: AssistantWebpluginDeployment; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("api" in data && data.api != undefined) { + this.api = data.api; + } + if ("debugger" in data && data.debugger != undefined) { + this.debugger = data.debugger; + } + if ("whatsapp" in data && data.whatsapp != undefined) { + this.whatsapp = data.whatsapp; + } + if ("phone" in data && data.phone != undefined) { + this.phone = data.phone; + } + if ("plugin" in data && data.plugin != undefined) { + this.plugin = data.plugin; + } + } + } + get api() { + return pb_1.Message.getWrapperField(this, AssistantApiDeployment, 1) as AssistantApiDeployment; + } + set api(value: AssistantApiDeployment) { + pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value); + } + get has_api() { + return pb_1.Message.getField(this, 1) != null; + } + get debugger() { + return pb_1.Message.getWrapperField(this, AssistantDebuggerDeployment, 2) as AssistantDebuggerDeployment; + } + set debugger(value: AssistantDebuggerDeployment) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_debugger() { + return pb_1.Message.getField(this, 2) != null; + } + get whatsapp() { + return pb_1.Message.getWrapperField(this, AssistantWhatsappDeployment, 3) as AssistantWhatsappDeployment; + } + set whatsapp(value: AssistantWhatsappDeployment) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_whatsapp() { + return pb_1.Message.getField(this, 3) != null; + } + get phone() { + return pb_1.Message.getWrapperField(this, AssistantPhoneDeployment, 4) as AssistantPhoneDeployment; + } + set phone(value: AssistantPhoneDeployment) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value); + } + get has_phone() { + return pb_1.Message.getField(this, 4) != null; + } + get plugin() { + return pb_1.Message.getWrapperField(this, AssistantWebpluginDeployment, 5) as AssistantWebpluginDeployment; + } + set plugin(value: AssistantWebpluginDeployment) { + pb_1.Message.setOneofWrapperField(this, 5, this.#one_of_decls[0], value); + } + get has_plugin() { + return pb_1.Message.getField(this, 5) != null; + } + get deployment() { + const cases: { + [index: number]: "none" | "api" | "debugger" | "whatsapp" | "phone" | "plugin"; + } = { + 0: "none", + 1: "api", + 2: "debugger", + 3: "whatsapp", + 4: "phone", + 5: "plugin" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 4, 5])]; + } + static fromObject(data: { + api?: ReturnType; + debugger?: ReturnType; + whatsapp?: ReturnType; + phone?: ReturnType; + plugin?: ReturnType; + }): CreateAssistantDeploymentRequest { + const message = new CreateAssistantDeploymentRequest({}); + if (data.api != null) { + message.api = AssistantApiDeployment.fromObject(data.api); + } + if (data.debugger != null) { + message.debugger = AssistantDebuggerDeployment.fromObject(data.debugger); + } + if (data.whatsapp != null) { + message.whatsapp = AssistantWhatsappDeployment.fromObject(data.whatsapp); + } + if (data.phone != null) { + message.phone = AssistantPhoneDeployment.fromObject(data.phone); + } + if (data.plugin != null) { + message.plugin = AssistantWebpluginDeployment.fromObject(data.plugin); + } + return message; + } + toObject() { + const data: { + api?: ReturnType; + debugger?: ReturnType; + whatsapp?: ReturnType; + phone?: ReturnType; + plugin?: ReturnType; + } = {}; + if (this.api != null) { + data.api = this.api.toObject(); + } + if (this.debugger != null) { + data.debugger = this.debugger.toObject(); + } + if (this.whatsapp != null) { + data.whatsapp = this.whatsapp.toObject(); + } + if (this.phone != null) { + data.phone = this.phone.toObject(); + } + if (this.plugin != null) { + data.plugin = this.plugin.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_api) + writer.writeMessage(1, this.api, () => this.api.serialize(writer)); + if (this.has_debugger) + writer.writeMessage(2, this.debugger, () => this.debugger.serialize(writer)); + if (this.has_whatsapp) + writer.writeMessage(3, this.whatsapp, () => this.whatsapp.serialize(writer)); + if (this.has_phone) + writer.writeMessage(4, this.phone, () => this.phone.serialize(writer)); + if (this.has_plugin) + writer.writeMessage(5, this.plugin, () => this.plugin.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateAssistantDeploymentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateAssistantDeploymentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.api, () => message.api = AssistantApiDeployment.deserialize(reader)); + break; + case 2: + reader.readMessage(message.debugger, () => message.debugger = AssistantDebuggerDeployment.deserialize(reader)); + break; + case 3: + reader.readMessage(message.whatsapp, () => message.whatsapp = AssistantWhatsappDeployment.deserialize(reader)); + break; + case 4: + reader.readMessage(message.phone, () => message.phone = AssistantPhoneDeployment.deserialize(reader)); + break; + case 5: + reader.readMessage(message.plugin, () => message.plugin = AssistantWebpluginDeployment.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateAssistantDeploymentRequest { + return CreateAssistantDeploymentRequest.deserialize(bytes); + } + } + export class GetAssistantApiDeploymentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantApiDeployment; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantApiDeployment, 3) as AssistantApiDeployment; + } + set data(value: AssistantApiDeployment) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantApiDeploymentResponse { + const message = new GetAssistantApiDeploymentResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantApiDeployment.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantApiDeploymentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantApiDeploymentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantApiDeployment.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantApiDeploymentResponse { + return GetAssistantApiDeploymentResponse.deserialize(bytes); + } + } + export class GetAssistantPhoneDeploymentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantPhoneDeployment; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantPhoneDeployment, 3) as AssistantPhoneDeployment; + } + set data(value: AssistantPhoneDeployment) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantPhoneDeploymentResponse { + const message = new GetAssistantPhoneDeploymentResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantPhoneDeployment.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantPhoneDeploymentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantPhoneDeploymentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantPhoneDeployment.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantPhoneDeploymentResponse { + return GetAssistantPhoneDeploymentResponse.deserialize(bytes); + } + } + export class GetAssistantWhatsappDeploymentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantWhatsappDeployment; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantWhatsappDeployment, 3) as AssistantWhatsappDeployment; + } + set data(value: AssistantWhatsappDeployment) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantWhatsappDeploymentResponse { + const message = new GetAssistantWhatsappDeploymentResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantWhatsappDeployment.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantWhatsappDeploymentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantWhatsappDeploymentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantWhatsappDeployment.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantWhatsappDeploymentResponse { + return GetAssistantWhatsappDeploymentResponse.deserialize(bytes); + } + } + export class GetAssistantDebuggerDeploymentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantDebuggerDeployment; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantDebuggerDeployment, 3) as AssistantDebuggerDeployment; + } + set data(value: AssistantDebuggerDeployment) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantDebuggerDeploymentResponse { + const message = new GetAssistantDebuggerDeploymentResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantDebuggerDeployment.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantDebuggerDeploymentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantDebuggerDeploymentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantDebuggerDeployment.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantDebuggerDeploymentResponse { + return GetAssistantDebuggerDeploymentResponse.deserialize(bytes); + } + } + export class GetAssistantWebpluginDeploymentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantWebpluginDeployment; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantWebpluginDeployment, 3) as AssistantWebpluginDeployment; + } + set data(value: AssistantWebpluginDeployment) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantWebpluginDeploymentResponse { + const message = new GetAssistantWebpluginDeploymentResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantWebpluginDeployment.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantWebpluginDeploymentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantWebpluginDeploymentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantWebpluginDeployment.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantWebpluginDeploymentResponse { + return GetAssistantWebpluginDeploymentResponse.deserialize(bytes); + } + } + export class GetAssistantDeploymentRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + assistantId?: string; + }): GetAssistantDeploymentRequest { + const message = new GetAssistantDeploymentRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + return message; + } + toObject() { + const data: { + assistantId?: string; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantDeploymentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantDeploymentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantDeploymentRequest { + return GetAssistantDeploymentRequest.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedAssistantDeploymentServiceService { + static definition = { + CreateAssistantApiDeployment: { + path: "/assistant_api.AssistantDeploymentService/CreateAssistantApiDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateAssistantDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateAssistantDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantApiDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantApiDeploymentResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantApiDeployment: { + path: "/assistant_api.AssistantDeploymentService/GetAssistantApiDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAssistantDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAssistantDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantApiDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantApiDeploymentResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistantWebpluginDeployment: { + path: "/assistant_api.AssistantDeploymentService/CreateAssistantWebpluginDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateAssistantDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateAssistantDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantWebpluginDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantWebpluginDeploymentResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantWebpluginDeployment: { + path: "/assistant_api.AssistantDeploymentService/GetAssistantWebpluginDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAssistantDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAssistantDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantWebpluginDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantWebpluginDeploymentResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistantDebuggerDeployment: { + path: "/assistant_api.AssistantDeploymentService/CreateAssistantDebuggerDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateAssistantDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateAssistantDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantDebuggerDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantDebuggerDeploymentResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantDebuggerDeployment: { + path: "/assistant_api.AssistantDeploymentService/GetAssistantDebuggerDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAssistantDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAssistantDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantDebuggerDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantDebuggerDeploymentResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistantWhatsappDeployment: { + path: "/assistant_api.AssistantDeploymentService/CreateAssistantWhatsappDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateAssistantDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateAssistantDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantWhatsappDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantWhatsappDeploymentResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantWhatsappDeployment: { + path: "/assistant_api.AssistantDeploymentService/GetAssistantWhatsappDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAssistantDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAssistantDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantWhatsappDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantWhatsappDeploymentResponse.deserialize(new Uint8Array(bytes)) + }, + CreateAssistantPhoneDeployment: { + path: "/assistant_api.AssistantDeploymentService/CreateAssistantPhoneDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateAssistantDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateAssistantDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantPhoneDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantPhoneDeploymentResponse.deserialize(new Uint8Array(bytes)) + }, + GetAssistantPhoneDeployment: { + path: "/assistant_api.AssistantDeploymentService/GetAssistantPhoneDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAssistantDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAssistantDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAssistantPhoneDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAssistantPhoneDeploymentResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CreateAssistantApiDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantApiDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistantWebpluginDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantWebpluginDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistantDebuggerDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantDebuggerDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistantWhatsappDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantWhatsappDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateAssistantPhoneDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAssistantPhoneDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class AssistantDeploymentServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedAssistantDeploymentServiceService.definition, "AssistantDeploymentService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CreateAssistantApiDeployment: GrpcUnaryServiceInterface = (message: CreateAssistantDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantApiDeployment(message, metadata, options, callback); + }; + GetAssistantApiDeployment: GrpcUnaryServiceInterface = (message: GetAssistantDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantApiDeployment(message, metadata, options, callback); + }; + CreateAssistantWebpluginDeployment: GrpcUnaryServiceInterface = (message: CreateAssistantDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantWebpluginDeployment(message, metadata, options, callback); + }; + GetAssistantWebpluginDeployment: GrpcUnaryServiceInterface = (message: GetAssistantDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantWebpluginDeployment(message, metadata, options, callback); + }; + CreateAssistantDebuggerDeployment: GrpcUnaryServiceInterface = (message: CreateAssistantDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantDebuggerDeployment(message, metadata, options, callback); + }; + GetAssistantDebuggerDeployment: GrpcUnaryServiceInterface = (message: GetAssistantDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantDebuggerDeployment(message, metadata, options, callback); + }; + CreateAssistantWhatsappDeployment: GrpcUnaryServiceInterface = (message: CreateAssistantDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantWhatsappDeployment(message, metadata, options, callback); + }; + GetAssistantWhatsappDeployment: GrpcUnaryServiceInterface = (message: GetAssistantDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantWhatsappDeployment(message, metadata, options, callback); + }; + CreateAssistantPhoneDeployment: GrpcUnaryServiceInterface = (message: CreateAssistantDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateAssistantPhoneDeployment(message, metadata, options, callback); + }; + GetAssistantPhoneDeployment: GrpcUnaryServiceInterface = (message: GetAssistantDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAssistantPhoneDeployment(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/assistant-deployment_grpc_pb.d.ts b/src/clients/protos/assistant-deployment_grpc_pb.d.ts deleted file mode 100644 index d8b5e35..0000000 --- a/src/clients/protos/assistant-deployment_grpc_pb.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: assistant_api -// file: assistant-deployment.proto - -import * as assistant_deployment_pb from "./assistant-deployment_pb"; -import * as grpc from "grpc"; - -interface IAssistantDeploymentServiceService extends grpc.ServiceDefinition { - createAssistantApiDeployment: grpc.MethodDefinition; - getAssistantApiDeployment: grpc.MethodDefinition; - createAssistantWebpluginDeployment: grpc.MethodDefinition; - getAssistantWebpluginDeployment: grpc.MethodDefinition; - createAssistantDebuggerDeployment: grpc.MethodDefinition; - getAssistantDebuggerDeployment: grpc.MethodDefinition; - createAssistantWhatsappDeployment: grpc.MethodDefinition; - getAssistantWhatsappDeployment: grpc.MethodDefinition; - createAssistantPhoneDeployment: grpc.MethodDefinition; - getAssistantPhoneDeployment: grpc.MethodDefinition; -} - -export const AssistantDeploymentServiceService: IAssistantDeploymentServiceService; - -export interface IAssistantDeploymentServiceServer extends grpc.UntypedServiceImplementation { - createAssistantApiDeployment: grpc.handleUnaryCall; - getAssistantApiDeployment: grpc.handleUnaryCall; - createAssistantWebpluginDeployment: grpc.handleUnaryCall; - getAssistantWebpluginDeployment: grpc.handleUnaryCall; - createAssistantDebuggerDeployment: grpc.handleUnaryCall; - getAssistantDebuggerDeployment: grpc.handleUnaryCall; - createAssistantWhatsappDeployment: grpc.handleUnaryCall; - getAssistantWhatsappDeployment: grpc.handleUnaryCall; - createAssistantPhoneDeployment: grpc.handleUnaryCall; - getAssistantPhoneDeployment: grpc.handleUnaryCall; -} - -export class AssistantDeploymentServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - createAssistantApiDeployment(argument: assistant_deployment_pb.CreateAssistantApiDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantApiDeployment(argument: assistant_deployment_pb.CreateAssistantApiDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantApiDeployment(argument: assistant_deployment_pb.CreateAssistantApiDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantApiDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantApiDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantApiDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantWebpluginDeployment(argument: assistant_deployment_pb.CreateAssistantWebpluginDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantWebpluginDeployment(argument: assistant_deployment_pb.CreateAssistantWebpluginDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantWebpluginDeployment(argument: assistant_deployment_pb.CreateAssistantWebpluginDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWebpluginDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWebpluginDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWebpluginDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantDebuggerDeployment(argument: assistant_deployment_pb.CreateAssistantDebuggerDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantDebuggerDeployment(argument: assistant_deployment_pb.CreateAssistantDebuggerDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantDebuggerDeployment(argument: assistant_deployment_pb.CreateAssistantDebuggerDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantDebuggerDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantDebuggerDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantDebuggerDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantWhatsappDeployment(argument: assistant_deployment_pb.CreateAssistantWhatsappDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantWhatsappDeployment(argument: assistant_deployment_pb.CreateAssistantWhatsappDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantWhatsappDeployment(argument: assistant_deployment_pb.CreateAssistantWhatsappDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWhatsappDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWhatsappDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantWhatsappDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantPhoneDeployment(argument: assistant_deployment_pb.CreateAssistantPhoneDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantPhoneDeployment(argument: assistant_deployment_pb.CreateAssistantPhoneDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createAssistantPhoneDeployment(argument: assistant_deployment_pb.CreateAssistantPhoneDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantPhoneDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantPhoneDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAssistantPhoneDeployment(argument: assistant_deployment_pb.GetAssistantDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/assistant-deployment_grpc_pb.js b/src/clients/protos/assistant-deployment_grpc_pb.js index 7348ae6..2d18191 100644 --- a/src/clients/protos/assistant-deployment_grpc_pb.js +++ b/src/clients/protos/assistant-deployment_grpc_pb.js @@ -6,125 +6,81 @@ var assistant$deployment_pb = require('./assistant-deployment_pb.js'); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); var common_pb = require('./common_pb.js'); -function serialize_assistant_api_AssistantApiDeploymentResponse(arg) { - if (!(arg instanceof assistant$deployment_pb.AssistantApiDeploymentResponse)) { - throw new Error('Expected argument of type assistant_api.AssistantApiDeploymentResponse'); +function serialize_assistant_api_CreateAssistantDeploymentRequest(arg) { + if (!(arg instanceof assistant$deployment_pb.CreateAssistantDeploymentRequest)) { + throw new Error('Expected argument of type assistant_api.CreateAssistantDeploymentRequest'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_assistant_api_AssistantApiDeploymentResponse(buffer_arg) { - return assistant$deployment_pb.AssistantApiDeploymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_assistant_api_CreateAssistantDeploymentRequest(buffer_arg) { + return assistant$deployment_pb.CreateAssistantDeploymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_assistant_api_AssistantDebuggerDeploymentResponse(arg) { - if (!(arg instanceof assistant$deployment_pb.AssistantDebuggerDeploymentResponse)) { - throw new Error('Expected argument of type assistant_api.AssistantDebuggerDeploymentResponse'); +function serialize_assistant_api_GetAssistantApiDeploymentResponse(arg) { + if (!(arg instanceof assistant$deployment_pb.GetAssistantApiDeploymentResponse)) { + throw new Error('Expected argument of type assistant_api.GetAssistantApiDeploymentResponse'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_assistant_api_AssistantDebuggerDeploymentResponse(buffer_arg) { - return assistant$deployment_pb.AssistantDebuggerDeploymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_assistant_api_GetAssistantApiDeploymentResponse(buffer_arg) { + return assistant$deployment_pb.GetAssistantApiDeploymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_assistant_api_AssistantPhoneDeploymentResponse(arg) { - if (!(arg instanceof assistant$deployment_pb.AssistantPhoneDeploymentResponse)) { - throw new Error('Expected argument of type assistant_api.AssistantPhoneDeploymentResponse'); +function serialize_assistant_api_GetAssistantDebuggerDeploymentResponse(arg) { + if (!(arg instanceof assistant$deployment_pb.GetAssistantDebuggerDeploymentResponse)) { + throw new Error('Expected argument of type assistant_api.GetAssistantDebuggerDeploymentResponse'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_assistant_api_AssistantPhoneDeploymentResponse(buffer_arg) { - return assistant$deployment_pb.AssistantPhoneDeploymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_assistant_api_GetAssistantDebuggerDeploymentResponse(buffer_arg) { + return assistant$deployment_pb.GetAssistantDebuggerDeploymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_assistant_api_AssistantWebpluginDeploymentResponse(arg) { - if (!(arg instanceof assistant$deployment_pb.AssistantWebpluginDeploymentResponse)) { - throw new Error('Expected argument of type assistant_api.AssistantWebpluginDeploymentResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_assistant_api_AssistantWebpluginDeploymentResponse(buffer_arg) { - return assistant$deployment_pb.AssistantWebpluginDeploymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_assistant_api_AssistantWhatsappDeploymentResponse(arg) { - if (!(arg instanceof assistant$deployment_pb.AssistantWhatsappDeploymentResponse)) { - throw new Error('Expected argument of type assistant_api.AssistantWhatsappDeploymentResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_assistant_api_AssistantWhatsappDeploymentResponse(buffer_arg) { - return assistant$deployment_pb.AssistantWhatsappDeploymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_assistant_api_CreateAssistantApiDeploymentRequest(arg) { - if (!(arg instanceof assistant$deployment_pb.CreateAssistantApiDeploymentRequest)) { - throw new Error('Expected argument of type assistant_api.CreateAssistantApiDeploymentRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_assistant_api_CreateAssistantApiDeploymentRequest(buffer_arg) { - return assistant$deployment_pb.CreateAssistantApiDeploymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_assistant_api_CreateAssistantDebuggerDeploymentRequest(arg) { - if (!(arg instanceof assistant$deployment_pb.CreateAssistantDebuggerDeploymentRequest)) { - throw new Error('Expected argument of type assistant_api.CreateAssistantDebuggerDeploymentRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_assistant_api_CreateAssistantDebuggerDeploymentRequest(buffer_arg) { - return assistant$deployment_pb.CreateAssistantDebuggerDeploymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_assistant_api_CreateAssistantPhoneDeploymentRequest(arg) { - if (!(arg instanceof assistant$deployment_pb.CreateAssistantPhoneDeploymentRequest)) { - throw new Error('Expected argument of type assistant_api.CreateAssistantPhoneDeploymentRequest'); +function serialize_assistant_api_GetAssistantDeploymentRequest(arg) { + if (!(arg instanceof assistant$deployment_pb.GetAssistantDeploymentRequest)) { + throw new Error('Expected argument of type assistant_api.GetAssistantDeploymentRequest'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_assistant_api_CreateAssistantPhoneDeploymentRequest(buffer_arg) { - return assistant$deployment_pb.CreateAssistantPhoneDeploymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_assistant_api_GetAssistantDeploymentRequest(buffer_arg) { + return assistant$deployment_pb.GetAssistantDeploymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_assistant_api_CreateAssistantWebpluginDeploymentRequest(arg) { - if (!(arg instanceof assistant$deployment_pb.CreateAssistantWebpluginDeploymentRequest)) { - throw new Error('Expected argument of type assistant_api.CreateAssistantWebpluginDeploymentRequest'); +function serialize_assistant_api_GetAssistantPhoneDeploymentResponse(arg) { + if (!(arg instanceof assistant$deployment_pb.GetAssistantPhoneDeploymentResponse)) { + throw new Error('Expected argument of type assistant_api.GetAssistantPhoneDeploymentResponse'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_assistant_api_CreateAssistantWebpluginDeploymentRequest(buffer_arg) { - return assistant$deployment_pb.CreateAssistantWebpluginDeploymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_assistant_api_GetAssistantPhoneDeploymentResponse(buffer_arg) { + return assistant$deployment_pb.GetAssistantPhoneDeploymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_assistant_api_CreateAssistantWhatsappDeploymentRequest(arg) { - if (!(arg instanceof assistant$deployment_pb.CreateAssistantWhatsappDeploymentRequest)) { - throw new Error('Expected argument of type assistant_api.CreateAssistantWhatsappDeploymentRequest'); +function serialize_assistant_api_GetAssistantWebpluginDeploymentResponse(arg) { + if (!(arg instanceof assistant$deployment_pb.GetAssistantWebpluginDeploymentResponse)) { + throw new Error('Expected argument of type assistant_api.GetAssistantWebpluginDeploymentResponse'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_assistant_api_CreateAssistantWhatsappDeploymentRequest(buffer_arg) { - return assistant$deployment_pb.CreateAssistantWhatsappDeploymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_assistant_api_GetAssistantWebpluginDeploymentResponse(buffer_arg) { + return assistant$deployment_pb.GetAssistantWebpluginDeploymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_assistant_api_GetAssistantDeploymentRequest(arg) { - if (!(arg instanceof assistant$deployment_pb.GetAssistantDeploymentRequest)) { - throw new Error('Expected argument of type assistant_api.GetAssistantDeploymentRequest'); +function serialize_assistant_api_GetAssistantWhatsappDeploymentResponse(arg) { + if (!(arg instanceof assistant$deployment_pb.GetAssistantWhatsappDeploymentResponse)) { + throw new Error('Expected argument of type assistant_api.GetAssistantWhatsappDeploymentResponse'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_assistant_api_GetAssistantDeploymentRequest(buffer_arg) { - return assistant$deployment_pb.GetAssistantDeploymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_assistant_api_GetAssistantWhatsappDeploymentResponse(buffer_arg) { + return assistant$deployment_pb.GetAssistantWhatsappDeploymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); } @@ -133,111 +89,111 @@ var AssistantDeploymentServiceService = exports.AssistantDeploymentServiceServic path: '/assistant_api.AssistantDeploymentService/CreateAssistantApiDeployment', requestStream: false, responseStream: false, - requestType: assistant$deployment_pb.CreateAssistantApiDeploymentRequest, - responseType: assistant$deployment_pb.AssistantApiDeploymentResponse, - requestSerialize: serialize_assistant_api_CreateAssistantApiDeploymentRequest, - requestDeserialize: deserialize_assistant_api_CreateAssistantApiDeploymentRequest, - responseSerialize: serialize_assistant_api_AssistantApiDeploymentResponse, - responseDeserialize: deserialize_assistant_api_AssistantApiDeploymentResponse, + requestType: assistant$deployment_pb.CreateAssistantDeploymentRequest, + responseType: assistant$deployment_pb.GetAssistantApiDeploymentResponse, + requestSerialize: serialize_assistant_api_CreateAssistantDeploymentRequest, + requestDeserialize: deserialize_assistant_api_CreateAssistantDeploymentRequest, + responseSerialize: serialize_assistant_api_GetAssistantApiDeploymentResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantApiDeploymentResponse, }, getAssistantApiDeployment: { path: '/assistant_api.AssistantDeploymentService/GetAssistantApiDeployment', requestStream: false, responseStream: false, requestType: assistant$deployment_pb.GetAssistantDeploymentRequest, - responseType: assistant$deployment_pb.AssistantApiDeploymentResponse, + responseType: assistant$deployment_pb.GetAssistantApiDeploymentResponse, requestSerialize: serialize_assistant_api_GetAssistantDeploymentRequest, requestDeserialize: deserialize_assistant_api_GetAssistantDeploymentRequest, - responseSerialize: serialize_assistant_api_AssistantApiDeploymentResponse, - responseDeserialize: deserialize_assistant_api_AssistantApiDeploymentResponse, + responseSerialize: serialize_assistant_api_GetAssistantApiDeploymentResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantApiDeploymentResponse, }, createAssistantWebpluginDeployment: { path: '/assistant_api.AssistantDeploymentService/CreateAssistantWebpluginDeployment', requestStream: false, responseStream: false, - requestType: assistant$deployment_pb.CreateAssistantWebpluginDeploymentRequest, - responseType: assistant$deployment_pb.AssistantWebpluginDeploymentResponse, - requestSerialize: serialize_assistant_api_CreateAssistantWebpluginDeploymentRequest, - requestDeserialize: deserialize_assistant_api_CreateAssistantWebpluginDeploymentRequest, - responseSerialize: serialize_assistant_api_AssistantWebpluginDeploymentResponse, - responseDeserialize: deserialize_assistant_api_AssistantWebpluginDeploymentResponse, + requestType: assistant$deployment_pb.CreateAssistantDeploymentRequest, + responseType: assistant$deployment_pb.GetAssistantWebpluginDeploymentResponse, + requestSerialize: serialize_assistant_api_CreateAssistantDeploymentRequest, + requestDeserialize: deserialize_assistant_api_CreateAssistantDeploymentRequest, + responseSerialize: serialize_assistant_api_GetAssistantWebpluginDeploymentResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantWebpluginDeploymentResponse, }, getAssistantWebpluginDeployment: { path: '/assistant_api.AssistantDeploymentService/GetAssistantWebpluginDeployment', requestStream: false, responseStream: false, requestType: assistant$deployment_pb.GetAssistantDeploymentRequest, - responseType: assistant$deployment_pb.AssistantWebpluginDeploymentResponse, + responseType: assistant$deployment_pb.GetAssistantWebpluginDeploymentResponse, requestSerialize: serialize_assistant_api_GetAssistantDeploymentRequest, requestDeserialize: deserialize_assistant_api_GetAssistantDeploymentRequest, - responseSerialize: serialize_assistant_api_AssistantWebpluginDeploymentResponse, - responseDeserialize: deserialize_assistant_api_AssistantWebpluginDeploymentResponse, + responseSerialize: serialize_assistant_api_GetAssistantWebpluginDeploymentResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantWebpluginDeploymentResponse, }, createAssistantDebuggerDeployment: { path: '/assistant_api.AssistantDeploymentService/CreateAssistantDebuggerDeployment', requestStream: false, responseStream: false, - requestType: assistant$deployment_pb.CreateAssistantDebuggerDeploymentRequest, - responseType: assistant$deployment_pb.AssistantDebuggerDeploymentResponse, - requestSerialize: serialize_assistant_api_CreateAssistantDebuggerDeploymentRequest, - requestDeserialize: deserialize_assistant_api_CreateAssistantDebuggerDeploymentRequest, - responseSerialize: serialize_assistant_api_AssistantDebuggerDeploymentResponse, - responseDeserialize: deserialize_assistant_api_AssistantDebuggerDeploymentResponse, + requestType: assistant$deployment_pb.CreateAssistantDeploymentRequest, + responseType: assistant$deployment_pb.GetAssistantDebuggerDeploymentResponse, + requestSerialize: serialize_assistant_api_CreateAssistantDeploymentRequest, + requestDeserialize: deserialize_assistant_api_CreateAssistantDeploymentRequest, + responseSerialize: serialize_assistant_api_GetAssistantDebuggerDeploymentResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantDebuggerDeploymentResponse, }, getAssistantDebuggerDeployment: { path: '/assistant_api.AssistantDeploymentService/GetAssistantDebuggerDeployment', requestStream: false, responseStream: false, requestType: assistant$deployment_pb.GetAssistantDeploymentRequest, - responseType: assistant$deployment_pb.AssistantDebuggerDeploymentResponse, + responseType: assistant$deployment_pb.GetAssistantDebuggerDeploymentResponse, requestSerialize: serialize_assistant_api_GetAssistantDeploymentRequest, requestDeserialize: deserialize_assistant_api_GetAssistantDeploymentRequest, - responseSerialize: serialize_assistant_api_AssistantDebuggerDeploymentResponse, - responseDeserialize: deserialize_assistant_api_AssistantDebuggerDeploymentResponse, + responseSerialize: serialize_assistant_api_GetAssistantDebuggerDeploymentResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantDebuggerDeploymentResponse, }, createAssistantWhatsappDeployment: { path: '/assistant_api.AssistantDeploymentService/CreateAssistantWhatsappDeployment', requestStream: false, responseStream: false, - requestType: assistant$deployment_pb.CreateAssistantWhatsappDeploymentRequest, - responseType: assistant$deployment_pb.AssistantWhatsappDeploymentResponse, - requestSerialize: serialize_assistant_api_CreateAssistantWhatsappDeploymentRequest, - requestDeserialize: deserialize_assistant_api_CreateAssistantWhatsappDeploymentRequest, - responseSerialize: serialize_assistant_api_AssistantWhatsappDeploymentResponse, - responseDeserialize: deserialize_assistant_api_AssistantWhatsappDeploymentResponse, + requestType: assistant$deployment_pb.CreateAssistantDeploymentRequest, + responseType: assistant$deployment_pb.GetAssistantWhatsappDeploymentResponse, + requestSerialize: serialize_assistant_api_CreateAssistantDeploymentRequest, + requestDeserialize: deserialize_assistant_api_CreateAssistantDeploymentRequest, + responseSerialize: serialize_assistant_api_GetAssistantWhatsappDeploymentResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantWhatsappDeploymentResponse, }, getAssistantWhatsappDeployment: { path: '/assistant_api.AssistantDeploymentService/GetAssistantWhatsappDeployment', requestStream: false, responseStream: false, requestType: assistant$deployment_pb.GetAssistantDeploymentRequest, - responseType: assistant$deployment_pb.AssistantWhatsappDeploymentResponse, + responseType: assistant$deployment_pb.GetAssistantWhatsappDeploymentResponse, requestSerialize: serialize_assistant_api_GetAssistantDeploymentRequest, requestDeserialize: deserialize_assistant_api_GetAssistantDeploymentRequest, - responseSerialize: serialize_assistant_api_AssistantWhatsappDeploymentResponse, - responseDeserialize: deserialize_assistant_api_AssistantWhatsappDeploymentResponse, + responseSerialize: serialize_assistant_api_GetAssistantWhatsappDeploymentResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantWhatsappDeploymentResponse, }, createAssistantPhoneDeployment: { path: '/assistant_api.AssistantDeploymentService/CreateAssistantPhoneDeployment', requestStream: false, responseStream: false, - requestType: assistant$deployment_pb.CreateAssistantPhoneDeploymentRequest, - responseType: assistant$deployment_pb.AssistantPhoneDeploymentResponse, - requestSerialize: serialize_assistant_api_CreateAssistantPhoneDeploymentRequest, - requestDeserialize: deserialize_assistant_api_CreateAssistantPhoneDeploymentRequest, - responseSerialize: serialize_assistant_api_AssistantPhoneDeploymentResponse, - responseDeserialize: deserialize_assistant_api_AssistantPhoneDeploymentResponse, + requestType: assistant$deployment_pb.CreateAssistantDeploymentRequest, + responseType: assistant$deployment_pb.GetAssistantPhoneDeploymentResponse, + requestSerialize: serialize_assistant_api_CreateAssistantDeploymentRequest, + requestDeserialize: deserialize_assistant_api_CreateAssistantDeploymentRequest, + responseSerialize: serialize_assistant_api_GetAssistantPhoneDeploymentResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantPhoneDeploymentResponse, }, getAssistantPhoneDeployment: { path: '/assistant_api.AssistantDeploymentService/GetAssistantPhoneDeployment', requestStream: false, responseStream: false, requestType: assistant$deployment_pb.GetAssistantDeploymentRequest, - responseType: assistant$deployment_pb.AssistantPhoneDeploymentResponse, + responseType: assistant$deployment_pb.GetAssistantPhoneDeploymentResponse, requestSerialize: serialize_assistant_api_GetAssistantDeploymentRequest, requestDeserialize: deserialize_assistant_api_GetAssistantDeploymentRequest, - responseSerialize: serialize_assistant_api_AssistantPhoneDeploymentResponse, - responseDeserialize: deserialize_assistant_api_AssistantPhoneDeploymentResponse, + responseSerialize: serialize_assistant_api_GetAssistantPhoneDeploymentResponse, + responseDeserialize: deserialize_assistant_api_GetAssistantPhoneDeploymentResponse, }, }; diff --git a/src/clients/protos/assistant-deployment_pb.d.ts b/src/clients/protos/assistant-deployment_pb.d.ts deleted file mode 100644 index 0ddc123..0000000 --- a/src/clients/protos/assistant-deployment_pb.d.ts +++ /dev/null @@ -1,941 +0,0 @@ -// package: assistant_api -// file: assistant-deployment.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as common_pb from "./common_pb"; - -export class DeploymentAudioProvider extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAudioprovider(): string; - setAudioprovider(value: string): void; - - clearAudiooptionsList(): void; - getAudiooptionsList(): Array; - setAudiooptionsList(value: Array): void; - addAudiooptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - getAudioproviderid(): string; - setAudioproviderid(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - getAudiotype(): string; - setAudiotype(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeploymentAudioProvider.AsObject; - static toObject(includeInstance: boolean, msg: DeploymentAudioProvider): DeploymentAudioProvider.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeploymentAudioProvider, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeploymentAudioProvider; - static deserializeBinaryFromReader(message: DeploymentAudioProvider, reader: jspb.BinaryReader): DeploymentAudioProvider; -} - -export namespace DeploymentAudioProvider { - export type AsObject = { - id: string, - audioprovider: string, - audiooptionsList: Array, - audioproviderid: string, - status: string, - audiotype: string, - } -} - -export class AssistantDeploymentCapturer extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantdeploymentid(): string; - setAssistantdeploymentid(value: string): void; - - getCapturertype(): string; - setCapturertype(value: string): void; - - getCapturerproviderid(): string; - setCapturerproviderid(value: string): void; - - getCapturerprovider(): string; - setCapturerprovider(value: string): void; - - clearCaptureroptionsList(): void; - getCaptureroptionsList(): Array; - setCaptureroptionsList(value: Array): void; - addCaptureroptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - getStatus(): string; - setStatus(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantDeploymentCapturer.AsObject; - static toObject(includeInstance: boolean, msg: AssistantDeploymentCapturer): AssistantDeploymentCapturer.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantDeploymentCapturer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantDeploymentCapturer; - static deserializeBinaryFromReader(message: AssistantDeploymentCapturer, reader: jspb.BinaryReader): AssistantDeploymentCapturer; -} - -export namespace AssistantDeploymentCapturer { - export type AsObject = { - id: string, - assistantdeploymentid: string, - capturertype: string, - capturerproviderid: string, - capturerprovider: string, - captureroptionsList: Array, - status: string, - } -} - -export class AssistantWebpluginDeployment extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getName(): string; - setName(value: string): void; - - getRole(): string; - setRole(value: string): void; - - getTone(): string; - setTone(value: string): void; - - getExperties(): string; - setExperties(value: string): void; - - hasGreeting(): boolean; - clearGreeting(): void; - getGreeting(): string; - setGreeting(value: string): void; - - hasMistake(): boolean; - clearMistake(): void; - getMistake(): string; - setMistake(value: string): void; - - hasEnding(): boolean; - clearEnding(): void; - getEnding(): string; - setEnding(value: string): void; - - hasInputaudio(): boolean; - clearInputaudio(): void; - getInputaudio(): DeploymentAudioProvider | undefined; - setInputaudio(value?: DeploymentAudioProvider): void; - - hasOutputaudio(): boolean; - clearOutputaudio(): void; - getOutputaudio(): DeploymentAudioProvider | undefined; - setOutputaudio(value?: DeploymentAudioProvider): void; - - clearCapturersList(): void; - getCapturersList(): Array; - setCapturersList(value: Array): void; - addCapturers(value?: AssistantDeploymentCapturer, index?: number): AssistantDeploymentCapturer; - - hasUrl(): boolean; - clearUrl(): void; - getUrl(): string; - setUrl(value: string): void; - - hasRaw(): boolean; - clearRaw(): void; - getRaw(): common_pb.Content | undefined; - setRaw(value?: common_pb.Content): void; - - clearSuggestionList(): void; - getSuggestionList(): Array; - setSuggestionList(value: Array): void; - addSuggestion(value: string, index?: number): string; - - getHelpcenterenabled(): boolean; - setHelpcenterenabled(value: boolean): void; - - getProductcatalogenabled(): boolean; - setProductcatalogenabled(value: boolean): void; - - getArticlecatalogenabled(): boolean; - setArticlecatalogenabled(value: boolean): void; - - getUploadfileenabled(): boolean; - setUploadfileenabled(value: boolean): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getStatus(): string; - setStatus(value: string): void; - - getIconCase(): AssistantWebpluginDeployment.IconCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantWebpluginDeployment.AsObject; - static toObject(includeInstance: boolean, msg: AssistantWebpluginDeployment): AssistantWebpluginDeployment.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantWebpluginDeployment, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantWebpluginDeployment; - static deserializeBinaryFromReader(message: AssistantWebpluginDeployment, reader: jspb.BinaryReader): AssistantWebpluginDeployment; -} - -export namespace AssistantWebpluginDeployment { - export type AsObject = { - id: string, - assistantid: string, - name: string, - role: string, - tone: string, - experties: string, - greeting: string, - mistake: string, - ending: string, - inputaudio?: DeploymentAudioProvider.AsObject, - outputaudio?: DeploymentAudioProvider.AsObject, - capturersList: Array, - url: string, - raw?: common_pb.Content.AsObject, - suggestionList: Array, - helpcenterenabled: boolean, - productcatalogenabled: boolean, - articlecatalogenabled: boolean, - uploadfileenabled: boolean, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - status: string, - } - - export enum IconCase { - ICON_NOT_SET = 0, - URL = 15, - RAW = 16, - } -} - -export class AssistantPhoneDeployment extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getName(): string; - setName(value: string): void; - - getRole(): string; - setRole(value: string): void; - - getTone(): string; - setTone(value: string): void; - - getExperties(): string; - setExperties(value: string): void; - - hasGreeting(): boolean; - clearGreeting(): void; - getGreeting(): string; - setGreeting(value: string): void; - - hasMistake(): boolean; - clearMistake(): void; - getMistake(): string; - setMistake(value: string): void; - - hasEnding(): boolean; - clearEnding(): void; - getEnding(): string; - setEnding(value: string): void; - - hasInputaudio(): boolean; - clearInputaudio(): void; - getInputaudio(): DeploymentAudioProvider | undefined; - setInputaudio(value?: DeploymentAudioProvider): void; - - hasOutputaudio(): boolean; - clearOutputaudio(): void; - getOutputaudio(): DeploymentAudioProvider | undefined; - setOutputaudio(value?: DeploymentAudioProvider): void; - - getPhoneprovidername(): string; - setPhoneprovidername(value: string): void; - - getPhoneproviderid(): string; - setPhoneproviderid(value: string): void; - - clearPhoneoptionsList(): void; - getPhoneoptionsList(): Array; - setPhoneoptionsList(value: Array): void; - addPhoneoptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - clearCapturersList(): void; - getCapturersList(): Array; - setCapturersList(value: Array): void; - addCapturers(value?: AssistantDeploymentCapturer, index?: number): AssistantDeploymentCapturer; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getStatus(): string; - setStatus(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantPhoneDeployment.AsObject; - static toObject(includeInstance: boolean, msg: AssistantPhoneDeployment): AssistantPhoneDeployment.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantPhoneDeployment, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantPhoneDeployment; - static deserializeBinaryFromReader(message: AssistantPhoneDeployment, reader: jspb.BinaryReader): AssistantPhoneDeployment; -} - -export namespace AssistantPhoneDeployment { - export type AsObject = { - id: string, - assistantid: string, - name: string, - role: string, - tone: string, - experties: string, - greeting: string, - mistake: string, - ending: string, - inputaudio?: DeploymentAudioProvider.AsObject, - outputaudio?: DeploymentAudioProvider.AsObject, - phoneprovidername: string, - phoneproviderid: string, - phoneoptionsList: Array, - capturersList: Array, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - status: string, - } -} - -export class AssistantWhatsappDeployment extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getName(): string; - setName(value: string): void; - - getRole(): string; - setRole(value: string): void; - - getTone(): string; - setTone(value: string): void; - - getExperties(): string; - setExperties(value: string): void; - - hasGreeting(): boolean; - clearGreeting(): void; - getGreeting(): string; - setGreeting(value: string): void; - - hasMistake(): boolean; - clearMistake(): void; - getMistake(): string; - setMistake(value: string): void; - - hasEnding(): boolean; - clearEnding(): void; - getEnding(): string; - setEnding(value: string): void; - - getWhatsappprovidername(): string; - setWhatsappprovidername(value: string): void; - - getWhatsappproviderid(): string; - setWhatsappproviderid(value: string): void; - - clearWhatsappoptionsList(): void; - getWhatsappoptionsList(): Array; - setWhatsappoptionsList(value: Array): void; - addWhatsappoptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getStatus(): string; - setStatus(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantWhatsappDeployment.AsObject; - static toObject(includeInstance: boolean, msg: AssistantWhatsappDeployment): AssistantWhatsappDeployment.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantWhatsappDeployment, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantWhatsappDeployment; - static deserializeBinaryFromReader(message: AssistantWhatsappDeployment, reader: jspb.BinaryReader): AssistantWhatsappDeployment; -} - -export namespace AssistantWhatsappDeployment { - export type AsObject = { - id: string, - assistantid: string, - name: string, - role: string, - tone: string, - experties: string, - greeting: string, - mistake: string, - ending: string, - whatsappprovidername: string, - whatsappproviderid: string, - whatsappoptionsList: Array, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - status: string, - } -} - -export class AssistantDebuggerDeployment extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getName(): string; - setName(value: string): void; - - getRole(): string; - setRole(value: string): void; - - getTone(): string; - setTone(value: string): void; - - getExperties(): string; - setExperties(value: string): void; - - hasGreeting(): boolean; - clearGreeting(): void; - getGreeting(): string; - setGreeting(value: string): void; - - hasMistake(): boolean; - clearMistake(): void; - getMistake(): string; - setMistake(value: string): void; - - hasEnding(): boolean; - clearEnding(): void; - getEnding(): string; - setEnding(value: string): void; - - hasInputaudio(): boolean; - clearInputaudio(): void; - getInputaudio(): DeploymentAudioProvider | undefined; - setInputaudio(value?: DeploymentAudioProvider): void; - - hasOutputaudio(): boolean; - clearOutputaudio(): void; - getOutputaudio(): DeploymentAudioProvider | undefined; - setOutputaudio(value?: DeploymentAudioProvider): void; - - clearCapturersList(): void; - getCapturersList(): Array; - setCapturersList(value: Array): void; - addCapturers(value?: AssistantDeploymentCapturer, index?: number): AssistantDeploymentCapturer; - - hasUrl(): boolean; - clearUrl(): void; - getUrl(): string; - setUrl(value: string): void; - - hasRaw(): boolean; - clearRaw(): void; - getRaw(): common_pb.Content | undefined; - setRaw(value?: common_pb.Content): void; - - clearSuggestionList(): void; - getSuggestionList(): Array; - setSuggestionList(value: Array): void; - addSuggestion(value: string, index?: number): string; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getStatus(): string; - setStatus(value: string): void; - - getIconCase(): AssistantDebuggerDeployment.IconCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantDebuggerDeployment.AsObject; - static toObject(includeInstance: boolean, msg: AssistantDebuggerDeployment): AssistantDebuggerDeployment.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantDebuggerDeployment, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantDebuggerDeployment; - static deserializeBinaryFromReader(message: AssistantDebuggerDeployment, reader: jspb.BinaryReader): AssistantDebuggerDeployment; -} - -export namespace AssistantDebuggerDeployment { - export type AsObject = { - id: string, - assistantid: string, - name: string, - role: string, - tone: string, - experties: string, - greeting: string, - mistake: string, - ending: string, - inputaudio?: DeploymentAudioProvider.AsObject, - outputaudio?: DeploymentAudioProvider.AsObject, - capturersList: Array, - url: string, - raw?: common_pb.Content.AsObject, - suggestionList: Array, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - status: string, - } - - export enum IconCase { - ICON_NOT_SET = 0, - URL = 15, - RAW = 16, - } -} - -export class AssistantApiDeployment extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getName(): string; - setName(value: string): void; - - getRole(): string; - setRole(value: string): void; - - getTone(): string; - setTone(value: string): void; - - getExperties(): string; - setExperties(value: string): void; - - hasGreeting(): boolean; - clearGreeting(): void; - getGreeting(): string; - setGreeting(value: string): void; - - hasMistake(): boolean; - clearMistake(): void; - getMistake(): string; - setMistake(value: string): void; - - hasEnding(): boolean; - clearEnding(): void; - getEnding(): string; - setEnding(value: string): void; - - hasInputaudio(): boolean; - clearInputaudio(): void; - getInputaudio(): DeploymentAudioProvider | undefined; - setInputaudio(value?: DeploymentAudioProvider): void; - - hasOutputaudio(): boolean; - clearOutputaudio(): void; - getOutputaudio(): DeploymentAudioProvider | undefined; - setOutputaudio(value?: DeploymentAudioProvider): void; - - clearCapturersList(): void; - getCapturersList(): Array; - setCapturersList(value: Array): void; - addCapturers(value?: AssistantDeploymentCapturer, index?: number): AssistantDeploymentCapturer; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getStatus(): string; - setStatus(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantApiDeployment.AsObject; - static toObject(includeInstance: boolean, msg: AssistantApiDeployment): AssistantApiDeployment.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantApiDeployment, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantApiDeployment; - static deserializeBinaryFromReader(message: AssistantApiDeployment, reader: jspb.BinaryReader): AssistantApiDeployment; -} - -export namespace AssistantApiDeployment { - export type AsObject = { - id: string, - assistantid: string, - name: string, - role: string, - tone: string, - experties: string, - greeting: string, - mistake: string, - ending: string, - inputaudio?: DeploymentAudioProvider.AsObject, - outputaudio?: DeploymentAudioProvider.AsObject, - capturersList: Array, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - status: string, - } -} - -export class CreateAssistantApiDeploymentRequest extends jspb.Message { - hasDeployment(): boolean; - clearDeployment(): void; - getDeployment(): AssistantApiDeployment | undefined; - setDeployment(value?: AssistantApiDeployment): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantApiDeploymentRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantApiDeploymentRequest): CreateAssistantApiDeploymentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantApiDeploymentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantApiDeploymentRequest; - static deserializeBinaryFromReader(message: CreateAssistantApiDeploymentRequest, reader: jspb.BinaryReader): CreateAssistantApiDeploymentRequest; -} - -export namespace CreateAssistantApiDeploymentRequest { - export type AsObject = { - deployment?: AssistantApiDeployment.AsObject, - } -} - -export class AssistantApiDeploymentResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantApiDeployment | undefined; - setData(value?: AssistantApiDeployment): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantApiDeploymentResponse.AsObject; - static toObject(includeInstance: boolean, msg: AssistantApiDeploymentResponse): AssistantApiDeploymentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantApiDeploymentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantApiDeploymentResponse; - static deserializeBinaryFromReader(message: AssistantApiDeploymentResponse, reader: jspb.BinaryReader): AssistantApiDeploymentResponse; -} - -export namespace AssistantApiDeploymentResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantApiDeployment.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class CreateAssistantPhoneDeploymentRequest extends jspb.Message { - hasDeployment(): boolean; - clearDeployment(): void; - getDeployment(): AssistantPhoneDeployment | undefined; - setDeployment(value?: AssistantPhoneDeployment): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantPhoneDeploymentRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantPhoneDeploymentRequest): CreateAssistantPhoneDeploymentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantPhoneDeploymentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantPhoneDeploymentRequest; - static deserializeBinaryFromReader(message: CreateAssistantPhoneDeploymentRequest, reader: jspb.BinaryReader): CreateAssistantPhoneDeploymentRequest; -} - -export namespace CreateAssistantPhoneDeploymentRequest { - export type AsObject = { - deployment?: AssistantPhoneDeployment.AsObject, - } -} - -export class AssistantPhoneDeploymentResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantPhoneDeployment | undefined; - setData(value?: AssistantPhoneDeployment): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantPhoneDeploymentResponse.AsObject; - static toObject(includeInstance: boolean, msg: AssistantPhoneDeploymentResponse): AssistantPhoneDeploymentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantPhoneDeploymentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantPhoneDeploymentResponse; - static deserializeBinaryFromReader(message: AssistantPhoneDeploymentResponse, reader: jspb.BinaryReader): AssistantPhoneDeploymentResponse; -} - -export namespace AssistantPhoneDeploymentResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantPhoneDeployment.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class CreateAssistantWhatsappDeploymentRequest extends jspb.Message { - hasDeployment(): boolean; - clearDeployment(): void; - getDeployment(): AssistantWhatsappDeployment | undefined; - setDeployment(value?: AssistantWhatsappDeployment): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantWhatsappDeploymentRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantWhatsappDeploymentRequest): CreateAssistantWhatsappDeploymentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantWhatsappDeploymentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantWhatsappDeploymentRequest; - static deserializeBinaryFromReader(message: CreateAssistantWhatsappDeploymentRequest, reader: jspb.BinaryReader): CreateAssistantWhatsappDeploymentRequest; -} - -export namespace CreateAssistantWhatsappDeploymentRequest { - export type AsObject = { - deployment?: AssistantWhatsappDeployment.AsObject, - } -} - -export class AssistantWhatsappDeploymentResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantWhatsappDeployment | undefined; - setData(value?: AssistantWhatsappDeployment): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantWhatsappDeploymentResponse.AsObject; - static toObject(includeInstance: boolean, msg: AssistantWhatsappDeploymentResponse): AssistantWhatsappDeploymentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantWhatsappDeploymentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantWhatsappDeploymentResponse; - static deserializeBinaryFromReader(message: AssistantWhatsappDeploymentResponse, reader: jspb.BinaryReader): AssistantWhatsappDeploymentResponse; -} - -export namespace AssistantWhatsappDeploymentResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantWhatsappDeployment.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class CreateAssistantDebuggerDeploymentRequest extends jspb.Message { - hasDeployment(): boolean; - clearDeployment(): void; - getDeployment(): AssistantDebuggerDeployment | undefined; - setDeployment(value?: AssistantDebuggerDeployment): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantDebuggerDeploymentRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantDebuggerDeploymentRequest): CreateAssistantDebuggerDeploymentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantDebuggerDeploymentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantDebuggerDeploymentRequest; - static deserializeBinaryFromReader(message: CreateAssistantDebuggerDeploymentRequest, reader: jspb.BinaryReader): CreateAssistantDebuggerDeploymentRequest; -} - -export namespace CreateAssistantDebuggerDeploymentRequest { - export type AsObject = { - deployment?: AssistantDebuggerDeployment.AsObject, - } -} - -export class AssistantDebuggerDeploymentResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantDebuggerDeployment | undefined; - setData(value?: AssistantDebuggerDeployment): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantDebuggerDeploymentResponse.AsObject; - static toObject(includeInstance: boolean, msg: AssistantDebuggerDeploymentResponse): AssistantDebuggerDeploymentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantDebuggerDeploymentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantDebuggerDeploymentResponse; - static deserializeBinaryFromReader(message: AssistantDebuggerDeploymentResponse, reader: jspb.BinaryReader): AssistantDebuggerDeploymentResponse; -} - -export namespace AssistantDebuggerDeploymentResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantDebuggerDeployment.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class CreateAssistantWebpluginDeploymentRequest extends jspb.Message { - hasDeployment(): boolean; - clearDeployment(): void; - getDeployment(): AssistantWebpluginDeployment | undefined; - setDeployment(value?: AssistantWebpluginDeployment): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantWebpluginDeploymentRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantWebpluginDeploymentRequest): CreateAssistantWebpluginDeploymentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantWebpluginDeploymentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantWebpluginDeploymentRequest; - static deserializeBinaryFromReader(message: CreateAssistantWebpluginDeploymentRequest, reader: jspb.BinaryReader): CreateAssistantWebpluginDeploymentRequest; -} - -export namespace CreateAssistantWebpluginDeploymentRequest { - export type AsObject = { - deployment?: AssistantWebpluginDeployment.AsObject, - } -} - -export class AssistantWebpluginDeploymentResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantWebpluginDeployment | undefined; - setData(value?: AssistantWebpluginDeployment): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantWebpluginDeploymentResponse.AsObject; - static toObject(includeInstance: boolean, msg: AssistantWebpluginDeploymentResponse): AssistantWebpluginDeploymentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantWebpluginDeploymentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantWebpluginDeploymentResponse; - static deserializeBinaryFromReader(message: AssistantWebpluginDeploymentResponse, reader: jspb.BinaryReader): AssistantWebpluginDeploymentResponse; -} - -export namespace AssistantWebpluginDeploymentResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantWebpluginDeployment.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAssistantDeploymentRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantDeploymentRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantDeploymentRequest): GetAssistantDeploymentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantDeploymentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantDeploymentRequest; - static deserializeBinaryFromReader(message: GetAssistantDeploymentRequest, reader: jspb.BinaryReader): GetAssistantDeploymentRequest; -} - -export namespace GetAssistantDeploymentRequest { - export type AsObject = { - assistantid: string, - } -} - diff --git a/src/clients/protos/assistant-deployment_pb.js b/src/clients/protos/assistant-deployment_pb.js index c2d06c8..c5c5312 100644 --- a/src/clients/protos/assistant-deployment_pb.js +++ b/src/clients/protos/assistant-deployment_pb.js @@ -26,25 +26,21 @@ goog.object.extend(proto, google_protobuf_timestamp_pb); var common_pb = require('./common_pb.js'); goog.object.extend(proto, common_pb); goog.exportSymbol('proto.assistant_api.AssistantApiDeployment', null, global); -goog.exportSymbol('proto.assistant_api.AssistantApiDeploymentResponse', null, global); goog.exportSymbol('proto.assistant_api.AssistantDebuggerDeployment', null, global); goog.exportSymbol('proto.assistant_api.AssistantDebuggerDeployment.IconCase', null, global); -goog.exportSymbol('proto.assistant_api.AssistantDebuggerDeploymentResponse', null, global); -goog.exportSymbol('proto.assistant_api.AssistantDeploymentCapturer', null, global); goog.exportSymbol('proto.assistant_api.AssistantPhoneDeployment', null, global); -goog.exportSymbol('proto.assistant_api.AssistantPhoneDeploymentResponse', null, global); goog.exportSymbol('proto.assistant_api.AssistantWebpluginDeployment', null, global); goog.exportSymbol('proto.assistant_api.AssistantWebpluginDeployment.IconCase', null, global); -goog.exportSymbol('proto.assistant_api.AssistantWebpluginDeploymentResponse', null, global); goog.exportSymbol('proto.assistant_api.AssistantWhatsappDeployment', null, global); -goog.exportSymbol('proto.assistant_api.AssistantWhatsappDeploymentResponse', null, global); -goog.exportSymbol('proto.assistant_api.CreateAssistantApiDeploymentRequest', null, global); -goog.exportSymbol('proto.assistant_api.CreateAssistantDebuggerDeploymentRequest', null, global); -goog.exportSymbol('proto.assistant_api.CreateAssistantPhoneDeploymentRequest', null, global); -goog.exportSymbol('proto.assistant_api.CreateAssistantWebpluginDeploymentRequest', null, global); -goog.exportSymbol('proto.assistant_api.CreateAssistantWhatsappDeploymentRequest', null, global); +goog.exportSymbol('proto.assistant_api.CreateAssistantDeploymentRequest', null, global); +goog.exportSymbol('proto.assistant_api.CreateAssistantDeploymentRequest.DeploymentCase', null, global); goog.exportSymbol('proto.assistant_api.DeploymentAudioProvider', null, global); +goog.exportSymbol('proto.assistant_api.GetAssistantApiDeploymentResponse', null, global); +goog.exportSymbol('proto.assistant_api.GetAssistantDebuggerDeploymentResponse', null, global); goog.exportSymbol('proto.assistant_api.GetAssistantDeploymentRequest', null, global); +goog.exportSymbol('proto.assistant_api.GetAssistantPhoneDeploymentResponse', null, global); +goog.exportSymbol('proto.assistant_api.GetAssistantWebpluginDeploymentResponse', null, global); +goog.exportSymbol('proto.assistant_api.GetAssistantWhatsappDeploymentResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -66,27 +62,6 @@ if (goog.DEBUG && !COMPILED) { */ proto.assistant_api.DeploymentAudioProvider.displayName = 'proto.assistant_api.DeploymentAudioProvider'; } -/** - * 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.assistant_api.AssistantDeploymentCapturer = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.assistant_api.AssistantDeploymentCapturer.repeatedFields_, null); -}; -goog.inherits(proto.assistant_api.AssistantDeploymentCapturer, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.assistant_api.AssistantDeploymentCapturer.displayName = 'proto.assistant_api.AssistantDeploymentCapturer'; -} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -182,7 +157,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.assistant_api.AssistantApiDeployment = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.assistant_api.AssistantApiDeployment.repeatedFields_, null); + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.assistant_api.AssistantApiDeployment, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -202,100 +177,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.assistant_api.CreateAssistantApiDeploymentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.assistant_api.CreateAssistantApiDeploymentRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.assistant_api.CreateAssistantApiDeploymentRequest.displayName = 'proto.assistant_api.CreateAssistantApiDeploymentRequest'; -} -/** - * 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.assistant_api.AssistantApiDeploymentResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.assistant_api.AssistantApiDeploymentResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.assistant_api.AssistantApiDeploymentResponse.displayName = 'proto.assistant_api.AssistantApiDeploymentResponse'; -} -/** - * 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.assistant_api.CreateAssistantPhoneDeploymentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.assistant_api.CreateAssistantPhoneDeploymentRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.assistant_api.CreateAssistantPhoneDeploymentRequest.displayName = 'proto.assistant_api.CreateAssistantPhoneDeploymentRequest'; -} -/** - * 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.assistant_api.AssistantPhoneDeploymentResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.assistant_api.AssistantPhoneDeploymentResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.assistant_api.AssistantPhoneDeploymentResponse.displayName = 'proto.assistant_api.AssistantPhoneDeploymentResponse'; -} -/** - * 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.assistant_api.CreateAssistantWhatsappDeploymentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.assistant_api.CreateAssistantDeploymentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.assistant_api.CreateAssistantDeploymentRequest.oneofGroups_); }; -goog.inherits(proto.assistant_api.CreateAssistantWhatsappDeploymentRequest, jspb.Message); +goog.inherits(proto.assistant_api.CreateAssistantDeploymentRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.displayName = 'proto.assistant_api.CreateAssistantWhatsappDeploymentRequest'; + proto.assistant_api.CreateAssistantDeploymentRequest.displayName = 'proto.assistant_api.CreateAssistantDeploymentRequest'; } /** * Generated by JsPbCodeGenerator. @@ -307,16 +198,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.assistant_api.AssistantWhatsappDeploymentResponse = function(opt_data) { +proto.assistant_api.GetAssistantApiDeploymentResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.assistant_api.AssistantWhatsappDeploymentResponse, jspb.Message); +goog.inherits(proto.assistant_api.GetAssistantApiDeploymentResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.assistant_api.AssistantWhatsappDeploymentResponse.displayName = 'proto.assistant_api.AssistantWhatsappDeploymentResponse'; + proto.assistant_api.GetAssistantApiDeploymentResponse.displayName = 'proto.assistant_api.GetAssistantApiDeploymentResponse'; } /** * Generated by JsPbCodeGenerator. @@ -328,16 +219,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest = function(opt_data) { +proto.assistant_api.GetAssistantPhoneDeploymentResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.assistant_api.CreateAssistantDebuggerDeploymentRequest, jspb.Message); +goog.inherits(proto.assistant_api.GetAssistantPhoneDeploymentResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.displayName = 'proto.assistant_api.CreateAssistantDebuggerDeploymentRequest'; + proto.assistant_api.GetAssistantPhoneDeploymentResponse.displayName = 'proto.assistant_api.GetAssistantPhoneDeploymentResponse'; } /** * Generated by JsPbCodeGenerator. @@ -349,16 +240,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.assistant_api.AssistantDebuggerDeploymentResponse = function(opt_data) { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.assistant_api.AssistantDebuggerDeploymentResponse, jspb.Message); +goog.inherits(proto.assistant_api.GetAssistantWhatsappDeploymentResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.assistant_api.AssistantDebuggerDeploymentResponse.displayName = 'proto.assistant_api.AssistantDebuggerDeploymentResponse'; + proto.assistant_api.GetAssistantWhatsappDeploymentResponse.displayName = 'proto.assistant_api.GetAssistantWhatsappDeploymentResponse'; } /** * Generated by JsPbCodeGenerator. @@ -370,16 +261,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest = function(opt_data) { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.assistant_api.CreateAssistantWebpluginDeploymentRequest, jspb.Message); +goog.inherits(proto.assistant_api.GetAssistantDebuggerDeploymentResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.displayName = 'proto.assistant_api.CreateAssistantWebpluginDeploymentRequest'; + proto.assistant_api.GetAssistantDebuggerDeploymentResponse.displayName = 'proto.assistant_api.GetAssistantDebuggerDeploymentResponse'; } /** * Generated by JsPbCodeGenerator. @@ -391,16 +282,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.assistant_api.AssistantWebpluginDeploymentResponse = function(opt_data) { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.assistant_api.AssistantWebpluginDeploymentResponse, jspb.Message); +goog.inherits(proto.assistant_api.GetAssistantWebpluginDeploymentResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.assistant_api.AssistantWebpluginDeploymentResponse.displayName = 'proto.assistant_api.AssistantWebpluginDeploymentResponse'; + proto.assistant_api.GetAssistantWebpluginDeploymentResponse.displayName = 'proto.assistant_api.GetAssistantWebpluginDeploymentResponse'; } /** * Generated by JsPbCodeGenerator. @@ -739,7 +630,33 @@ proto.assistant_api.DeploymentAudioProvider.prototype.setAudiotype = function(va * @private {!Array} * @const */ -proto.assistant_api.AssistantDeploymentCapturer.repeatedFields_ = [6]; +proto.assistant_api.AssistantWebpluginDeployment.repeatedFields_ = [20]; + +/** + * 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.assistant_api.AssistantWebpluginDeployment.oneofGroups_ = [[15,16]]; + +/** + * @enum {number} + */ +proto.assistant_api.AssistantWebpluginDeployment.IconCase = { + ICON_NOT_SET: 0, + URL: 15, + RAW: 16 +}; + +/** + * @return {proto.assistant_api.AssistantWebpluginDeployment.IconCase} + */ +proto.assistant_api.AssistantWebpluginDeployment.prototype.getIconCase = function() { + return /** @type {proto.assistant_api.AssistantWebpluginDeployment.IconCase} */(jspb.Message.computeOneofCase(this, proto.assistant_api.AssistantWebpluginDeployment.oneofGroups_[0])); +}; @@ -756,8 +673,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.AssistantDeploymentCapturer.toObject(opt_includeInstance, this); +proto.assistant_api.AssistantWebpluginDeployment.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.AssistantWebpluginDeployment.toObject(opt_includeInstance, this); }; @@ -766,20 +683,30 @@ proto.assistant_api.AssistantDeploymentCapturer.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.assistant_api.AssistantDeploymentCapturer} msg The msg instance to transform. + * @param {!proto.assistant_api.AssistantWebpluginDeployment} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantDeploymentCapturer.toObject = function(includeInstance, msg) { +proto.assistant_api.AssistantWebpluginDeployment.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, "0"), - assistantdeploymentid: jspb.Message.getFieldWithDefault(msg, 2, "0"), - capturertype: jspb.Message.getFieldWithDefault(msg, 3, ""), - capturerproviderid: jspb.Message.getFieldWithDefault(msg, 4, "0"), - capturerprovider: jspb.Message.getFieldWithDefault(msg, 5, ""), - captureroptionsList: jspb.Message.toObjectList(msg.getCaptureroptionsList(), - common_pb.Metadata.toObject, includeInstance), - status: jspb.Message.getFieldWithDefault(msg, 7, "") + assistantid: jspb.Message.getFieldWithDefault(msg, 5, "0"), + name: jspb.Message.getFieldWithDefault(msg, 6, ""), + greeting: jspb.Message.getFieldWithDefault(msg, 10, ""), + mistake: jspb.Message.getFieldWithDefault(msg, 11, ""), + ending: jspb.Message.getFieldWithDefault(msg, 12, ""), + inputaudio: (f = msg.getInputaudio()) && proto.assistant_api.DeploymentAudioProvider.toObject(includeInstance, f), + outputaudio: (f = msg.getOutputaudio()) && proto.assistant_api.DeploymentAudioProvider.toObject(includeInstance, f), + url: jspb.Message.getFieldWithDefault(msg, 15, ""), + raw: (f = msg.getRaw()) && common_pb.Content.toObject(includeInstance, f), + suggestionList: (f = jspb.Message.getRepeatedField(msg, 20)) == null ? undefined : f, + helpcenterenabled: jspb.Message.getBooleanFieldWithDefault(msg, 21, false), + productcatalogenabled: jspb.Message.getBooleanFieldWithDefault(msg, 22, false), + articlecatalogenabled: jspb.Message.getBooleanFieldWithDefault(msg, 23, false), + uploadfileenabled: jspb.Message.getBooleanFieldWithDefault(msg, 24, false), + createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + status: jspb.Message.getFieldWithDefault(msg, 28, "") }; if (includeInstance) { @@ -793,23 +720,23 @@ proto.assistant_api.AssistantDeploymentCapturer.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.assistant_api.AssistantDeploymentCapturer} + * @return {!proto.assistant_api.AssistantWebpluginDeployment} */ -proto.assistant_api.AssistantDeploymentCapturer.deserializeBinary = function(bytes) { +proto.assistant_api.AssistantWebpluginDeployment.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.AssistantDeploymentCapturer; - return proto.assistant_api.AssistantDeploymentCapturer.deserializeBinaryFromReader(msg, reader); + var msg = new proto.assistant_api.AssistantWebpluginDeployment; + return proto.assistant_api.AssistantWebpluginDeployment.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.assistant_api.AssistantDeploymentCapturer} msg The message object to deserialize into. + * @param {!proto.assistant_api.AssistantWebpluginDeployment} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.AssistantDeploymentCapturer} + * @return {!proto.assistant_api.AssistantWebpluginDeployment} */ -proto.assistant_api.AssistantDeploymentCapturer.deserializeBinaryFromReader = function(msg, reader) { +proto.assistant_api.AssistantWebpluginDeployment.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -820,28 +747,76 @@ proto.assistant_api.AssistantDeploymentCapturer.deserializeBinaryFromReader = fu var value = /** @type {string} */ (reader.readUint64String()); msg.setId(value); break; - case 2: + case 5: var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantdeploymentid(value); + msg.setAssistantid(value); break; - case 3: + case 6: var value = /** @type {string} */ (reader.readString()); - msg.setCapturertype(value); + msg.setName(value); break; - case 4: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setCapturerproviderid(value); + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setGreeting(value); break; - case 5: + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setMistake(value); + break; + case 12: var value = /** @type {string} */ (reader.readString()); - msg.setCapturerprovider(value); + msg.setEnding(value); break; - case 6: - var value = new common_pb.Metadata; - reader.readMessage(value,common_pb.Metadata.deserializeBinaryFromReader); - msg.addCaptureroptions(value); + case 13: + var value = new proto.assistant_api.DeploymentAudioProvider; + reader.readMessage(value,proto.assistant_api.DeploymentAudioProvider.deserializeBinaryFromReader); + msg.setInputaudio(value); + break; + case 14: + var value = new proto.assistant_api.DeploymentAudioProvider; + reader.readMessage(value,proto.assistant_api.DeploymentAudioProvider.deserializeBinaryFromReader); + msg.setOutputaudio(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 16: + var value = new common_pb.Content; + reader.readMessage(value,common_pb.Content.deserializeBinaryFromReader); + msg.setRaw(value); + break; + case 20: + var value = /** @type {string} */ (reader.readString()); + msg.addSuggestion(value); + break; + case 21: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHelpcenterenabled(value); + break; + case 22: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProductcatalogenabled(value); + break; + case 23: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setArticlecatalogenabled(value); + break; + case 24: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUploadfileenabled(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 7: + case 28: var value = /** @type {string} */ (reader.readString()); msg.setStatus(value); break; @@ -858,9 +833,9 @@ proto.assistant_api.AssistantDeploymentCapturer.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.serializeBinary = function() { +proto.assistant_api.AssistantWebpluginDeployment.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.assistant_api.AssistantDeploymentCapturer.serializeBinaryToWriter(this, writer); + proto.assistant_api.AssistantWebpluginDeployment.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -868,11 +843,11 @@ proto.assistant_api.AssistantDeploymentCapturer.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.AssistantDeploymentCapturer} message + * @param {!proto.assistant_api.AssistantWebpluginDeployment} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantDeploymentCapturer.serializeBinaryToWriter = function(message, writer) { +proto.assistant_api.AssistantWebpluginDeployment.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (parseInt(f, 10) !== 0) { @@ -881,505 +856,38 @@ proto.assistant_api.AssistantDeploymentCapturer.serializeBinaryToWriter = functi f ); } - f = message.getAssistantdeploymentid(); + f = message.getAssistantid(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( - 2, + 5, f ); } - f = message.getCapturertype(); + f = message.getName(); if (f.length > 0) { writer.writeString( - 3, + 6, f ); } - f = message.getCapturerproviderid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 4, + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString( + 10, f ); } - f = message.getCapturerprovider(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { writer.writeString( - 5, + 11, f ); } - f = message.getCaptureroptionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - common_pb.Metadata.serializeBinaryToWriter - ); - } - f = message.getStatus(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 12)); + if (f != null) { writer.writeString( - 7, - f - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {string} - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantDeploymentCapturer} returns this - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.setId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional uint64 assistantDeploymentId = 2; - * @return {string} - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.getAssistantdeploymentid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantDeploymentCapturer} returns this - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.setAssistantdeploymentid = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); -}; - - -/** - * optional string capturerType = 3; - * @return {string} - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.getCapturertype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantDeploymentCapturer} returns this - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.setCapturertype = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint64 capturerProviderId = 4; - * @return {string} - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.getCapturerproviderid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantDeploymentCapturer} returns this - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.setCapturerproviderid = function(value) { - return jspb.Message.setProto3StringIntField(this, 4, value); -}; - - -/** - * optional string capturerProvider = 5; - * @return {string} - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.getCapturerprovider = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantDeploymentCapturer} returns this - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.setCapturerprovider = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * repeated Metadata capturerOptions = 6; - * @return {!Array} - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.getCaptureroptionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, common_pb.Metadata, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.assistant_api.AssistantDeploymentCapturer} returns this -*/ -proto.assistant_api.AssistantDeploymentCapturer.prototype.setCaptureroptionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); -}; - - -/** - * @param {!proto.Metadata=} opt_value - * @param {number=} opt_index - * @return {!proto.Metadata} - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.addCaptureroptions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.Metadata, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.assistant_api.AssistantDeploymentCapturer} returns this - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.clearCaptureroptionsList = function() { - return this.setCaptureroptionsList([]); -}; - - -/** - * optional string status = 7; - * @return {string} - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.getStatus = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantDeploymentCapturer} returns this - */ -proto.assistant_api.AssistantDeploymentCapturer.prototype.setStatus = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.assistant_api.AssistantWebpluginDeployment.repeatedFields_ = [17,20]; - -/** - * 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.assistant_api.AssistantWebpluginDeployment.oneofGroups_ = [[15,16]]; - -/** - * @enum {number} - */ -proto.assistant_api.AssistantWebpluginDeployment.IconCase = { - ICON_NOT_SET: 0, - URL: 15, - RAW: 16 -}; - -/** - * @return {proto.assistant_api.AssistantWebpluginDeployment.IconCase} - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.getIconCase = function() { - return /** @type {proto.assistant_api.AssistantWebpluginDeployment.IconCase} */(jspb.Message.computeOneofCase(this, proto.assistant_api.AssistantWebpluginDeployment.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.assistant_api.AssistantWebpluginDeployment.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.AssistantWebpluginDeployment.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.assistant_api.AssistantWebpluginDeployment} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.assistant_api.AssistantWebpluginDeployment.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "0"), - assistantid: jspb.Message.getFieldWithDefault(msg, 5, "0"), - name: jspb.Message.getFieldWithDefault(msg, 6, ""), - role: jspb.Message.getFieldWithDefault(msg, 7, ""), - tone: jspb.Message.getFieldWithDefault(msg, 8, ""), - experties: jspb.Message.getFieldWithDefault(msg, 9, ""), - greeting: jspb.Message.getFieldWithDefault(msg, 10, ""), - mistake: jspb.Message.getFieldWithDefault(msg, 11, ""), - ending: jspb.Message.getFieldWithDefault(msg, 12, ""), - inputaudio: (f = msg.getInputaudio()) && proto.assistant_api.DeploymentAudioProvider.toObject(includeInstance, f), - outputaudio: (f = msg.getOutputaudio()) && proto.assistant_api.DeploymentAudioProvider.toObject(includeInstance, f), - capturersList: jspb.Message.toObjectList(msg.getCapturersList(), - proto.assistant_api.AssistantDeploymentCapturer.toObject, includeInstance), - url: jspb.Message.getFieldWithDefault(msg, 15, ""), - raw: (f = msg.getRaw()) && common_pb.Content.toObject(includeInstance, f), - suggestionList: (f = jspb.Message.getRepeatedField(msg, 20)) == null ? undefined : f, - helpcenterenabled: jspb.Message.getBooleanFieldWithDefault(msg, 21, false), - productcatalogenabled: jspb.Message.getBooleanFieldWithDefault(msg, 22, false), - articlecatalogenabled: jspb.Message.getBooleanFieldWithDefault(msg, 23, false), - uploadfileenabled: jspb.Message.getBooleanFieldWithDefault(msg, 24, false), - createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - status: jspb.Message.getFieldWithDefault(msg, 28, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.assistant_api.AssistantWebpluginDeployment} - */ -proto.assistant_api.AssistantWebpluginDeployment.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.AssistantWebpluginDeployment; - return proto.assistant_api.AssistantWebpluginDeployment.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.assistant_api.AssistantWebpluginDeployment} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.AssistantWebpluginDeployment} - */ -proto.assistant_api.AssistantWebpluginDeployment.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 5: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantid(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setRole(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setTone(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setExperties(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setGreeting(value); - break; - case 11: - var value = /** @type {string} */ (reader.readString()); - msg.setMistake(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setEnding(value); - break; - case 13: - var value = new proto.assistant_api.DeploymentAudioProvider; - reader.readMessage(value,proto.assistant_api.DeploymentAudioProvider.deserializeBinaryFromReader); - msg.setInputaudio(value); - break; - case 14: - var value = new proto.assistant_api.DeploymentAudioProvider; - reader.readMessage(value,proto.assistant_api.DeploymentAudioProvider.deserializeBinaryFromReader); - msg.setOutputaudio(value); - break; - case 17: - var value = new proto.assistant_api.AssistantDeploymentCapturer; - reader.readMessage(value,proto.assistant_api.AssistantDeploymentCapturer.deserializeBinaryFromReader); - msg.addCapturers(value); - break; - case 15: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - case 16: - var value = new common_pb.Content; - reader.readMessage(value,common_pb.Content.deserializeBinaryFromReader); - msg.setRaw(value); - break; - case 20: - var value = /** @type {string} */ (reader.readString()); - msg.addSuggestion(value); - break; - case 21: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setHelpcenterenabled(value); - break; - case 22: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProductcatalogenabled(value); - break; - case 23: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setArticlecatalogenabled(value); - break; - case 24: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUploadfileenabled(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 = /** @type {string} */ (reader.readString()); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.assistant_api.AssistantWebpluginDeployment.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.AssistantWebpluginDeployment} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.assistant_api.AssistantWebpluginDeployment.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getAssistantid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 5, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getRole(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getTone(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getExperties(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 10)); - if (f != null) { - writer.writeString( - 10, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 11)); - if (f != null) { - writer.writeString( - 11, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 12)); - if (f != null) { - writer.writeString( - 12, + 12, f ); } @@ -1399,14 +907,6 @@ proto.assistant_api.AssistantWebpluginDeployment.serializeBinaryToWriter = funct proto.assistant_api.DeploymentAudioProvider.serializeBinaryToWriter ); } - f = message.getCapturersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 17, - f, - proto.assistant_api.AssistantDeploymentCapturer.serializeBinaryToWriter - ); - } f = /** @type {string} */ (jspb.Message.getField(message, 15)); if (f != null) { writer.writeString( @@ -1537,60 +1037,6 @@ proto.assistant_api.AssistantWebpluginDeployment.prototype.setName = function(va }; -/** - * optional string role = 7; - * @return {string} - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.getRole = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantWebpluginDeployment} returns this - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.setRole = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string tone = 8; - * @return {string} - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.getTone = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantWebpluginDeployment} returns this - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.setTone = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional string experties = 9; - * @return {string} - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.getExperties = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantWebpluginDeployment} returns this - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.setExperties = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - /** * optional string greeting = 10; * @return {string} @@ -1773,44 +1219,6 @@ proto.assistant_api.AssistantWebpluginDeployment.prototype.hasOutputaudio = func }; -/** - * repeated AssistantDeploymentCapturer capturers = 17; - * @return {!Array} - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.getCapturersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.assistant_api.AssistantDeploymentCapturer, 17)); -}; - - -/** - * @param {!Array} value - * @return {!proto.assistant_api.AssistantWebpluginDeployment} returns this -*/ -proto.assistant_api.AssistantWebpluginDeployment.prototype.setCapturersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 17, value); -}; - - -/** - * @param {!proto.assistant_api.AssistantDeploymentCapturer=} opt_value - * @param {number=} opt_index - * @return {!proto.assistant_api.AssistantDeploymentCapturer} - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.addCapturers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 17, opt_value, proto.assistant_api.AssistantDeploymentCapturer, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.assistant_api.AssistantWebpluginDeployment} returns this - */ -proto.assistant_api.AssistantWebpluginDeployment.prototype.clearCapturersList = function() { - return this.setCapturersList([]); -}; - - /** * optional string url = 15; * @return {string} @@ -2091,7 +1499,7 @@ proto.assistant_api.AssistantWebpluginDeployment.prototype.setStatus = function( * @private {!Array} * @const */ -proto.assistant_api.AssistantPhoneDeployment.repeatedFields_ = [17,18]; +proto.assistant_api.AssistantPhoneDeployment.repeatedFields_ = [17]; @@ -2126,10 +1534,6 @@ proto.assistant_api.AssistantPhoneDeployment.toObject = function(includeInstance var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, "0"), assistantid: jspb.Message.getFieldWithDefault(msg, 5, "0"), - name: jspb.Message.getFieldWithDefault(msg, 6, ""), - role: jspb.Message.getFieldWithDefault(msg, 7, ""), - tone: jspb.Message.getFieldWithDefault(msg, 8, ""), - experties: jspb.Message.getFieldWithDefault(msg, 9, ""), greeting: jspb.Message.getFieldWithDefault(msg, 10, ""), mistake: jspb.Message.getFieldWithDefault(msg, 11, ""), ending: jspb.Message.getFieldWithDefault(msg, 12, ""), @@ -2139,8 +1543,6 @@ proto.assistant_api.AssistantPhoneDeployment.toObject = function(includeInstance phoneproviderid: jspb.Message.getFieldWithDefault(msg, 16, "0"), phoneoptionsList: jspb.Message.toObjectList(msg.getPhoneoptionsList(), common_pb.Metadata.toObject, includeInstance), - capturersList: jspb.Message.toObjectList(msg.getCapturersList(), - proto.assistant_api.AssistantDeploymentCapturer.toObject, includeInstance), createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), status: jspb.Message.getFieldWithDefault(msg, 28, "") @@ -2188,22 +1590,6 @@ proto.assistant_api.AssistantPhoneDeployment.deserializeBinaryFromReader = funct var value = /** @type {string} */ (reader.readUint64String()); msg.setAssistantid(value); break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setRole(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setTone(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setExperties(value); - break; case 10: var value = /** @type {string} */ (reader.readString()); msg.setGreeting(value); @@ -2239,11 +1625,6 @@ proto.assistant_api.AssistantPhoneDeployment.deserializeBinaryFromReader = funct reader.readMessage(value,common_pb.Metadata.deserializeBinaryFromReader); msg.addPhoneoptions(value); break; - case 18: - var value = new proto.assistant_api.AssistantDeploymentCapturer; - reader.readMessage(value,proto.assistant_api.AssistantDeploymentCapturer.deserializeBinaryFromReader); - msg.addCapturers(value); - break; case 26: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); @@ -2301,34 +1682,6 @@ proto.assistant_api.AssistantPhoneDeployment.serializeBinaryToWriter = function( f ); } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getRole(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getTone(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getExperties(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } f = /** @type {string} */ (jspb.Message.getField(message, 10)); if (f != null) { writer.writeString( @@ -2380,126 +1733,46 @@ proto.assistant_api.AssistantPhoneDeployment.serializeBinaryToWriter = function( f ); } - f = message.getPhoneoptionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 17, - f, - common_pb.Metadata.serializeBinaryToWriter - ); - } - f = message.getCapturersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 18, - f, - proto.assistant_api.AssistantDeploymentCapturer.serializeBinaryToWriter - ); - } - f = message.getCreateddate(); - if (f != null) { - writer.writeMessage( - 26, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getUpdateddate(); - if (f != null) { - writer.writeMessage( - 27, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getStatus(); - if (f.length > 0) { - writer.writeString( - 28, - f - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {string} - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantPhoneDeployment} returns this - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.setId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional uint64 assistantId = 5; - * @return {string} - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.getAssistantid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantPhoneDeployment} returns this - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.setAssistantid = function(value) { - return jspb.Message.setProto3StringIntField(this, 5, value); -}; - - -/** - * optional string name = 6; - * @return {string} - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantPhoneDeployment} returns this - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string role = 7; - * @return {string} - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.getRole = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantPhoneDeployment} returns this - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.setRole = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); + f = message.getPhoneoptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 17, + f, + common_pb.Metadata.serializeBinaryToWriter + ); + } + f = message.getCreateddate(); + if (f != null) { + writer.writeMessage( + 26, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUpdateddate(); + if (f != null) { + writer.writeMessage( + 27, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( + 28, + f + ); + } }; /** - * optional string tone = 8; + * optional uint64 id = 1; * @return {string} */ -proto.assistant_api.AssistantPhoneDeployment.prototype.getTone = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.assistant_api.AssistantPhoneDeployment.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; @@ -2507,17 +1780,17 @@ proto.assistant_api.AssistantPhoneDeployment.prototype.getTone = function() { * @param {string} value * @return {!proto.assistant_api.AssistantPhoneDeployment} returns this */ -proto.assistant_api.AssistantPhoneDeployment.prototype.setTone = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); +proto.assistant_api.AssistantPhoneDeployment.prototype.setId = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * optional string experties = 9; + * optional uint64 assistantId = 5; * @return {string} */ -proto.assistant_api.AssistantPhoneDeployment.prototype.getExperties = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +proto.assistant_api.AssistantPhoneDeployment.prototype.getAssistantid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; @@ -2525,8 +1798,8 @@ proto.assistant_api.AssistantPhoneDeployment.prototype.getExperties = function() * @param {string} value * @return {!proto.assistant_api.AssistantPhoneDeployment} returns this */ -proto.assistant_api.AssistantPhoneDeployment.prototype.setExperties = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); +proto.assistant_api.AssistantPhoneDeployment.prototype.setAssistantid = function(value) { + return jspb.Message.setProto3StringIntField(this, 5, value); }; @@ -2786,44 +2059,6 @@ proto.assistant_api.AssistantPhoneDeployment.prototype.clearPhoneoptionsList = f }; -/** - * repeated AssistantDeploymentCapturer capturers = 18; - * @return {!Array} - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.getCapturersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.assistant_api.AssistantDeploymentCapturer, 18)); -}; - - -/** - * @param {!Array} value - * @return {!proto.assistant_api.AssistantPhoneDeployment} returns this -*/ -proto.assistant_api.AssistantPhoneDeployment.prototype.setCapturersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 18, value); -}; - - -/** - * @param {!proto.assistant_api.AssistantDeploymentCapturer=} opt_value - * @param {number=} opt_index - * @return {!proto.assistant_api.AssistantDeploymentCapturer} - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.addCapturers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 18, opt_value, proto.assistant_api.AssistantDeploymentCapturer, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.assistant_api.AssistantPhoneDeployment} returns this - */ -proto.assistant_api.AssistantPhoneDeployment.prototype.clearCapturersList = function() { - return this.setCapturersList([]); -}; - - /** * optional google.protobuf.Timestamp createdDate = 26; * @return {?proto.google.protobuf.Timestamp} @@ -2958,9 +2193,6 @@ proto.assistant_api.AssistantWhatsappDeployment.toObject = function(includeInsta id: jspb.Message.getFieldWithDefault(msg, 1, "0"), assistantid: jspb.Message.getFieldWithDefault(msg, 5, "0"), name: jspb.Message.getFieldWithDefault(msg, 6, ""), - role: jspb.Message.getFieldWithDefault(msg, 7, ""), - tone: jspb.Message.getFieldWithDefault(msg, 8, ""), - experties: jspb.Message.getFieldWithDefault(msg, 9, ""), greeting: jspb.Message.getFieldWithDefault(msg, 10, ""), mistake: jspb.Message.getFieldWithDefault(msg, 11, ""), ending: jspb.Message.getFieldWithDefault(msg, 12, ""), @@ -3019,18 +2251,6 @@ proto.assistant_api.AssistantWhatsappDeployment.deserializeBinaryFromReader = fu var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setRole(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setTone(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setExperties(value); - break; case 10: var value = /** @type {string} */ (reader.readString()); msg.setGreeting(value); @@ -3120,27 +2340,6 @@ proto.assistant_api.AssistantWhatsappDeployment.serializeBinaryToWriter = functi f ); } - f = message.getRole(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getTone(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getExperties(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } f = /** @type {string} */ (jspb.Message.getField(message, 10)); if (f != null) { writer.writeString( @@ -3264,60 +2463,6 @@ proto.assistant_api.AssistantWhatsappDeployment.prototype.setName = function(val }; -/** - * optional string role = 7; - * @return {string} - */ -proto.assistant_api.AssistantWhatsappDeployment.prototype.getRole = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantWhatsappDeployment} returns this - */ -proto.assistant_api.AssistantWhatsappDeployment.prototype.setRole = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string tone = 8; - * @return {string} - */ -proto.assistant_api.AssistantWhatsappDeployment.prototype.getTone = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantWhatsappDeployment} returns this - */ -proto.assistant_api.AssistantWhatsappDeployment.prototype.setTone = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional string experties = 9; - * @return {string} - */ -proto.assistant_api.AssistantWhatsappDeployment.prototype.getExperties = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantWhatsappDeployment} returns this - */ -proto.assistant_api.AssistantWhatsappDeployment.prototype.setExperties = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - /** * optional string greeting = 10; * @return {string} @@ -3598,7 +2743,7 @@ proto.assistant_api.AssistantWhatsappDeployment.prototype.setStatus = function(v * @private {!Array} * @const */ -proto.assistant_api.AssistantDebuggerDeployment.repeatedFields_ = [18,20]; +proto.assistant_api.AssistantDebuggerDeployment.repeatedFields_ = [20]; /** * Oneof group definitions for this message. Each group defines the field @@ -3660,16 +2805,11 @@ proto.assistant_api.AssistantDebuggerDeployment.toObject = function(includeInsta id: jspb.Message.getFieldWithDefault(msg, 1, "0"), assistantid: jspb.Message.getFieldWithDefault(msg, 5, "0"), name: jspb.Message.getFieldWithDefault(msg, 6, ""), - role: jspb.Message.getFieldWithDefault(msg, 7, ""), - tone: jspb.Message.getFieldWithDefault(msg, 8, ""), - experties: jspb.Message.getFieldWithDefault(msg, 9, ""), greeting: jspb.Message.getFieldWithDefault(msg, 10, ""), mistake: jspb.Message.getFieldWithDefault(msg, 11, ""), ending: jspb.Message.getFieldWithDefault(msg, 12, ""), inputaudio: (f = msg.getInputaudio()) && proto.assistant_api.DeploymentAudioProvider.toObject(includeInstance, f), outputaudio: (f = msg.getOutputaudio()) && proto.assistant_api.DeploymentAudioProvider.toObject(includeInstance, f), - capturersList: jspb.Message.toObjectList(msg.getCapturersList(), - proto.assistant_api.AssistantDeploymentCapturer.toObject, includeInstance), url: jspb.Message.getFieldWithDefault(msg, 15, ""), raw: (f = msg.getRaw()) && common_pb.Content.toObject(includeInstance, f), suggestionList: (f = jspb.Message.getRepeatedField(msg, 20)) == null ? undefined : f, @@ -3724,18 +2864,6 @@ proto.assistant_api.AssistantDebuggerDeployment.deserializeBinaryFromReader = fu var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setRole(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setTone(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setExperties(value); - break; case 10: var value = /** @type {string} */ (reader.readString()); msg.setGreeting(value); @@ -3758,11 +2886,6 @@ proto.assistant_api.AssistantDebuggerDeployment.deserializeBinaryFromReader = fu reader.readMessage(value,proto.assistant_api.DeploymentAudioProvider.deserializeBinaryFromReader); msg.setOutputaudio(value); break; - case 18: - var value = new proto.assistant_api.AssistantDeploymentCapturer; - reader.readMessage(value,proto.assistant_api.AssistantDeploymentCapturer.deserializeBinaryFromReader); - msg.addCapturers(value); - break; case 15: var value = /** @type {string} */ (reader.readString()); msg.setUrl(value); @@ -3840,27 +2963,6 @@ proto.assistant_api.AssistantDebuggerDeployment.serializeBinaryToWriter = functi f ); } - f = message.getRole(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getTone(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getExperties(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } f = /** @type {string} */ (jspb.Message.getField(message, 10)); if (f != null) { writer.writeString( @@ -3898,14 +3000,6 @@ proto.assistant_api.AssistantDebuggerDeployment.serializeBinaryToWriter = functi proto.assistant_api.DeploymentAudioProvider.serializeBinaryToWriter ); } - f = message.getCapturersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 18, - f, - proto.assistant_api.AssistantDeploymentCapturer.serializeBinaryToWriter - ); - } f = /** @type {string} */ (jspb.Message.getField(message, 15)); if (f != null) { writer.writeString( @@ -4008,60 +3102,6 @@ proto.assistant_api.AssistantDebuggerDeployment.prototype.setName = function(val }; -/** - * optional string role = 7; - * @return {string} - */ -proto.assistant_api.AssistantDebuggerDeployment.prototype.getRole = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantDebuggerDeployment} returns this - */ -proto.assistant_api.AssistantDebuggerDeployment.prototype.setRole = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string tone = 8; - * @return {string} - */ -proto.assistant_api.AssistantDebuggerDeployment.prototype.getTone = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantDebuggerDeployment} returns this - */ -proto.assistant_api.AssistantDebuggerDeployment.prototype.setTone = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional string experties = 9; - * @return {string} - */ -proto.assistant_api.AssistantDebuggerDeployment.prototype.getExperties = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantDebuggerDeployment} returns this - */ -proto.assistant_api.AssistantDebuggerDeployment.prototype.setExperties = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - /** * optional string greeting = 10; * @return {string} @@ -4244,44 +3284,6 @@ proto.assistant_api.AssistantDebuggerDeployment.prototype.hasOutputaudio = funct }; -/** - * repeated AssistantDeploymentCapturer capturers = 18; - * @return {!Array} - */ -proto.assistant_api.AssistantDebuggerDeployment.prototype.getCapturersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.assistant_api.AssistantDeploymentCapturer, 18)); -}; - - -/** - * @param {!Array} value - * @return {!proto.assistant_api.AssistantDebuggerDeployment} returns this -*/ -proto.assistant_api.AssistantDebuggerDeployment.prototype.setCapturersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 18, value); -}; - - -/** - * @param {!proto.assistant_api.AssistantDeploymentCapturer=} opt_value - * @param {number=} opt_index - * @return {!proto.assistant_api.AssistantDeploymentCapturer} - */ -proto.assistant_api.AssistantDebuggerDeployment.prototype.addCapturers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 18, opt_value, proto.assistant_api.AssistantDeploymentCapturer, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.assistant_api.AssistantDebuggerDeployment} returns this - */ -proto.assistant_api.AssistantDebuggerDeployment.prototype.clearCapturersList = function() { - return this.setCapturersList([]); -}; - - /** * optional string url = 15; * @return {string} @@ -4485,13 +3487,6 @@ proto.assistant_api.AssistantDebuggerDeployment.prototype.setStatus = function(v -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.assistant_api.AssistantApiDeployment.repeatedFields_ = [15]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4525,17 +3520,11 @@ proto.assistant_api.AssistantApiDeployment.toObject = function(includeInstance, var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, "0"), assistantid: jspb.Message.getFieldWithDefault(msg, 5, "0"), - name: jspb.Message.getFieldWithDefault(msg, 6, ""), - role: jspb.Message.getFieldWithDefault(msg, 7, ""), - tone: jspb.Message.getFieldWithDefault(msg, 8, ""), - experties: jspb.Message.getFieldWithDefault(msg, 9, ""), greeting: jspb.Message.getFieldWithDefault(msg, 10, ""), mistake: jspb.Message.getFieldWithDefault(msg, 11, ""), ending: jspb.Message.getFieldWithDefault(msg, 12, ""), inputaudio: (f = msg.getInputaudio()) && proto.assistant_api.DeploymentAudioProvider.toObject(includeInstance, f), outputaudio: (f = msg.getOutputaudio()) && proto.assistant_api.DeploymentAudioProvider.toObject(includeInstance, f), - capturersList: jspb.Message.toObjectList(msg.getCapturersList(), - proto.assistant_api.AssistantDeploymentCapturer.toObject, includeInstance), createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), status: jspb.Message.getFieldWithDefault(msg, 28, "") @@ -4583,22 +3572,6 @@ proto.assistant_api.AssistantApiDeployment.deserializeBinaryFromReader = functio var value = /** @type {string} */ (reader.readUint64String()); msg.setAssistantid(value); break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setRole(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setTone(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setExperties(value); - break; case 10: var value = /** @type {string} */ (reader.readString()); msg.setGreeting(value); @@ -4621,11 +3594,6 @@ proto.assistant_api.AssistantApiDeployment.deserializeBinaryFromReader = functio reader.readMessage(value,proto.assistant_api.DeploymentAudioProvider.deserializeBinaryFromReader); msg.setOutputaudio(value); break; - case 15: - var value = new proto.assistant_api.AssistantDeploymentCapturer; - reader.readMessage(value,proto.assistant_api.AssistantDeploymentCapturer.deserializeBinaryFromReader); - msg.addCapturers(value); - break; case 26: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); @@ -4683,34 +3651,6 @@ proto.assistant_api.AssistantApiDeployment.serializeBinaryToWriter = function(me f ); } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getRole(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getTone(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getExperties(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } f = /** @type {string} */ (jspb.Message.getField(message, 10)); if (f != null) { writer.writeString( @@ -4748,14 +3688,6 @@ proto.assistant_api.AssistantApiDeployment.serializeBinaryToWriter = function(me proto.assistant_api.DeploymentAudioProvider.serializeBinaryToWriter ); } - f = message.getCapturersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 15, - f, - proto.assistant_api.AssistantDeploymentCapturer.serializeBinaryToWriter - ); - } f = message.getCreateddate(); if (f != null) { writer.writeMessage( @@ -4818,78 +3750,6 @@ proto.assistant_api.AssistantApiDeployment.prototype.setAssistantid = function(v }; -/** - * optional string name = 6; - * @return {string} - */ -proto.assistant_api.AssistantApiDeployment.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantApiDeployment} returns this - */ -proto.assistant_api.AssistantApiDeployment.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string role = 7; - * @return {string} - */ -proto.assistant_api.AssistantApiDeployment.prototype.getRole = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantApiDeployment} returns this - */ -proto.assistant_api.AssistantApiDeployment.prototype.setRole = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string tone = 8; - * @return {string} - */ -proto.assistant_api.AssistantApiDeployment.prototype.getTone = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantApiDeployment} returns this - */ -proto.assistant_api.AssistantApiDeployment.prototype.setTone = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional string experties = 9; - * @return {string} - */ -proto.assistant_api.AssistantApiDeployment.prototype.getExperties = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.assistant_api.AssistantApiDeployment} returns this - */ -proto.assistant_api.AssistantApiDeployment.prototype.setExperties = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - /** * optional string greeting = 10; * @return {string} @@ -5072,44 +3932,6 @@ proto.assistant_api.AssistantApiDeployment.prototype.hasOutputaudio = function() }; -/** - * repeated AssistantDeploymentCapturer capturers = 15; - * @return {!Array} - */ -proto.assistant_api.AssistantApiDeployment.prototype.getCapturersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.assistant_api.AssistantDeploymentCapturer, 15)); -}; - - -/** - * @param {!Array} value - * @return {!proto.assistant_api.AssistantApiDeployment} returns this -*/ -proto.assistant_api.AssistantApiDeployment.prototype.setCapturersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 15, value); -}; - - -/** - * @param {!proto.assistant_api.AssistantDeploymentCapturer=} opt_value - * @param {number=} opt_index - * @return {!proto.assistant_api.AssistantDeploymentCapturer} - */ -proto.assistant_api.AssistantApiDeployment.prototype.addCapturers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.assistant_api.AssistantDeploymentCapturer, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.assistant_api.AssistantApiDeployment} returns this - */ -proto.assistant_api.AssistantApiDeployment.prototype.clearCapturersList = function() { - return this.setCapturersList([]); -}; - - /** * optional google.protobuf.Timestamp createdDate = 26; * @return {?proto.google.protobuf.Timestamp} @@ -5203,6 +4025,35 @@ proto.assistant_api.AssistantApiDeployment.prototype.setStatus = function(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.assistant_api.CreateAssistantDeploymentRequest.oneofGroups_ = [[1,2,3,4,5]]; + +/** + * @enum {number} + */ +proto.assistant_api.CreateAssistantDeploymentRequest.DeploymentCase = { + DEPLOYMENT_NOT_SET: 0, + API: 1, + DEBUGGER: 2, + WHATSAPP: 3, + PHONE: 4, + PLUGIN: 5 +}; + +/** + * @return {proto.assistant_api.CreateAssistantDeploymentRequest.DeploymentCase} + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.getDeploymentCase = function() { + return /** @type {proto.assistant_api.CreateAssistantDeploymentRequest.DeploymentCase} */(jspb.Message.computeOneofCase(this, proto.assistant_api.CreateAssistantDeploymentRequest.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5218,8 +4069,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.assistant_api.CreateAssistantApiDeploymentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.CreateAssistantApiDeploymentRequest.toObject(opt_includeInstance, this); +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.CreateAssistantDeploymentRequest.toObject(opt_includeInstance, this); }; @@ -5228,13 +4079,17 @@ proto.assistant_api.CreateAssistantApiDeploymentRequest.prototype.toObject = fun * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.assistant_api.CreateAssistantApiDeploymentRequest} msg The msg instance to transform. + * @param {!proto.assistant_api.CreateAssistantDeploymentRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.CreateAssistantApiDeploymentRequest.toObject = function(includeInstance, msg) { +proto.assistant_api.CreateAssistantDeploymentRequest.toObject = function(includeInstance, msg) { var f, obj = { - deployment: (f = msg.getDeployment()) && proto.assistant_api.AssistantApiDeployment.toObject(includeInstance, f) + api: (f = msg.getApi()) && proto.assistant_api.AssistantApiDeployment.toObject(includeInstance, f), + pb_debugger: (f = msg.getDebugger()) && proto.assistant_api.AssistantDebuggerDeployment.toObject(includeInstance, f), + whatsapp: (f = msg.getWhatsapp()) && proto.assistant_api.AssistantWhatsappDeployment.toObject(includeInstance, f), + phone: (f = msg.getPhone()) && proto.assistant_api.AssistantPhoneDeployment.toObject(includeInstance, f), + plugin: (f = msg.getPlugin()) && proto.assistant_api.AssistantWebpluginDeployment.toObject(includeInstance, f) }; if (includeInstance) { @@ -5248,23 +4103,23 @@ proto.assistant_api.CreateAssistantApiDeploymentRequest.toObject = function(incl /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.assistant_api.CreateAssistantApiDeploymentRequest} + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} */ -proto.assistant_api.CreateAssistantApiDeploymentRequest.deserializeBinary = function(bytes) { +proto.assistant_api.CreateAssistantDeploymentRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.CreateAssistantApiDeploymentRequest; - return proto.assistant_api.CreateAssistantApiDeploymentRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.assistant_api.CreateAssistantDeploymentRequest; + return proto.assistant_api.CreateAssistantDeploymentRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.assistant_api.CreateAssistantApiDeploymentRequest} msg The message object to deserialize into. + * @param {!proto.assistant_api.CreateAssistantDeploymentRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.CreateAssistantApiDeploymentRequest} + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} */ -proto.assistant_api.CreateAssistantApiDeploymentRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.assistant_api.CreateAssistantDeploymentRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5274,7 +4129,27 @@ proto.assistant_api.CreateAssistantApiDeploymentRequest.deserializeBinaryFromRea case 1: var value = new proto.assistant_api.AssistantApiDeployment; reader.readMessage(value,proto.assistant_api.AssistantApiDeployment.deserializeBinaryFromReader); - msg.setDeployment(value); + msg.setApi(value); + break; + case 2: + var value = new proto.assistant_api.AssistantDebuggerDeployment; + reader.readMessage(value,proto.assistant_api.AssistantDebuggerDeployment.deserializeBinaryFromReader); + msg.setDebugger(value); + break; + case 3: + var value = new proto.assistant_api.AssistantWhatsappDeployment; + reader.readMessage(value,proto.assistant_api.AssistantWhatsappDeployment.deserializeBinaryFromReader); + msg.setWhatsapp(value); + break; + case 4: + var value = new proto.assistant_api.AssistantPhoneDeployment; + reader.readMessage(value,proto.assistant_api.AssistantPhoneDeployment.deserializeBinaryFromReader); + msg.setPhone(value); + break; + case 5: + var value = new proto.assistant_api.AssistantWebpluginDeployment; + reader.readMessage(value,proto.assistant_api.AssistantWebpluginDeployment.deserializeBinaryFromReader); + msg.setPlugin(value); break; default: reader.skipField(); @@ -5289,9 +4164,9 @@ proto.assistant_api.CreateAssistantApiDeploymentRequest.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.assistant_api.CreateAssistantApiDeploymentRequest.prototype.serializeBinary = function() { +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.assistant_api.CreateAssistantApiDeploymentRequest.serializeBinaryToWriter(this, writer); + proto.assistant_api.CreateAssistantDeploymentRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5299,13 +4174,13 @@ proto.assistant_api.CreateAssistantApiDeploymentRequest.prototype.serializeBinar /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.CreateAssistantApiDeploymentRequest} message + * @param {!proto.assistant_api.CreateAssistantDeploymentRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.CreateAssistantApiDeploymentRequest.serializeBinaryToWriter = function(message, writer) { +proto.assistant_api.CreateAssistantDeploymentRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDeployment(); + f = message.getApi(); if (f != null) { writer.writeMessage( 1, @@ -5313,34 +4188,214 @@ proto.assistant_api.CreateAssistantApiDeploymentRequest.serializeBinaryToWriter proto.assistant_api.AssistantApiDeployment.serializeBinaryToWriter ); } + f = message.getDebugger(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.assistant_api.AssistantDebuggerDeployment.serializeBinaryToWriter + ); + } + f = message.getWhatsapp(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.assistant_api.AssistantWhatsappDeployment.serializeBinaryToWriter + ); + } + f = message.getPhone(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.assistant_api.AssistantPhoneDeployment.serializeBinaryToWriter + ); + } + f = message.getPlugin(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.assistant_api.AssistantWebpluginDeployment.serializeBinaryToWriter + ); + } }; /** - * optional AssistantApiDeployment deployment = 1; + * optional AssistantApiDeployment api = 1; * @return {?proto.assistant_api.AssistantApiDeployment} */ -proto.assistant_api.CreateAssistantApiDeploymentRequest.prototype.getDeployment = function() { - return /** @type{?proto.assistant_api.AssistantApiDeployment} */ ( - jspb.Message.getWrapperField(this, proto.assistant_api.AssistantApiDeployment, 1)); +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.getApi = function() { + return /** @type{?proto.assistant_api.AssistantApiDeployment} */ ( + jspb.Message.getWrapperField(this, proto.assistant_api.AssistantApiDeployment, 1)); +}; + + +/** + * @param {?proto.assistant_api.AssistantApiDeployment|undefined} value + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} returns this +*/ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.setApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.assistant_api.CreateAssistantDeploymentRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} returns this + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.clearApi = function() { + return this.setApi(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.hasApi = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional AssistantDebuggerDeployment debugger = 2; + * @return {?proto.assistant_api.AssistantDebuggerDeployment} + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.getDebugger = function() { + return /** @type{?proto.assistant_api.AssistantDebuggerDeployment} */ ( + jspb.Message.getWrapperField(this, proto.assistant_api.AssistantDebuggerDeployment, 2)); +}; + + +/** + * @param {?proto.assistant_api.AssistantDebuggerDeployment|undefined} value + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} returns this +*/ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.setDebugger = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.assistant_api.CreateAssistantDeploymentRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} returns this + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.clearDebugger = function() { + return this.setDebugger(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.hasDebugger = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional AssistantWhatsappDeployment whatsapp = 3; + * @return {?proto.assistant_api.AssistantWhatsappDeployment} + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.getWhatsapp = function() { + return /** @type{?proto.assistant_api.AssistantWhatsappDeployment} */ ( + jspb.Message.getWrapperField(this, proto.assistant_api.AssistantWhatsappDeployment, 3)); +}; + + +/** + * @param {?proto.assistant_api.AssistantWhatsappDeployment|undefined} value + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} returns this +*/ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.setWhatsapp = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.assistant_api.CreateAssistantDeploymentRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} returns this + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.clearWhatsapp = function() { + return this.setWhatsapp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.hasWhatsapp = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional AssistantPhoneDeployment phone = 4; + * @return {?proto.assistant_api.AssistantPhoneDeployment} + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.getPhone = function() { + return /** @type{?proto.assistant_api.AssistantPhoneDeployment} */ ( + jspb.Message.getWrapperField(this, proto.assistant_api.AssistantPhoneDeployment, 4)); +}; + + +/** + * @param {?proto.assistant_api.AssistantPhoneDeployment|undefined} value + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} returns this +*/ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.setPhone = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.assistant_api.CreateAssistantDeploymentRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} returns this + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.clearPhone = function() { + return this.setPhone(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.hasPhone = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional AssistantWebpluginDeployment plugin = 5; + * @return {?proto.assistant_api.AssistantWebpluginDeployment} + */ +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.getPlugin = function() { + return /** @type{?proto.assistant_api.AssistantWebpluginDeployment} */ ( + jspb.Message.getWrapperField(this, proto.assistant_api.AssistantWebpluginDeployment, 5)); }; /** - * @param {?proto.assistant_api.AssistantApiDeployment|undefined} value - * @return {!proto.assistant_api.CreateAssistantApiDeploymentRequest} returns this + * @param {?proto.assistant_api.AssistantWebpluginDeployment|undefined} value + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} returns this */ -proto.assistant_api.CreateAssistantApiDeploymentRequest.prototype.setDeployment = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.setPlugin = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.assistant_api.CreateAssistantDeploymentRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.CreateAssistantApiDeploymentRequest} returns this + * @return {!proto.assistant_api.CreateAssistantDeploymentRequest} returns this */ -proto.assistant_api.CreateAssistantApiDeploymentRequest.prototype.clearDeployment = function() { - return this.setDeployment(undefined); +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.clearPlugin = function() { + return this.setPlugin(undefined); }; @@ -5348,8 +4403,8 @@ proto.assistant_api.CreateAssistantApiDeploymentRequest.prototype.clearDeploymen * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.CreateAssistantApiDeploymentRequest.prototype.hasDeployment = function() { - return jspb.Message.getField(this, 1) != null; +proto.assistant_api.CreateAssistantDeploymentRequest.prototype.hasPlugin = function() { + return jspb.Message.getField(this, 5) != null; }; @@ -5369,8 +4424,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.AssistantApiDeploymentResponse.toObject(opt_includeInstance, this); +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.GetAssistantApiDeploymentResponse.toObject(opt_includeInstance, this); }; @@ -5379,11 +4434,11 @@ proto.assistant_api.AssistantApiDeploymentResponse.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.assistant_api.AssistantApiDeploymentResponse} msg The msg instance to transform. + * @param {!proto.assistant_api.GetAssistantApiDeploymentResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantApiDeploymentResponse.toObject = function(includeInstance, msg) { +proto.assistant_api.GetAssistantApiDeploymentResponse.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), @@ -5402,23 +4457,23 @@ proto.assistant_api.AssistantApiDeploymentResponse.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.assistant_api.AssistantApiDeploymentResponse} + * @return {!proto.assistant_api.GetAssistantApiDeploymentResponse} */ -proto.assistant_api.AssistantApiDeploymentResponse.deserializeBinary = function(bytes) { +proto.assistant_api.GetAssistantApiDeploymentResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.AssistantApiDeploymentResponse; - return proto.assistant_api.AssistantApiDeploymentResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.assistant_api.GetAssistantApiDeploymentResponse; + return proto.assistant_api.GetAssistantApiDeploymentResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.assistant_api.AssistantApiDeploymentResponse} msg The message object to deserialize into. + * @param {!proto.assistant_api.GetAssistantApiDeploymentResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.AssistantApiDeploymentResponse} + * @return {!proto.assistant_api.GetAssistantApiDeploymentResponse} */ -proto.assistant_api.AssistantApiDeploymentResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.assistant_api.GetAssistantApiDeploymentResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5456,9 +4511,9 @@ proto.assistant_api.AssistantApiDeploymentResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.serializeBinary = function() { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.assistant_api.AssistantApiDeploymentResponse.serializeBinaryToWriter(this, writer); + proto.assistant_api.GetAssistantApiDeploymentResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5466,11 +4521,11 @@ proto.assistant_api.AssistantApiDeploymentResponse.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.AssistantApiDeploymentResponse} message + * @param {!proto.assistant_api.GetAssistantApiDeploymentResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantApiDeploymentResponse.serializeBinaryToWriter = function(message, writer) { +proto.assistant_api.GetAssistantApiDeploymentResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCode(); if (f !== 0) { @@ -5509,16 +4564,16 @@ proto.assistant_api.AssistantApiDeploymentResponse.serializeBinaryToWriter = fun * optional int32 code = 1; * @return {number} */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.getCode = function() { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.getCode = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.assistant_api.AssistantApiDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantApiDeploymentResponse} returns this */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.setCode = function(value) { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.setCode = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -5527,16 +4582,16 @@ proto.assistant_api.AssistantApiDeploymentResponse.prototype.setCode = function( * optional bool success = 2; * @return {boolean} */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.getSuccess = function() { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.getSuccess = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.assistant_api.AssistantApiDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantApiDeploymentResponse} returns this */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.setSuccess = function(value) { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.setSuccess = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -5545,7 +4600,7 @@ proto.assistant_api.AssistantApiDeploymentResponse.prototype.setSuccess = functi * optional AssistantApiDeployment data = 3; * @return {?proto.assistant_api.AssistantApiDeployment} */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.getData = function() { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.getData = function() { return /** @type{?proto.assistant_api.AssistantApiDeployment} */ ( jspb.Message.getWrapperField(this, proto.assistant_api.AssistantApiDeployment, 3)); }; @@ -5553,18 +4608,18 @@ proto.assistant_api.AssistantApiDeploymentResponse.prototype.getData = function( /** * @param {?proto.assistant_api.AssistantApiDeployment|undefined} value - * @return {!proto.assistant_api.AssistantApiDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantApiDeploymentResponse} returns this */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.setData = function(value) { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.setData = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.AssistantApiDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantApiDeploymentResponse} returns this */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.clearData = function() { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.clearData = function() { return this.setData(undefined); }; @@ -5573,7 +4628,7 @@ proto.assistant_api.AssistantApiDeploymentResponse.prototype.clearData = functio * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.hasData = function() { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.hasData = function() { return jspb.Message.getField(this, 3) != null; }; @@ -5582,7 +4637,7 @@ proto.assistant_api.AssistantApiDeploymentResponse.prototype.hasData = function( * optional Error error = 4; * @return {?proto.Error} */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.getError = function() { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.getError = function() { return /** @type{?proto.Error} */ ( jspb.Message.getWrapperField(this, common_pb.Error, 4)); }; @@ -5590,18 +4645,18 @@ proto.assistant_api.AssistantApiDeploymentResponse.prototype.getError = function /** * @param {?proto.Error|undefined} value - * @return {!proto.assistant_api.AssistantApiDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantApiDeploymentResponse} returns this */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.setError = function(value) { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.setError = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.AssistantApiDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantApiDeploymentResponse} returns this */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.clearError = function() { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.clearError = function() { return this.setError(undefined); }; @@ -5610,7 +4665,7 @@ proto.assistant_api.AssistantApiDeploymentResponse.prototype.clearError = functi * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.AssistantApiDeploymentResponse.prototype.hasError = function() { +proto.assistant_api.GetAssistantApiDeploymentResponse.prototype.hasError = function() { return jspb.Message.getField(this, 4) != null; }; @@ -5631,159 +4686,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.assistant_api.CreateAssistantPhoneDeploymentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.CreateAssistantPhoneDeploymentRequest.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.assistant_api.CreateAssistantPhoneDeploymentRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.assistant_api.CreateAssistantPhoneDeploymentRequest.toObject = function(includeInstance, msg) { - var f, obj = { - deployment: (f = msg.getDeployment()) && proto.assistant_api.AssistantPhoneDeployment.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.assistant_api.CreateAssistantPhoneDeploymentRequest} - */ -proto.assistant_api.CreateAssistantPhoneDeploymentRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.CreateAssistantPhoneDeploymentRequest; - return proto.assistant_api.CreateAssistantPhoneDeploymentRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.assistant_api.CreateAssistantPhoneDeploymentRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.CreateAssistantPhoneDeploymentRequest} - */ -proto.assistant_api.CreateAssistantPhoneDeploymentRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.assistant_api.AssistantPhoneDeployment; - reader.readMessage(value,proto.assistant_api.AssistantPhoneDeployment.deserializeBinaryFromReader); - msg.setDeployment(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.assistant_api.CreateAssistantPhoneDeploymentRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.assistant_api.CreateAssistantPhoneDeploymentRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.CreateAssistantPhoneDeploymentRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.assistant_api.CreateAssistantPhoneDeploymentRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDeployment(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.assistant_api.AssistantPhoneDeployment.serializeBinaryToWriter - ); - } -}; - - -/** - * optional AssistantPhoneDeployment deployment = 1; - * @return {?proto.assistant_api.AssistantPhoneDeployment} - */ -proto.assistant_api.CreateAssistantPhoneDeploymentRequest.prototype.getDeployment = function() { - return /** @type{?proto.assistant_api.AssistantPhoneDeployment} */ ( - jspb.Message.getWrapperField(this, proto.assistant_api.AssistantPhoneDeployment, 1)); -}; - - -/** - * @param {?proto.assistant_api.AssistantPhoneDeployment|undefined} value - * @return {!proto.assistant_api.CreateAssistantPhoneDeploymentRequest} returns this -*/ -proto.assistant_api.CreateAssistantPhoneDeploymentRequest.prototype.setDeployment = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.assistant_api.CreateAssistantPhoneDeploymentRequest} returns this - */ -proto.assistant_api.CreateAssistantPhoneDeploymentRequest.prototype.clearDeployment = function() { - return this.setDeployment(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.assistant_api.CreateAssistantPhoneDeploymentRequest.prototype.hasDeployment = function() { - return jspb.Message.getField(this, 1) != 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.assistant_api.AssistantPhoneDeploymentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.AssistantPhoneDeploymentResponse.toObject(opt_includeInstance, this); +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.GetAssistantPhoneDeploymentResponse.toObject(opt_includeInstance, this); }; @@ -5792,11 +4696,11 @@ proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.toObject = functi * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.assistant_api.AssistantPhoneDeploymentResponse} msg The msg instance to transform. + * @param {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantPhoneDeploymentResponse.toObject = function(includeInstance, msg) { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), @@ -5815,23 +4719,23 @@ proto.assistant_api.AssistantPhoneDeploymentResponse.toObject = function(include /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.assistant_api.AssistantPhoneDeploymentResponse} + * @return {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} */ -proto.assistant_api.AssistantPhoneDeploymentResponse.deserializeBinary = function(bytes) { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.AssistantPhoneDeploymentResponse; - return proto.assistant_api.AssistantPhoneDeploymentResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.assistant_api.GetAssistantPhoneDeploymentResponse; + return proto.assistant_api.GetAssistantPhoneDeploymentResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.assistant_api.AssistantPhoneDeploymentResponse} msg The message object to deserialize into. + * @param {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.AssistantPhoneDeploymentResponse} + * @return {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} */ -proto.assistant_api.AssistantPhoneDeploymentResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5869,9 +4773,9 @@ proto.assistant_api.AssistantPhoneDeploymentResponse.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.serializeBinary = function() { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.assistant_api.AssistantPhoneDeploymentResponse.serializeBinaryToWriter(this, writer); + proto.assistant_api.GetAssistantPhoneDeploymentResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5879,11 +4783,11 @@ proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.serializeBinary = /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.AssistantPhoneDeploymentResponse} message + * @param {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantPhoneDeploymentResponse.serializeBinaryToWriter = function(message, writer) { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCode(); if (f !== 0) { @@ -5922,16 +4826,16 @@ proto.assistant_api.AssistantPhoneDeploymentResponse.serializeBinaryToWriter = f * optional int32 code = 1; * @return {number} */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.getCode = function() { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.getCode = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.assistant_api.AssistantPhoneDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} returns this */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.setCode = function(value) { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.setCode = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -5940,16 +4844,16 @@ proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.setCode = functio * optional bool success = 2; * @return {boolean} */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.getSuccess = function() { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.getSuccess = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.assistant_api.AssistantPhoneDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} returns this */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.setSuccess = function(value) { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.setSuccess = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -5958,7 +4862,7 @@ proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.setSuccess = func * optional AssistantPhoneDeployment data = 3; * @return {?proto.assistant_api.AssistantPhoneDeployment} */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.getData = function() { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.getData = function() { return /** @type{?proto.assistant_api.AssistantPhoneDeployment} */ ( jspb.Message.getWrapperField(this, proto.assistant_api.AssistantPhoneDeployment, 3)); }; @@ -5966,18 +4870,18 @@ proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.getData = functio /** * @param {?proto.assistant_api.AssistantPhoneDeployment|undefined} value - * @return {!proto.assistant_api.AssistantPhoneDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} returns this */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.setData = function(value) { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.setData = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.AssistantPhoneDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} returns this */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.clearData = function() { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.clearData = function() { return this.setData(undefined); }; @@ -5986,187 +4890,36 @@ proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.clearData = funct * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.hasData = function() { +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.hasData = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional Error error = 4; - * @return {?proto.Error} - */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.getError = function() { - return /** @type{?proto.Error} */ ( - jspb.Message.getWrapperField(this, common_pb.Error, 4)); -}; - - -/** - * @param {?proto.Error|undefined} value - * @return {!proto.assistant_api.AssistantPhoneDeploymentResponse} returns this -*/ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.setError = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.assistant_api.AssistantPhoneDeploymentResponse} returns this - */ -proto.assistant_api.AssistantPhoneDeploymentResponse.prototype.clearError = function() { - return this.setError(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.assistant_api.AssistantPhoneDeploymentResponse.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.assistant_api.CreateAssistantWhatsappDeploymentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.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.assistant_api.CreateAssistantWhatsappDeploymentRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.toObject = function(includeInstance, msg) { - var f, obj = { - deployment: (f = msg.getDeployment()) && proto.assistant_api.AssistantWhatsappDeployment.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.assistant_api.CreateAssistantWhatsappDeploymentRequest} - */ -proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.CreateAssistantWhatsappDeploymentRequest; - return proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.assistant_api.CreateAssistantWhatsappDeploymentRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.CreateAssistantWhatsappDeploymentRequest} - */ -proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.assistant_api.AssistantWhatsappDeployment; - reader.readMessage(value,proto.assistant_api.AssistantWhatsappDeployment.deserializeBinaryFromReader); - msg.setDeployment(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.CreateAssistantWhatsappDeploymentRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDeployment(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.assistant_api.AssistantWhatsappDeployment.serializeBinaryToWriter - ); - } -}; - - -/** - * optional AssistantWhatsappDeployment deployment = 1; - * @return {?proto.assistant_api.AssistantWhatsappDeployment} + * @return {?proto.Error} */ -proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.prototype.getDeployment = function() { - return /** @type{?proto.assistant_api.AssistantWhatsappDeployment} */ ( - jspb.Message.getWrapperField(this, proto.assistant_api.AssistantWhatsappDeployment, 1)); +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, common_pb.Error, 4)); }; /** - * @param {?proto.assistant_api.AssistantWhatsappDeployment|undefined} value - * @return {!proto.assistant_api.CreateAssistantWhatsappDeploymentRequest} returns this + * @param {?proto.Error|undefined} value + * @return {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} returns this */ -proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.prototype.setDeployment = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.CreateAssistantWhatsappDeploymentRequest} returns this + * @return {!proto.assistant_api.GetAssistantPhoneDeploymentResponse} returns this */ -proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.prototype.clearDeployment = function() { - return this.setDeployment(undefined); +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.clearError = function() { + return this.setError(undefined); }; @@ -6174,8 +4927,8 @@ proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.prototype.clearDepl * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.CreateAssistantWhatsappDeploymentRequest.prototype.hasDeployment = function() { - return jspb.Message.getField(this, 1) != null; +proto.assistant_api.GetAssistantPhoneDeploymentResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; }; @@ -6195,8 +4948,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.AssistantWhatsappDeploymentResponse.toObject(opt_includeInstance, this); +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.GetAssistantWhatsappDeploymentResponse.toObject(opt_includeInstance, this); }; @@ -6205,11 +4958,11 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.toObject = fun * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.assistant_api.AssistantWhatsappDeploymentResponse} msg The msg instance to transform. + * @param {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.toObject = function(includeInstance, msg) { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), @@ -6228,23 +4981,23 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.toObject = function(incl /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.assistant_api.AssistantWhatsappDeploymentResponse} + * @return {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.deserializeBinary = function(bytes) { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.AssistantWhatsappDeploymentResponse; - return proto.assistant_api.AssistantWhatsappDeploymentResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.assistant_api.GetAssistantWhatsappDeploymentResponse; + return proto.assistant_api.GetAssistantWhatsappDeploymentResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.assistant_api.AssistantWhatsappDeploymentResponse} msg The message object to deserialize into. + * @param {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.AssistantWhatsappDeploymentResponse} + * @return {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6282,9 +5035,9 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.serializeBinary = function() { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.assistant_api.AssistantWhatsappDeploymentResponse.serializeBinaryToWriter(this, writer); + proto.assistant_api.GetAssistantWhatsappDeploymentResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6292,11 +5045,11 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.serializeBinar /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.AssistantWhatsappDeploymentResponse} message + * @param {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.serializeBinaryToWriter = function(message, writer) { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCode(); if (f !== 0) { @@ -6335,16 +5088,16 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.serializeBinaryToWriter * optional int32 code = 1; * @return {number} */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.getCode = function() { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.getCode = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.assistant_api.AssistantWhatsappDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} returns this */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.setCode = function(value) { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.setCode = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -6353,16 +5106,16 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.setCode = func * optional bool success = 2; * @return {boolean} */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.getSuccess = function() { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.getSuccess = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.assistant_api.AssistantWhatsappDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} returns this */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.setSuccess = function(value) { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.setSuccess = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -6371,7 +5124,7 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.setSuccess = f * optional AssistantWhatsappDeployment data = 3; * @return {?proto.assistant_api.AssistantWhatsappDeployment} */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.getData = function() { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.getData = function() { return /** @type{?proto.assistant_api.AssistantWhatsappDeployment} */ ( jspb.Message.getWrapperField(this, proto.assistant_api.AssistantWhatsappDeployment, 3)); }; @@ -6379,18 +5132,18 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.getData = func /** * @param {?proto.assistant_api.AssistantWhatsappDeployment|undefined} value - * @return {!proto.assistant_api.AssistantWhatsappDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} returns this */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.setData = function(value) { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.setData = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.AssistantWhatsappDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} returns this */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.clearData = function() { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.clearData = function() { return this.setData(undefined); }; @@ -6399,7 +5152,7 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.clearData = fu * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.hasData = function() { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.hasData = function() { return jspb.Message.getField(this, 3) != null; }; @@ -6408,7 +5161,7 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.hasData = func * optional Error error = 4; * @return {?proto.Error} */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.getError = function() { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.getError = function() { return /** @type{?proto.Error} */ ( jspb.Message.getWrapperField(this, common_pb.Error, 4)); }; @@ -6416,18 +5169,18 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.getError = fun /** * @param {?proto.Error|undefined} value - * @return {!proto.assistant_api.AssistantWhatsappDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} returns this */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.setError = function(value) { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.setError = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.AssistantWhatsappDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWhatsappDeploymentResponse} returns this */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.clearError = function() { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.clearError = function() { return this.setError(undefined); }; @@ -6436,7 +5189,7 @@ proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.clearError = f * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.AssistantWhatsappDeploymentResponse.prototype.hasError = function() { +proto.assistant_api.GetAssistantWhatsappDeploymentResponse.prototype.hasError = function() { return jspb.Message.getField(this, 4) != null; }; @@ -6457,159 +5210,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.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.assistant_api.CreateAssistantDebuggerDeploymentRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.toObject = function(includeInstance, msg) { - var f, obj = { - deployment: (f = msg.getDeployment()) && proto.assistant_api.AssistantDebuggerDeployment.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.assistant_api.CreateAssistantDebuggerDeploymentRequest} - */ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.CreateAssistantDebuggerDeploymentRequest; - return proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.assistant_api.CreateAssistantDebuggerDeploymentRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.CreateAssistantDebuggerDeploymentRequest} - */ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.assistant_api.AssistantDebuggerDeployment; - reader.readMessage(value,proto.assistant_api.AssistantDebuggerDeployment.deserializeBinaryFromReader); - msg.setDeployment(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.CreateAssistantDebuggerDeploymentRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDeployment(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.assistant_api.AssistantDebuggerDeployment.serializeBinaryToWriter - ); - } -}; - - -/** - * optional AssistantDebuggerDeployment deployment = 1; - * @return {?proto.assistant_api.AssistantDebuggerDeployment} - */ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.prototype.getDeployment = function() { - return /** @type{?proto.assistant_api.AssistantDebuggerDeployment} */ ( - jspb.Message.getWrapperField(this, proto.assistant_api.AssistantDebuggerDeployment, 1)); -}; - - -/** - * @param {?proto.assistant_api.AssistantDebuggerDeployment|undefined} value - * @return {!proto.assistant_api.CreateAssistantDebuggerDeploymentRequest} returns this -*/ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.prototype.setDeployment = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.assistant_api.CreateAssistantDebuggerDeploymentRequest} returns this - */ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.prototype.clearDeployment = function() { - return this.setDeployment(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.assistant_api.CreateAssistantDebuggerDeploymentRequest.prototype.hasDeployment = function() { - return jspb.Message.getField(this, 1) != 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.assistant_api.AssistantDebuggerDeploymentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.AssistantDebuggerDeploymentResponse.toObject(opt_includeInstance, this); +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.GetAssistantDebuggerDeploymentResponse.toObject(opt_includeInstance, this); }; @@ -6618,11 +5220,11 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.toObject = fun * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.assistant_api.AssistantDebuggerDeploymentResponse} msg The msg instance to transform. + * @param {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.toObject = function(includeInstance, msg) { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), @@ -6641,23 +5243,23 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.toObject = function(incl /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.assistant_api.AssistantDebuggerDeploymentResponse} + * @return {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.deserializeBinary = function(bytes) { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.AssistantDebuggerDeploymentResponse; - return proto.assistant_api.AssistantDebuggerDeploymentResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.assistant_api.GetAssistantDebuggerDeploymentResponse; + return proto.assistant_api.GetAssistantDebuggerDeploymentResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.assistant_api.AssistantDebuggerDeploymentResponse} msg The message object to deserialize into. + * @param {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.AssistantDebuggerDeploymentResponse} + * @return {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6695,9 +5297,9 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.serializeBinary = function() { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.assistant_api.AssistantDebuggerDeploymentResponse.serializeBinaryToWriter(this, writer); + proto.assistant_api.GetAssistantDebuggerDeploymentResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6705,11 +5307,11 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.serializeBinar /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.AssistantDebuggerDeploymentResponse} message + * @param {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.serializeBinaryToWriter = function(message, writer) { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCode(); if (f !== 0) { @@ -6748,16 +5350,16 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.serializeBinaryToWriter * optional int32 code = 1; * @return {number} */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.getCode = function() { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.getCode = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.assistant_api.AssistantDebuggerDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} returns this */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.setCode = function(value) { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.setCode = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -6766,16 +5368,16 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.setCode = func * optional bool success = 2; * @return {boolean} */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.getSuccess = function() { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.getSuccess = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.assistant_api.AssistantDebuggerDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} returns this */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.setSuccess = function(value) { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.setSuccess = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -6784,7 +5386,7 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.setSuccess = f * optional AssistantDebuggerDeployment data = 3; * @return {?proto.assistant_api.AssistantDebuggerDeployment} */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.getData = function() { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.getData = function() { return /** @type{?proto.assistant_api.AssistantDebuggerDeployment} */ ( jspb.Message.getWrapperField(this, proto.assistant_api.AssistantDebuggerDeployment, 3)); }; @@ -6792,18 +5394,18 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.getData = func /** * @param {?proto.assistant_api.AssistantDebuggerDeployment|undefined} value - * @return {!proto.assistant_api.AssistantDebuggerDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} returns this */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.setData = function(value) { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.setData = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.AssistantDebuggerDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} returns this */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.clearData = function() { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.clearData = function() { return this.setData(undefined); }; @@ -6812,7 +5414,7 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.clearData = fu * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.hasData = function() { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.hasData = function() { return jspb.Message.getField(this, 3) != null; }; @@ -6821,7 +5423,7 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.hasData = func * optional Error error = 4; * @return {?proto.Error} */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.getError = function() { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.getError = function() { return /** @type{?proto.Error} */ ( jspb.Message.getWrapperField(this, common_pb.Error, 4)); }; @@ -6829,18 +5431,18 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.getError = fun /** * @param {?proto.Error|undefined} value - * @return {!proto.assistant_api.AssistantDebuggerDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} returns this */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.setError = function(value) { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.setError = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.AssistantDebuggerDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantDebuggerDeploymentResponse} returns this */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.clearError = function() { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.clearError = function() { return this.setError(undefined); }; @@ -6849,7 +5451,7 @@ proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.clearError = f * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.AssistantDebuggerDeploymentResponse.prototype.hasError = function() { +proto.assistant_api.GetAssistantDebuggerDeploymentResponse.prototype.hasError = function() { return jspb.Message.getField(this, 4) != null; }; @@ -6870,159 +5472,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.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.assistant_api.CreateAssistantWebpluginDeploymentRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.toObject = function(includeInstance, msg) { - var f, obj = { - deployment: (f = msg.getDeployment()) && proto.assistant_api.AssistantWebpluginDeployment.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.assistant_api.CreateAssistantWebpluginDeploymentRequest} - */ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.CreateAssistantWebpluginDeploymentRequest; - return proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.assistant_api.CreateAssistantWebpluginDeploymentRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.CreateAssistantWebpluginDeploymentRequest} - */ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.assistant_api.AssistantWebpluginDeployment; - reader.readMessage(value,proto.assistant_api.AssistantWebpluginDeployment.deserializeBinaryFromReader); - msg.setDeployment(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.CreateAssistantWebpluginDeploymentRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDeployment(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.assistant_api.AssistantWebpluginDeployment.serializeBinaryToWriter - ); - } -}; - - -/** - * optional AssistantWebpluginDeployment deployment = 1; - * @return {?proto.assistant_api.AssistantWebpluginDeployment} - */ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.prototype.getDeployment = function() { - return /** @type{?proto.assistant_api.AssistantWebpluginDeployment} */ ( - jspb.Message.getWrapperField(this, proto.assistant_api.AssistantWebpluginDeployment, 1)); -}; - - -/** - * @param {?proto.assistant_api.AssistantWebpluginDeployment|undefined} value - * @return {!proto.assistant_api.CreateAssistantWebpluginDeploymentRequest} returns this -*/ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.prototype.setDeployment = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.assistant_api.CreateAssistantWebpluginDeploymentRequest} returns this - */ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.prototype.clearDeployment = function() { - return this.setDeployment(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.assistant_api.CreateAssistantWebpluginDeploymentRequest.prototype.hasDeployment = function() { - return jspb.Message.getField(this, 1) != 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.assistant_api.AssistantWebpluginDeploymentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.assistant_api.AssistantWebpluginDeploymentResponse.toObject(opt_includeInstance, this); +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.GetAssistantWebpluginDeploymentResponse.toObject(opt_includeInstance, this); }; @@ -7031,11 +5482,11 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.toObject = fu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.assistant_api.AssistantWebpluginDeploymentResponse} msg The msg instance to transform. + * @param {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.toObject = function(includeInstance, msg) { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), @@ -7054,23 +5505,23 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.toObject = function(inc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.assistant_api.AssistantWebpluginDeploymentResponse} + * @return {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.deserializeBinary = function(bytes) { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.assistant_api.AssistantWebpluginDeploymentResponse; - return proto.assistant_api.AssistantWebpluginDeploymentResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.assistant_api.GetAssistantWebpluginDeploymentResponse; + return proto.assistant_api.GetAssistantWebpluginDeploymentResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.assistant_api.AssistantWebpluginDeploymentResponse} msg The message object to deserialize into. + * @param {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.assistant_api.AssistantWebpluginDeploymentResponse} + * @return {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7108,9 +5559,9 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.deserializeBinaryFromRe * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.serializeBinary = function() { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.assistant_api.AssistantWebpluginDeploymentResponse.serializeBinaryToWriter(this, writer); + proto.assistant_api.GetAssistantWebpluginDeploymentResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7118,11 +5569,11 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.serializeBina /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.assistant_api.AssistantWebpluginDeploymentResponse} message + * @param {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.serializeBinaryToWriter = function(message, writer) { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCode(); if (f !== 0) { @@ -7161,16 +5612,16 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.serializeBinaryToWriter * optional int32 code = 1; * @return {number} */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.getCode = function() { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.getCode = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.assistant_api.AssistantWebpluginDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} returns this */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.setCode = function(value) { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.setCode = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -7179,16 +5630,16 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.setCode = fun * optional bool success = 2; * @return {boolean} */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.getSuccess = function() { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.getSuccess = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.assistant_api.AssistantWebpluginDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} returns this */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.setSuccess = function(value) { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.setSuccess = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -7197,7 +5648,7 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.setSuccess = * optional AssistantWebpluginDeployment data = 3; * @return {?proto.assistant_api.AssistantWebpluginDeployment} */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.getData = function() { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.getData = function() { return /** @type{?proto.assistant_api.AssistantWebpluginDeployment} */ ( jspb.Message.getWrapperField(this, proto.assistant_api.AssistantWebpluginDeployment, 3)); }; @@ -7205,18 +5656,18 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.getData = fun /** * @param {?proto.assistant_api.AssistantWebpluginDeployment|undefined} value - * @return {!proto.assistant_api.AssistantWebpluginDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} returns this */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.setData = function(value) { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.setData = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.AssistantWebpluginDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} returns this */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.clearData = function() { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.clearData = function() { return this.setData(undefined); }; @@ -7225,7 +5676,7 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.clearData = f * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.hasData = function() { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.hasData = function() { return jspb.Message.getField(this, 3) != null; }; @@ -7234,7 +5685,7 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.hasData = fun * optional Error error = 4; * @return {?proto.Error} */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.getError = function() { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.getError = function() { return /** @type{?proto.Error} */ ( jspb.Message.getWrapperField(this, common_pb.Error, 4)); }; @@ -7242,18 +5693,18 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.getError = fu /** * @param {?proto.Error|undefined} value - * @return {!proto.assistant_api.AssistantWebpluginDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} returns this */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.setError = function(value) { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.setError = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.assistant_api.AssistantWebpluginDeploymentResponse} returns this + * @return {!proto.assistant_api.GetAssistantWebpluginDeploymentResponse} returns this */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.clearError = function() { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.clearError = function() { return this.setError(undefined); }; @@ -7262,7 +5713,7 @@ proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.clearError = * Returns whether this field is set. * @return {boolean} */ -proto.assistant_api.AssistantWebpluginDeploymentResponse.prototype.hasError = function() { +proto.assistant_api.GetAssistantWebpluginDeploymentResponse.prototype.hasError = function() { return jspb.Message.getField(this, 4) != null; }; diff --git a/src/clients/protos/assistant-knowledge.ts b/src/clients/protos/assistant-knowledge.ts new file mode 100644 index 0000000..786f71d --- /dev/null +++ b/src/clients/protos/assistant-knowledge.ts @@ -0,0 +1,1490 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: assistant-knowledge.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./common"; +import * as pb_1 from "google-protobuf"; +export namespace assistant_api { + export class AssistantKnowledge extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + knowledgeId?: string; + rerankerEnable?: boolean; + topK?: number; + scoreThreshold?: number; + knowledge?: dependency_2.Knowledge; + retrievalMethod?: string; + rerankerModelProviderId?: string; + rerankerModelProviderName?: string; + assistantKnowledgeRerankerOptions?: dependency_2.Metadata[]; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + status?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [12], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("rerankerEnable" in data && data.rerankerEnable != undefined) { + this.rerankerEnable = data.rerankerEnable; + } + if ("topK" in data && data.topK != undefined) { + this.topK = data.topK; + } + if ("scoreThreshold" in data && data.scoreThreshold != undefined) { + this.scoreThreshold = data.scoreThreshold; + } + if ("knowledge" in data && data.knowledge != undefined) { + this.knowledge = data.knowledge; + } + if ("retrievalMethod" in data && data.retrievalMethod != undefined) { + this.retrievalMethod = data.retrievalMethod; + } + if ("rerankerModelProviderId" in data && data.rerankerModelProviderId != undefined) { + this.rerankerModelProviderId = data.rerankerModelProviderId; + } + if ("rerankerModelProviderName" in data && data.rerankerModelProviderName != undefined) { + this.rerankerModelProviderName = data.rerankerModelProviderName; + } + if ("assistantKnowledgeRerankerOptions" in data && data.assistantKnowledgeRerankerOptions != undefined) { + this.assistantKnowledgeRerankerOptions = data.assistantKnowledgeRerankerOptions; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get rerankerEnable() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set rerankerEnable(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + get topK() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set topK(value: number) { + pb_1.Message.setField(this, 6, value); + } + get scoreThreshold() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set scoreThreshold(value: number) { + pb_1.Message.setField(this, 7, value); + } + get knowledge() { + return pb_1.Message.getWrapperField(this, dependency_2.Knowledge, 8) as dependency_2.Knowledge; + } + set knowledge(value: dependency_2.Knowledge) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_knowledge() { + return pb_1.Message.getField(this, 8) != null; + } + get retrievalMethod() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set retrievalMethod(value: string) { + pb_1.Message.setField(this, 9, value); + } + get rerankerModelProviderId() { + return pb_1.Message.getFieldWithDefault(this, 10, "0") as string; + } + set rerankerModelProviderId(value: string) { + pb_1.Message.setField(this, 10, value); + } + get rerankerModelProviderName() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set rerankerModelProviderName(value: string) { + pb_1.Message.setField(this, 11, value); + } + get assistantKnowledgeRerankerOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 12) as dependency_2.Metadata[]; + } + set assistantKnowledgeRerankerOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 12, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 13) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 13, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 13) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 14) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 14) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 15, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 15, value); + } + static fromObject(data: { + id?: string; + knowledgeId?: string; + rerankerEnable?: boolean; + topK?: number; + scoreThreshold?: number; + knowledge?: ReturnType; + retrievalMethod?: string; + rerankerModelProviderId?: string; + rerankerModelProviderName?: string; + assistantKnowledgeRerankerOptions?: ReturnType[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + }): AssistantKnowledge { + const message = new AssistantKnowledge({}); + if (data.id != null) { + message.id = data.id; + } + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.rerankerEnable != null) { + message.rerankerEnable = data.rerankerEnable; + } + if (data.topK != null) { + message.topK = data.topK; + } + if (data.scoreThreshold != null) { + message.scoreThreshold = data.scoreThreshold; + } + if (data.knowledge != null) { + message.knowledge = dependency_2.Knowledge.fromObject(data.knowledge); + } + if (data.retrievalMethod != null) { + message.retrievalMethod = data.retrievalMethod; + } + if (data.rerankerModelProviderId != null) { + message.rerankerModelProviderId = data.rerankerModelProviderId; + } + if (data.rerankerModelProviderName != null) { + message.rerankerModelProviderName = data.rerankerModelProviderName; + } + if (data.assistantKnowledgeRerankerOptions != null) { + message.assistantKnowledgeRerankerOptions = data.assistantKnowledgeRerankerOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + id?: string; + knowledgeId?: string; + rerankerEnable?: boolean; + topK?: number; + scoreThreshold?: number; + knowledge?: ReturnType; + retrievalMethod?: string; + rerankerModelProviderId?: string; + rerankerModelProviderName?: string; + assistantKnowledgeRerankerOptions?: ReturnType[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + status?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.rerankerEnable != null) { + data.rerankerEnable = this.rerankerEnable; + } + if (this.topK != null) { + data.topK = this.topK; + } + if (this.scoreThreshold != null) { + data.scoreThreshold = this.scoreThreshold; + } + if (this.knowledge != null) { + data.knowledge = this.knowledge.toObject(); + } + if (this.retrievalMethod != null) { + data.retrievalMethod = this.retrievalMethod; + } + if (this.rerankerModelProviderId != null) { + data.rerankerModelProviderId = this.rerankerModelProviderId; + } + if (this.rerankerModelProviderName != null) { + data.rerankerModelProviderName = this.rerankerModelProviderName; + } + if (this.assistantKnowledgeRerankerOptions != null) { + data.assistantKnowledgeRerankerOptions = this.assistantKnowledgeRerankerOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.knowledgeId != "0") + writer.writeUint64String(2, this.knowledgeId); + if (this.rerankerEnable != false) + writer.writeBool(3, this.rerankerEnable); + if (this.topK != 0) + writer.writeUint32(6, this.topK); + if (this.scoreThreshold != 0) + writer.writeFloat(7, this.scoreThreshold); + if (this.has_knowledge) + writer.writeMessage(8, this.knowledge, () => this.knowledge.serialize(writer)); + if (this.retrievalMethod.length) + writer.writeString(9, this.retrievalMethod); + if (this.rerankerModelProviderId != "0") + writer.writeUint64String(10, this.rerankerModelProviderId); + if (this.rerankerModelProviderName.length) + writer.writeString(11, this.rerankerModelProviderName); + if (this.assistantKnowledgeRerankerOptions.length) + writer.writeRepeatedMessage(12, this.assistantKnowledgeRerankerOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(13, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(14, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.status.length) + writer.writeString(15, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantKnowledge { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantKnowledge(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.knowledgeId = reader.readUint64String(); + break; + case 3: + message.rerankerEnable = reader.readBool(); + break; + case 6: + message.topK = reader.readUint32(); + break; + case 7: + message.scoreThreshold = reader.readFloat(); + break; + case 8: + reader.readMessage(message.knowledge, () => message.knowledge = dependency_2.Knowledge.deserialize(reader)); + break; + case 9: + message.retrievalMethod = reader.readString(); + break; + case 10: + message.rerankerModelProviderId = reader.readUint64String(); + break; + case 11: + message.rerankerModelProviderName = reader.readString(); + break; + case 12: + reader.readMessage(message.assistantKnowledgeRerankerOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 12, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + case 13: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 14: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 15: + message.status = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantKnowledge { + return AssistantKnowledge.deserialize(bytes); + } + } + export class CreateAssistantKnowledgeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + knowledgeId?: string; + assistantId?: string; + rerankerModelProviderId?: string; + rerankerModelProviderName?: string; + assistantKnowledgeRerankerOptions?: dependency_2.Metadata[]; + topK?: number; + scoreThreshold?: number; + retrievalMethod?: string; + rerankerEnable?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("rerankerModelProviderId" in data && data.rerankerModelProviderId != undefined) { + this.rerankerModelProviderId = data.rerankerModelProviderId; + } + if ("rerankerModelProviderName" in data && data.rerankerModelProviderName != undefined) { + this.rerankerModelProviderName = data.rerankerModelProviderName; + } + if ("assistantKnowledgeRerankerOptions" in data && data.assistantKnowledgeRerankerOptions != undefined) { + this.assistantKnowledgeRerankerOptions = data.assistantKnowledgeRerankerOptions; + } + if ("topK" in data && data.topK != undefined) { + this.topK = data.topK; + } + if ("scoreThreshold" in data && data.scoreThreshold != undefined) { + this.scoreThreshold = data.scoreThreshold; + } + if ("retrievalMethod" in data && data.retrievalMethod != undefined) { + this.retrievalMethod = data.retrievalMethod; + } + if ("rerankerEnable" in data && data.rerankerEnable != undefined) { + this.rerankerEnable = data.rerankerEnable; + } + } + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get rerankerModelProviderId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set rerankerModelProviderId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get rerankerModelProviderName() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set rerankerModelProviderName(value: string) { + pb_1.Message.setField(this, 4, value); + } + get assistantKnowledgeRerankerOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 5) as dependency_2.Metadata[]; + } + set assistantKnowledgeRerankerOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get topK() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set topK(value: number) { + pb_1.Message.setField(this, 6, value); + } + get scoreThreshold() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set scoreThreshold(value: number) { + pb_1.Message.setField(this, 7, value); + } + get retrievalMethod() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set retrievalMethod(value: string) { + pb_1.Message.setField(this, 8, value); + } + get rerankerEnable() { + return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean; + } + set rerankerEnable(value: boolean) { + pb_1.Message.setField(this, 9, value); + } + static fromObject(data: { + knowledgeId?: string; + assistantId?: string; + rerankerModelProviderId?: string; + rerankerModelProviderName?: string; + assistantKnowledgeRerankerOptions?: ReturnType[]; + topK?: number; + scoreThreshold?: number; + retrievalMethod?: string; + rerankerEnable?: boolean; + }): CreateAssistantKnowledgeRequest { + const message = new CreateAssistantKnowledgeRequest({}); + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.rerankerModelProviderId != null) { + message.rerankerModelProviderId = data.rerankerModelProviderId; + } + if (data.rerankerModelProviderName != null) { + message.rerankerModelProviderName = data.rerankerModelProviderName; + } + if (data.assistantKnowledgeRerankerOptions != null) { + message.assistantKnowledgeRerankerOptions = data.assistantKnowledgeRerankerOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + if (data.topK != null) { + message.topK = data.topK; + } + if (data.scoreThreshold != null) { + message.scoreThreshold = data.scoreThreshold; + } + if (data.retrievalMethod != null) { + message.retrievalMethod = data.retrievalMethod; + } + if (data.rerankerEnable != null) { + message.rerankerEnable = data.rerankerEnable; + } + return message; + } + toObject() { + const data: { + knowledgeId?: string; + assistantId?: string; + rerankerModelProviderId?: string; + rerankerModelProviderName?: string; + assistantKnowledgeRerankerOptions?: ReturnType[]; + topK?: number; + scoreThreshold?: number; + retrievalMethod?: string; + rerankerEnable?: boolean; + } = {}; + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.rerankerModelProviderId != null) { + data.rerankerModelProviderId = this.rerankerModelProviderId; + } + if (this.rerankerModelProviderName != null) { + data.rerankerModelProviderName = this.rerankerModelProviderName; + } + if (this.assistantKnowledgeRerankerOptions != null) { + data.assistantKnowledgeRerankerOptions = this.assistantKnowledgeRerankerOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + if (this.topK != null) { + data.topK = this.topK; + } + if (this.scoreThreshold != null) { + data.scoreThreshold = this.scoreThreshold; + } + if (this.retrievalMethod != null) { + data.retrievalMethod = this.retrievalMethod; + } + if (this.rerankerEnable != null) { + data.rerankerEnable = this.rerankerEnable; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.knowledgeId != "0") + writer.writeUint64String(1, this.knowledgeId); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (this.rerankerModelProviderId != "0") + writer.writeUint64String(3, this.rerankerModelProviderId); + if (this.rerankerModelProviderName.length) + writer.writeString(4, this.rerankerModelProviderName); + if (this.assistantKnowledgeRerankerOptions.length) + writer.writeRepeatedMessage(5, this.assistantKnowledgeRerankerOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (this.topK != 0) + writer.writeUint32(6, this.topK); + if (this.scoreThreshold != 0) + writer.writeFloat(7, this.scoreThreshold); + if (this.retrievalMethod.length) + writer.writeString(8, this.retrievalMethod); + if (this.rerankerEnable != false) + writer.writeBool(9, this.rerankerEnable); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateAssistantKnowledgeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateAssistantKnowledgeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.knowledgeId = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + case 3: + message.rerankerModelProviderId = reader.readUint64String(); + break; + case 4: + message.rerankerModelProviderName = reader.readString(); + break; + case 5: + reader.readMessage(message.assistantKnowledgeRerankerOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + case 6: + message.topK = reader.readUint32(); + break; + case 7: + message.scoreThreshold = reader.readFloat(); + break; + case 8: + message.retrievalMethod = reader.readString(); + break; + case 9: + message.rerankerEnable = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateAssistantKnowledgeRequest { + return CreateAssistantKnowledgeRequest.deserialize(bytes); + } + } + export class UpdateAssistantKnowledgeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + knowledgeId?: string; + assistantId?: string; + rerankerModelProviderId?: string; + rerankerModelProviderName?: string; + assistantKnowledgeRerankerOptions?: dependency_2.Metadata[]; + scoreThreshold?: number; + topK?: number; + retrievalMethod?: string; + rerankerEnable?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("rerankerModelProviderId" in data && data.rerankerModelProviderId != undefined) { + this.rerankerModelProviderId = data.rerankerModelProviderId; + } + if ("rerankerModelProviderName" in data && data.rerankerModelProviderName != undefined) { + this.rerankerModelProviderName = data.rerankerModelProviderName; + } + if ("assistantKnowledgeRerankerOptions" in data && data.assistantKnowledgeRerankerOptions != undefined) { + this.assistantKnowledgeRerankerOptions = data.assistantKnowledgeRerankerOptions; + } + if ("scoreThreshold" in data && data.scoreThreshold != undefined) { + this.scoreThreshold = data.scoreThreshold; + } + if ("topK" in data && data.topK != undefined) { + this.topK = data.topK; + } + if ("retrievalMethod" in data && data.retrievalMethod != undefined) { + this.retrievalMethod = data.retrievalMethod; + } + if ("rerankerEnable" in data && data.rerankerEnable != undefined) { + this.rerankerEnable = data.rerankerEnable; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get rerankerModelProviderId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set rerankerModelProviderId(value: string) { + pb_1.Message.setField(this, 4, value); + } + get rerankerModelProviderName() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set rerankerModelProviderName(value: string) { + pb_1.Message.setField(this, 5, value); + } + get assistantKnowledgeRerankerOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 6) as dependency_2.Metadata[]; + } + set assistantKnowledgeRerankerOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get scoreThreshold() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set scoreThreshold(value: number) { + pb_1.Message.setField(this, 7, value); + } + get topK() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set topK(value: number) { + pb_1.Message.setField(this, 8, value); + } + get retrievalMethod() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set retrievalMethod(value: string) { + pb_1.Message.setField(this, 9, value); + } + get rerankerEnable() { + return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean; + } + set rerankerEnable(value: boolean) { + pb_1.Message.setField(this, 10, value); + } + static fromObject(data: { + id?: string; + knowledgeId?: string; + assistantId?: string; + rerankerModelProviderId?: string; + rerankerModelProviderName?: string; + assistantKnowledgeRerankerOptions?: ReturnType[]; + scoreThreshold?: number; + topK?: number; + retrievalMethod?: string; + rerankerEnable?: boolean; + }): UpdateAssistantKnowledgeRequest { + const message = new UpdateAssistantKnowledgeRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.rerankerModelProviderId != null) { + message.rerankerModelProviderId = data.rerankerModelProviderId; + } + if (data.rerankerModelProviderName != null) { + message.rerankerModelProviderName = data.rerankerModelProviderName; + } + if (data.assistantKnowledgeRerankerOptions != null) { + message.assistantKnowledgeRerankerOptions = data.assistantKnowledgeRerankerOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + if (data.scoreThreshold != null) { + message.scoreThreshold = data.scoreThreshold; + } + if (data.topK != null) { + message.topK = data.topK; + } + if (data.retrievalMethod != null) { + message.retrievalMethod = data.retrievalMethod; + } + if (data.rerankerEnable != null) { + message.rerankerEnable = data.rerankerEnable; + } + return message; + } + toObject() { + const data: { + id?: string; + knowledgeId?: string; + assistantId?: string; + rerankerModelProviderId?: string; + rerankerModelProviderName?: string; + assistantKnowledgeRerankerOptions?: ReturnType[]; + scoreThreshold?: number; + topK?: number; + retrievalMethod?: string; + rerankerEnable?: boolean; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.rerankerModelProviderId != null) { + data.rerankerModelProviderId = this.rerankerModelProviderId; + } + if (this.rerankerModelProviderName != null) { + data.rerankerModelProviderName = this.rerankerModelProviderName; + } + if (this.assistantKnowledgeRerankerOptions != null) { + data.assistantKnowledgeRerankerOptions = this.assistantKnowledgeRerankerOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + if (this.scoreThreshold != null) { + data.scoreThreshold = this.scoreThreshold; + } + if (this.topK != null) { + data.topK = this.topK; + } + if (this.retrievalMethod != null) { + data.retrievalMethod = this.retrievalMethod; + } + if (this.rerankerEnable != null) { + data.rerankerEnable = this.rerankerEnable; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.knowledgeId != "0") + writer.writeUint64String(2, this.knowledgeId); + if (this.assistantId != "0") + writer.writeUint64String(3, this.assistantId); + if (this.rerankerModelProviderId != "0") + writer.writeUint64String(4, this.rerankerModelProviderId); + if (this.rerankerModelProviderName.length) + writer.writeString(5, this.rerankerModelProviderName); + if (this.assistantKnowledgeRerankerOptions.length) + writer.writeRepeatedMessage(6, this.assistantKnowledgeRerankerOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (this.scoreThreshold != 0) + writer.writeFloat(7, this.scoreThreshold); + if (this.topK != 0) + writer.writeUint32(8, this.topK); + if (this.retrievalMethod.length) + writer.writeString(9, this.retrievalMethod); + if (this.rerankerEnable != false) + writer.writeBool(10, this.rerankerEnable); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateAssistantKnowledgeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateAssistantKnowledgeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.knowledgeId = reader.readUint64String(); + break; + case 3: + message.assistantId = reader.readUint64String(); + break; + case 4: + message.rerankerModelProviderId = reader.readUint64String(); + break; + case 5: + message.rerankerModelProviderName = reader.readString(); + break; + case 6: + reader.readMessage(message.assistantKnowledgeRerankerOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + case 7: + message.scoreThreshold = reader.readFloat(); + break; + case 8: + message.topK = reader.readUint32(); + break; + case 9: + message.retrievalMethod = reader.readString(); + break; + case 10: + message.rerankerEnable = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateAssistantKnowledgeRequest { + return UpdateAssistantKnowledgeRequest.deserialize(bytes); + } + } + export class GetAssistantKnowledgeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: string; + assistantId?: string; + }): GetAssistantKnowledgeRequest { + const message = new GetAssistantKnowledgeRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantKnowledgeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantKnowledgeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantKnowledgeRequest { + return GetAssistantKnowledgeRequest.deserialize(bytes); + } + } + export class DeleteAssistantKnowledgeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: string; + assistantId?: string; + }): DeleteAssistantKnowledgeRequest { + const message = new DeleteAssistantKnowledgeRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeleteAssistantKnowledgeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteAssistantKnowledgeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DeleteAssistantKnowledgeRequest { + return DeleteAssistantKnowledgeRequest.deserialize(bytes); + } + } + export class GetAssistantKnowledgeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantKnowledge; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantKnowledge, 3) as AssistantKnowledge; + } + set data(value: AssistantKnowledge) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantKnowledgeResponse { + const message = new GetAssistantKnowledgeResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantKnowledge.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantKnowledgeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantKnowledgeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantKnowledge.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantKnowledgeResponse { + return GetAssistantKnowledgeResponse.deserialize(bytes); + } + } + export class GetAllAssistantKnowledgeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 2) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 2) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 3) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllAssistantKnowledgeRequest { + const message = new GetAllAssistantKnowledgeRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.has_paginate) + writer.writeMessage(2, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(3, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantKnowledgeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantKnowledgeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 3: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantKnowledgeRequest { + return GetAllAssistantKnowledgeRequest.deserialize(bytes); + } + } + export class GetAllAssistantKnowledgeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantKnowledge[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantKnowledge, 3) as AssistantKnowledge[]; + } + set data(value: AssistantKnowledge[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantKnowledgeResponse { + const message = new GetAllAssistantKnowledgeResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => AssistantKnowledge.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: AssistantKnowledge) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: AssistantKnowledge) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantKnowledgeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantKnowledgeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AssistantKnowledge.deserialize(reader), AssistantKnowledge)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantKnowledgeResponse { + return GetAllAssistantKnowledgeResponse.deserialize(bytes); + } + } +} diff --git a/src/clients/protos/assistant-knowledge_grpc_pb.d.ts b/src/clients/protos/assistant-knowledge_grpc_pb.d.ts deleted file mode 100644 index 51b4d69..0000000 --- a/src/clients/protos/assistant-knowledge_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/src/clients/protos/assistant-knowledge_pb.d.ts b/src/clients/protos/assistant-knowledge_pb.d.ts deleted file mode 100644 index b611186..0000000 --- a/src/clients/protos/assistant-knowledge_pb.d.ts +++ /dev/null @@ -1,353 +0,0 @@ -// package: assistant_api -// file: assistant-knowledge.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as common_pb from "./common_pb"; - -export class AssistantKnowledge extends jspb.Message { - getId(): string; - setId(value: string): void; - - getKnowledgeid(): string; - setKnowledgeid(value: string): void; - - getRerankerenable(): boolean; - setRerankerenable(value: boolean): void; - - getTopk(): number; - setTopk(value: number): void; - - getScorethreshold(): number; - setScorethreshold(value: number): void; - - hasKnowledge(): boolean; - clearKnowledge(): void; - getKnowledge(): common_pb.Knowledge | undefined; - setKnowledge(value?: common_pb.Knowledge): void; - - getRetrievalmethod(): string; - setRetrievalmethod(value: string): void; - - getRerankermodelproviderid(): string; - setRerankermodelproviderid(value: string): void; - - getRerankermodelprovidername(): string; - setRerankermodelprovidername(value: string): void; - - clearAssistantknowledgererankeroptionsList(): void; - getAssistantknowledgererankeroptionsList(): Array; - setAssistantknowledgererankeroptionsList(value: Array): void; - addAssistantknowledgererankeroptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getStatus(): string; - setStatus(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantKnowledge.AsObject; - static toObject(includeInstance: boolean, msg: AssistantKnowledge): AssistantKnowledge.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantKnowledge, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantKnowledge; - static deserializeBinaryFromReader(message: AssistantKnowledge, reader: jspb.BinaryReader): AssistantKnowledge; -} - -export namespace AssistantKnowledge { - export type AsObject = { - id: string, - knowledgeid: string, - rerankerenable: boolean, - topk: number, - scorethreshold: number, - knowledge?: common_pb.Knowledge.AsObject, - retrievalmethod: string, - rerankermodelproviderid: string, - rerankermodelprovidername: string, - assistantknowledgererankeroptionsList: Array, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - status: string, - } -} - -export class CreateAssistantKnowledgeRequest extends jspb.Message { - getKnowledgeid(): string; - setKnowledgeid(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getRerankermodelproviderid(): string; - setRerankermodelproviderid(value: string): void; - - getRerankermodelprovidername(): string; - setRerankermodelprovidername(value: string): void; - - clearAssistantknowledgererankeroptionsList(): void; - getAssistantknowledgererankeroptionsList(): Array; - setAssistantknowledgererankeroptionsList(value: Array): void; - addAssistantknowledgererankeroptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - getTopk(): number; - setTopk(value: number): void; - - getScorethreshold(): number; - setScorethreshold(value: number): void; - - getRetrievalmethod(): string; - setRetrievalmethod(value: string): void; - - getRerankerenable(): boolean; - setRerankerenable(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantKnowledgeRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantKnowledgeRequest): CreateAssistantKnowledgeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantKnowledgeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantKnowledgeRequest; - static deserializeBinaryFromReader(message: CreateAssistantKnowledgeRequest, reader: jspb.BinaryReader): CreateAssistantKnowledgeRequest; -} - -export namespace CreateAssistantKnowledgeRequest { - export type AsObject = { - knowledgeid: string, - assistantid: string, - rerankermodelproviderid: string, - rerankermodelprovidername: string, - assistantknowledgererankeroptionsList: Array, - topk: number, - scorethreshold: number, - retrievalmethod: string, - rerankerenable: boolean, - } -} - -export class UpdateAssistantKnowledgeRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getKnowledgeid(): string; - setKnowledgeid(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getRerankermodelproviderid(): string; - setRerankermodelproviderid(value: string): void; - - getRerankermodelprovidername(): string; - setRerankermodelprovidername(value: string): void; - - clearAssistantknowledgererankeroptionsList(): void; - getAssistantknowledgererankeroptionsList(): Array; - setAssistantknowledgererankeroptionsList(value: Array): void; - addAssistantknowledgererankeroptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - getScorethreshold(): number; - setScorethreshold(value: number): void; - - getTopk(): number; - setTopk(value: number): void; - - getRetrievalmethod(): string; - setRetrievalmethod(value: string): void; - - getRerankerenable(): boolean; - setRerankerenable(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateAssistantKnowledgeRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateAssistantKnowledgeRequest): UpdateAssistantKnowledgeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateAssistantKnowledgeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateAssistantKnowledgeRequest; - static deserializeBinaryFromReader(message: UpdateAssistantKnowledgeRequest, reader: jspb.BinaryReader): UpdateAssistantKnowledgeRequest; -} - -export namespace UpdateAssistantKnowledgeRequest { - export type AsObject = { - id: string, - knowledgeid: string, - assistantid: string, - rerankermodelproviderid: string, - rerankermodelprovidername: string, - assistantknowledgererankeroptionsList: Array, - scorethreshold: number, - topk: number, - retrievalmethod: string, - rerankerenable: boolean, - } -} - -export class GetAssistantKnowledgeRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantKnowledgeRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantKnowledgeRequest): GetAssistantKnowledgeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantKnowledgeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantKnowledgeRequest; - static deserializeBinaryFromReader(message: GetAssistantKnowledgeRequest, reader: jspb.BinaryReader): GetAssistantKnowledgeRequest; -} - -export namespace GetAssistantKnowledgeRequest { - export type AsObject = { - id: string, - assistantid: string, - } -} - -export class DeleteAssistantKnowledgeRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteAssistantKnowledgeRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeleteAssistantKnowledgeRequest): DeleteAssistantKnowledgeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteAssistantKnowledgeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteAssistantKnowledgeRequest; - static deserializeBinaryFromReader(message: DeleteAssistantKnowledgeRequest, reader: jspb.BinaryReader): DeleteAssistantKnowledgeRequest; -} - -export namespace DeleteAssistantKnowledgeRequest { - export type AsObject = { - id: string, - assistantid: string, - } -} - -export class GetAssistantKnowledgeResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantKnowledge | undefined; - setData(value?: AssistantKnowledge): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantKnowledgeResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantKnowledgeResponse): GetAssistantKnowledgeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantKnowledgeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantKnowledgeResponse; - static deserializeBinaryFromReader(message: GetAssistantKnowledgeResponse, reader: jspb.BinaryReader): GetAssistantKnowledgeResponse; -} - -export namespace GetAssistantKnowledgeResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantKnowledge.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAllAssistantKnowledgeRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantKnowledgeRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantKnowledgeRequest): GetAllAssistantKnowledgeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantKnowledgeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantKnowledgeRequest; - static deserializeBinaryFromReader(message: GetAllAssistantKnowledgeRequest, reader: jspb.BinaryReader): GetAllAssistantKnowledgeRequest; -} - -export namespace GetAllAssistantKnowledgeRequest { - export type AsObject = { - assistantid: string, - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllAssistantKnowledgeResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: AssistantKnowledge, index?: number): AssistantKnowledge; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantKnowledgeResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantKnowledgeResponse): GetAllAssistantKnowledgeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantKnowledgeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantKnowledgeResponse; - static deserializeBinaryFromReader(message: GetAllAssistantKnowledgeResponse, reader: jspb.BinaryReader): GetAllAssistantKnowledgeResponse; -} - -export namespace GetAllAssistantKnowledgeResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - diff --git a/src/clients/protos/assistant-tool.ts b/src/clients/protos/assistant-tool.ts new file mode 100644 index 0000000..262bdc5 --- /dev/null +++ b/src/clients/protos/assistant-tool.ts @@ -0,0 +1,2305 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: assistant-tool.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./common"; +import * as dependency_3 from "./google/protobuf/struct"; +import * as pb_1 from "google-protobuf"; +export namespace assistant_api { + export class AssistantTool extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantId?: string; + name?: string; + description?: string; + fields?: dependency_3.google.protobuf.Struct; + executionMethod?: string; + executionOptions?: dependency_2.Metadata[]; + status?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("fields" in data && data.fields != undefined) { + this.fields = data.fields; + } + if ("executionMethod" in data && data.executionMethod != undefined) { + this.executionMethod = data.executionMethod; + } + if ("executionOptions" in data && data.executionOptions != undefined) { + this.executionOptions = data.executionOptions; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 3, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 4, value); + } + get fields() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 5) as dependency_3.google.protobuf.Struct; + } + set fields(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_fields() { + return pb_1.Message.getField(this, 5) != null; + } + get executionMethod() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set executionMethod(value: string) { + pb_1.Message.setField(this, 6, value); + } + get executionOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 7) as dependency_2.Metadata[]; + } + set executionOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 25, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 25, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + static fromObject(data: { + id?: string; + assistantId?: string; + name?: string; + description?: string; + fields?: ReturnType; + executionMethod?: string; + executionOptions?: ReturnType[]; + status?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + }): AssistantTool { + const message = new AssistantTool({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.fields != null) { + message.fields = dependency_3.google.protobuf.Struct.fromObject(data.fields); + } + if (data.executionMethod != null) { + message.executionMethod = data.executionMethod; + } + if (data.executionOptions != null) { + message.executionOptions = data.executionOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + name?: string; + description?: string; + fields?: ReturnType; + executionMethod?: string; + executionOptions?: ReturnType[]; + status?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.fields != null) { + data.fields = this.fields.toObject(); + } + if (this.executionMethod != null) { + data.executionMethod = this.executionMethod; + } + if (this.executionOptions != null) { + data.executionOptions = this.executionOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (this.name.length) + writer.writeString(3, this.name); + if (this.description.length) + writer.writeString(4, this.description); + if (this.has_fields) + writer.writeMessage(5, this.fields, () => this.fields.serialize(writer)); + if (this.executionMethod.length) + writer.writeString(6, this.executionMethod); + if (this.executionOptions.length) + writer.writeRepeatedMessage(7, this.executionOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (this.status.length) + writer.writeString(25, this.status); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantTool { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantTool(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + case 3: + message.name = reader.readString(); + break; + case 4: + message.description = reader.readString(); + break; + case 5: + reader.readMessage(message.fields, () => message.fields = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 6: + message.executionMethod = reader.readString(); + break; + case 7: + reader.readMessage(message.executionOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + case 25: + message.status = reader.readString(); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantTool { + return AssistantTool.deserialize(bytes); + } + } + export class CreateAssistantToolRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + name?: string; + description?: string; + fields?: dependency_3.google.protobuf.Struct; + executionMethod?: string; + executionOptions?: dependency_2.Metadata[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("fields" in data && data.fields != undefined) { + this.fields = data.fields; + } + if ("executionMethod" in data && data.executionMethod != undefined) { + this.executionMethod = data.executionMethod; + } + if ("executionOptions" in data && data.executionOptions != undefined) { + this.executionOptions = data.executionOptions; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 3, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 4, value); + } + get fields() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 5) as dependency_3.google.protobuf.Struct; + } + set fields(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_fields() { + return pb_1.Message.getField(this, 5) != null; + } + get executionMethod() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set executionMethod(value: string) { + pb_1.Message.setField(this, 6, value); + } + get executionOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 7) as dependency_2.Metadata[]; + } + set executionOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + static fromObject(data: { + assistantId?: string; + name?: string; + description?: string; + fields?: ReturnType; + executionMethod?: string; + executionOptions?: ReturnType[]; + }): CreateAssistantToolRequest { + const message = new CreateAssistantToolRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.fields != null) { + message.fields = dependency_3.google.protobuf.Struct.fromObject(data.fields); + } + if (data.executionMethod != null) { + message.executionMethod = data.executionMethod; + } + if (data.executionOptions != null) { + message.executionOptions = data.executionOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + return message; + } + toObject() { + const data: { + assistantId?: string; + name?: string; + description?: string; + fields?: ReturnType; + executionMethod?: string; + executionOptions?: ReturnType[]; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.fields != null) { + data.fields = this.fields.toObject(); + } + if (this.executionMethod != null) { + data.executionMethod = this.executionMethod; + } + if (this.executionOptions != null) { + data.executionOptions = this.executionOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.name.length) + writer.writeString(3, this.name); + if (this.description.length) + writer.writeString(4, this.description); + if (this.has_fields) + writer.writeMessage(5, this.fields, () => this.fields.serialize(writer)); + if (this.executionMethod.length) + writer.writeString(6, this.executionMethod); + if (this.executionOptions.length) + writer.writeRepeatedMessage(7, this.executionOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateAssistantToolRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateAssistantToolRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 3: + message.name = reader.readString(); + break; + case 4: + message.description = reader.readString(); + break; + case 5: + reader.readMessage(message.fields, () => message.fields = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 6: + message.executionMethod = reader.readString(); + break; + case 7: + reader.readMessage(message.executionOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateAssistantToolRequest { + return CreateAssistantToolRequest.deserialize(bytes); + } + } + export class UpdateAssistantToolRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantId?: string; + name?: string; + description?: string; + fields?: dependency_3.google.protobuf.Struct; + executionMethod?: string; + executionOptions?: dependency_2.Metadata[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("fields" in data && data.fields != undefined) { + this.fields = data.fields; + } + if ("executionMethod" in data && data.executionMethod != undefined) { + this.executionMethod = data.executionMethod; + } + if ("executionOptions" in data && data.executionOptions != undefined) { + this.executionOptions = data.executionOptions; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 3, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 4, value); + } + get fields() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 5) as dependency_3.google.protobuf.Struct; + } + set fields(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_fields() { + return pb_1.Message.getField(this, 5) != null; + } + get executionMethod() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set executionMethod(value: string) { + pb_1.Message.setField(this, 6, value); + } + get executionOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 7) as dependency_2.Metadata[]; + } + set executionOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + static fromObject(data: { + id?: string; + assistantId?: string; + name?: string; + description?: string; + fields?: ReturnType; + executionMethod?: string; + executionOptions?: ReturnType[]; + }): UpdateAssistantToolRequest { + const message = new UpdateAssistantToolRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.fields != null) { + message.fields = dependency_3.google.protobuf.Struct.fromObject(data.fields); + } + if (data.executionMethod != null) { + message.executionMethod = data.executionMethod; + } + if (data.executionOptions != null) { + message.executionOptions = data.executionOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + name?: string; + description?: string; + fields?: ReturnType; + executionMethod?: string; + executionOptions?: ReturnType[]; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.fields != null) { + data.fields = this.fields.toObject(); + } + if (this.executionMethod != null) { + data.executionMethod = this.executionMethod; + } + if (this.executionOptions != null) { + data.executionOptions = this.executionOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (this.name.length) + writer.writeString(3, this.name); + if (this.description.length) + writer.writeString(4, this.description); + if (this.has_fields) + writer.writeMessage(5, this.fields, () => this.fields.serialize(writer)); + if (this.executionMethod.length) + writer.writeString(6, this.executionMethod); + if (this.executionOptions.length) + writer.writeRepeatedMessage(7, this.executionOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateAssistantToolRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateAssistantToolRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + case 3: + message.name = reader.readString(); + break; + case 4: + message.description = reader.readString(); + break; + case 5: + reader.readMessage(message.fields, () => message.fields = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 6: + message.executionMethod = reader.readString(); + break; + case 7: + reader.readMessage(message.executionOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateAssistantToolRequest { + return UpdateAssistantToolRequest.deserialize(bytes); + } + } + export class GetAssistantToolRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: string; + assistantId?: string; + }): GetAssistantToolRequest { + const message = new GetAssistantToolRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantToolRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantToolRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantToolRequest { + return GetAssistantToolRequest.deserialize(bytes); + } + } + export class DeleteAssistantToolRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: string; + assistantId?: string; + }): DeleteAssistantToolRequest { + const message = new DeleteAssistantToolRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeleteAssistantToolRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteAssistantToolRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DeleteAssistantToolRequest { + return DeleteAssistantToolRequest.deserialize(bytes); + } + } + export class GetAssistantToolResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantTool; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantTool, 3) as AssistantTool; + } + set data(value: AssistantTool) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantToolResponse { + const message = new GetAssistantToolResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantTool.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantToolResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantToolResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantTool.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantToolResponse { + return GetAssistantToolResponse.deserialize(bytes); + } + } + export class GetAllAssistantToolRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 2) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 2) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 3) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllAssistantToolRequest { + const message = new GetAllAssistantToolRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.has_paginate) + writer.writeMessage(2, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(3, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantToolRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantToolRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 3: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantToolRequest { + return GetAllAssistantToolRequest.deserialize(bytes); + } + } + export class GetAllAssistantToolResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantTool[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantTool, 3) as AssistantTool[]; + } + set data(value: AssistantTool[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantToolResponse { + const message = new GetAllAssistantToolResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => AssistantTool.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: AssistantTool) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: AssistantTool) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantToolResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantToolResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AssistantTool.deserialize(reader), AssistantTool)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantToolResponse { + return GetAllAssistantToolResponse.deserialize(bytes); + } + } + export class GetAllAssistantToolLogRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + projectId?: string; + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + order?: dependency_2.Ordering; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("order" in data && data.order != undefined) { + this.order = data.order; + } + } + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 3) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 3) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 4) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get order() { + return pb_1.Message.getWrapperField(this, dependency_2.Ordering, 5) as dependency_2.Ordering; + } + set order(value: dependency_2.Ordering) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_order() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + projectId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + order?: ReturnType; + }): GetAllAssistantToolLogRequest { + const message = new GetAllAssistantToolLogRequest({}); + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.order != null) { + message.order = dependency_2.Ordering.fromObject(data.order); + } + return message; + } + toObject() { + const data: { + projectId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + order?: ReturnType; + } = {}; + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.order != null) { + data.order = this.order.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.projectId != "0") + writer.writeUint64String(2, this.projectId); + if (this.has_paginate) + writer.writeMessage(3, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(4, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.has_order) + writer.writeMessage(5, this.order, () => this.order.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantToolLogRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantToolLogRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.projectId = reader.readUint64String(); + break; + case 3: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 4: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 5: + reader.readMessage(message.order, () => message.order = dependency_2.Ordering.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantToolLogRequest { + return GetAllAssistantToolLogRequest.deserialize(bytes); + } + } + export class GetAssistantToolLogRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + projectId?: string; + id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + projectId?: string; + id?: string; + }): GetAssistantToolLogRequest { + const message = new GetAssistantToolLogRequest({}); + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + projectId?: string; + id?: string; + } = {}; + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.id != null) { + data.id = this.id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.projectId != "0") + writer.writeUint64String(2, this.projectId); + if (this.id != "0") + writer.writeUint64String(3, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantToolLogRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantToolLogRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.projectId = reader.readUint64String(); + break; + case 3: + message.id = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantToolLogRequest { + return GetAssistantToolLogRequest.deserialize(bytes); + } + } + export class GetAssistantToolLogResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantToolLog; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantToolLog, 3) as AssistantToolLog; + } + set data(value: AssistantToolLog) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantToolLogResponse { + const message = new GetAssistantToolLogResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantToolLog.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantToolLogResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantToolLogResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantToolLog.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantToolLogResponse { + return GetAssistantToolLogResponse.deserialize(bytes); + } + } + export class GetAllAssistantToolLogResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantToolLog[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantToolLog, 3) as AssistantToolLog[]; + } + set data(value: AssistantToolLog[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantToolLogResponse { + const message = new GetAllAssistantToolLogResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => AssistantToolLog.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: AssistantToolLog) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: AssistantToolLog) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantToolLogResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantToolLogResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AssistantToolLog.deserialize(reader), AssistantToolLog)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantToolLogResponse { + return GetAllAssistantToolLogResponse.deserialize(bytes); + } + } + export class AssistantToolLog extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + action?: dependency_3.google.protobuf.Struct; + request?: dependency_3.google.protobuf.Struct; + response?: dependency_3.google.protobuf.Struct; + status?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + assistantId?: string; + projectId?: string; + organizationId?: string; + assistantConversationId?: string; + assistantConversationMessageId?: string; + assetPrefix?: string; + executionMethod?: string; + timeTaken?: string; + assistantToolId?: string; + assistantToolName?: string; + assistantTool?: AssistantTool; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("action" in data && data.action != undefined) { + this.action = data.action; + } + if ("request" in data && data.request != undefined) { + this.request = data.request; + } + if ("response" in data && data.response != undefined) { + this.response = data.response; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("assistantConversationId" in data && data.assistantConversationId != undefined) { + this.assistantConversationId = data.assistantConversationId; + } + if ("assistantConversationMessageId" in data && data.assistantConversationMessageId != undefined) { + this.assistantConversationMessageId = data.assistantConversationMessageId; + } + if ("assetPrefix" in data && data.assetPrefix != undefined) { + this.assetPrefix = data.assetPrefix; + } + if ("executionMethod" in data && data.executionMethod != undefined) { + this.executionMethod = data.executionMethod; + } + if ("timeTaken" in data && data.timeTaken != undefined) { + this.timeTaken = data.timeTaken; + } + if ("assistantToolId" in data && data.assistantToolId != undefined) { + this.assistantToolId = data.assistantToolId; + } + if ("assistantToolName" in data && data.assistantToolName != undefined) { + this.assistantToolName = data.assistantToolName; + } + if ("assistantTool" in data && data.assistantTool != undefined) { + this.assistantTool = data.assistantTool; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get action() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 2) as dependency_3.google.protobuf.Struct; + } + set action(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_action() { + return pb_1.Message.getField(this, 2) != null; + } + get request() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 3) as dependency_3.google.protobuf.Struct; + } + set request(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_request() { + return pb_1.Message.getField(this, 3) != null; + } + get response() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 4) as dependency_3.google.protobuf.Struct; + } + set response(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_response() { + return pb_1.Message.getField(this, 4) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 5, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 6) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 6) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 7) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 7) != null; + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 8, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 9, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 9, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 10, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 10, value); + } + get assistantConversationId() { + return pb_1.Message.getFieldWithDefault(this, 11, "0") as string; + } + set assistantConversationId(value: string) { + pb_1.Message.setField(this, 11, value); + } + get assistantConversationMessageId() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set assistantConversationMessageId(value: string) { + pb_1.Message.setField(this, 12, value); + } + get assetPrefix() { + return pb_1.Message.getFieldWithDefault(this, 14, "") as string; + } + set assetPrefix(value: string) { + pb_1.Message.setField(this, 14, value); + } + get executionMethod() { + return pb_1.Message.getFieldWithDefault(this, 15, "") as string; + } + set executionMethod(value: string) { + pb_1.Message.setField(this, 15, value); + } + get timeTaken() { + return pb_1.Message.getFieldWithDefault(this, 16, "0") as string; + } + set timeTaken(value: string) { + pb_1.Message.setField(this, 16, value); + } + get assistantToolId() { + return pb_1.Message.getFieldWithDefault(this, 13, "0") as string; + } + set assistantToolId(value: string) { + pb_1.Message.setField(this, 13, value); + } + get assistantToolName() { + return pb_1.Message.getFieldWithDefault(this, 17, "") as string; + } + set assistantToolName(value: string) { + pb_1.Message.setField(this, 17, value); + } + get assistantTool() { + return pb_1.Message.getWrapperField(this, AssistantTool, 18) as AssistantTool; + } + set assistantTool(value: AssistantTool) { + pb_1.Message.setWrapperField(this, 18, value); + } + get has_assistantTool() { + return pb_1.Message.getField(this, 18) != null; + } + static fromObject(data: { + id?: string; + action?: ReturnType; + request?: ReturnType; + response?: ReturnType; + status?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + assistantId?: string; + projectId?: string; + organizationId?: string; + assistantConversationId?: string; + assistantConversationMessageId?: string; + assetPrefix?: string; + executionMethod?: string; + timeTaken?: string; + assistantToolId?: string; + assistantToolName?: string; + assistantTool?: ReturnType; + }): AssistantToolLog { + const message = new AssistantToolLog({}); + if (data.id != null) { + message.id = data.id; + } + if (data.action != null) { + message.action = dependency_3.google.protobuf.Struct.fromObject(data.action); + } + if (data.request != null) { + message.request = dependency_3.google.protobuf.Struct.fromObject(data.request); + } + if (data.response != null) { + message.response = dependency_3.google.protobuf.Struct.fromObject(data.response); + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.assistantConversationId != null) { + message.assistantConversationId = data.assistantConversationId; + } + if (data.assistantConversationMessageId != null) { + message.assistantConversationMessageId = data.assistantConversationMessageId; + } + if (data.assetPrefix != null) { + message.assetPrefix = data.assetPrefix; + } + if (data.executionMethod != null) { + message.executionMethod = data.executionMethod; + } + if (data.timeTaken != null) { + message.timeTaken = data.timeTaken; + } + if (data.assistantToolId != null) { + message.assistantToolId = data.assistantToolId; + } + if (data.assistantToolName != null) { + message.assistantToolName = data.assistantToolName; + } + if (data.assistantTool != null) { + message.assistantTool = AssistantTool.fromObject(data.assistantTool); + } + return message; + } + toObject() { + const data: { + id?: string; + action?: ReturnType; + request?: ReturnType; + response?: ReturnType; + status?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + assistantId?: string; + projectId?: string; + organizationId?: string; + assistantConversationId?: string; + assistantConversationMessageId?: string; + assetPrefix?: string; + executionMethod?: string; + timeTaken?: string; + assistantToolId?: string; + assistantToolName?: string; + assistantTool?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.action != null) { + data.action = this.action.toObject(); + } + if (this.request != null) { + data.request = this.request.toObject(); + } + if (this.response != null) { + data.response = this.response.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.assistantConversationId != null) { + data.assistantConversationId = this.assistantConversationId; + } + if (this.assistantConversationMessageId != null) { + data.assistantConversationMessageId = this.assistantConversationMessageId; + } + if (this.assetPrefix != null) { + data.assetPrefix = this.assetPrefix; + } + if (this.executionMethod != null) { + data.executionMethod = this.executionMethod; + } + if (this.timeTaken != null) { + data.timeTaken = this.timeTaken; + } + if (this.assistantToolId != null) { + data.assistantToolId = this.assistantToolId; + } + if (this.assistantToolName != null) { + data.assistantToolName = this.assistantToolName; + } + if (this.assistantTool != null) { + data.assistantTool = this.assistantTool.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.has_action) + writer.writeMessage(2, this.action, () => this.action.serialize(writer)); + if (this.has_request) + writer.writeMessage(3, this.request, () => this.request.serialize(writer)); + if (this.has_response) + writer.writeMessage(4, this.response, () => this.response.serialize(writer)); + if (this.status.length) + writer.writeString(5, this.status); + if (this.has_createdDate) + writer.writeMessage(6, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(7, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.assistantId != "0") + writer.writeUint64String(8, this.assistantId); + if (this.projectId != "0") + writer.writeUint64String(9, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(10, this.organizationId); + if (this.assistantConversationId != "0") + writer.writeUint64String(11, this.assistantConversationId); + if (this.assistantConversationMessageId.length) + writer.writeString(12, this.assistantConversationMessageId); + if (this.assetPrefix.length) + writer.writeString(14, this.assetPrefix); + if (this.executionMethod.length) + writer.writeString(15, this.executionMethod); + if (this.timeTaken != "0") + writer.writeUint64String(16, this.timeTaken); + if (this.assistantToolId != "0") + writer.writeUint64String(13, this.assistantToolId); + if (this.assistantToolName.length) + writer.writeString(17, this.assistantToolName); + if (this.has_assistantTool) + writer.writeMessage(18, this.assistantTool, () => this.assistantTool.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantToolLog { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantToolLog(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.action, () => message.action = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 3: + reader.readMessage(message.request, () => message.request = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 4: + reader.readMessage(message.response, () => message.response = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 5: + message.status = reader.readString(); + break; + case 6: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 7: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 8: + message.assistantId = reader.readUint64String(); + break; + case 9: + message.projectId = reader.readUint64String(); + break; + case 10: + message.organizationId = reader.readUint64String(); + break; + case 11: + message.assistantConversationId = reader.readUint64String(); + break; + case 12: + message.assistantConversationMessageId = reader.readString(); + break; + case 14: + message.assetPrefix = reader.readString(); + break; + case 15: + message.executionMethod = reader.readString(); + break; + case 16: + message.timeTaken = reader.readUint64String(); + break; + case 13: + message.assistantToolId = reader.readUint64String(); + break; + case 17: + message.assistantToolName = reader.readString(); + break; + case 18: + reader.readMessage(message.assistantTool, () => message.assistantTool = AssistantTool.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantToolLog { + return AssistantToolLog.deserialize(bytes); + } + } +} diff --git a/src/clients/protos/assistant-tool_grpc_pb.d.ts b/src/clients/protos/assistant-tool_grpc_pb.d.ts deleted file mode 100644 index 51b4d69..0000000 --- a/src/clients/protos/assistant-tool_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/src/clients/protos/assistant-tool_pb.d.ts b/src/clients/protos/assistant-tool_pb.d.ts deleted file mode 100644 index 697dc5a..0000000 --- a/src/clients/protos/assistant-tool_pb.d.ts +++ /dev/null @@ -1,322 +0,0 @@ -// package: assistant_api -// file: assistant-tool.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as common_pb from "./common_pb"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; - -export class AssistantTool extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - hasFields(): boolean; - clearFields(): void; - getFields(): google_protobuf_struct_pb.Struct | undefined; - setFields(value?: google_protobuf_struct_pb.Struct): void; - - getExecutionmethod(): string; - setExecutionmethod(value: string): void; - - clearExecutionoptionsList(): void; - getExecutionoptionsList(): Array; - setExecutionoptionsList(value: Array): void; - addExecutionoptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - getStatus(): string; - setStatus(value: string): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantTool.AsObject; - static toObject(includeInstance: boolean, msg: AssistantTool): AssistantTool.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantTool, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantTool; - static deserializeBinaryFromReader(message: AssistantTool, reader: jspb.BinaryReader): AssistantTool; -} - -export namespace AssistantTool { - export type AsObject = { - id: string, - assistantid: string, - name: string, - description: string, - fields?: google_protobuf_struct_pb.Struct.AsObject, - executionmethod: string, - executionoptionsList: Array, - status: string, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class CreateAssistantToolRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - hasFields(): boolean; - clearFields(): void; - getFields(): google_protobuf_struct_pb.Struct | undefined; - setFields(value?: google_protobuf_struct_pb.Struct): void; - - getExecutionmethod(): string; - setExecutionmethod(value: string): void; - - clearExecutionoptionsList(): void; - getExecutionoptionsList(): Array; - setExecutionoptionsList(value: Array): void; - addExecutionoptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantToolRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantToolRequest): CreateAssistantToolRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantToolRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantToolRequest; - static deserializeBinaryFromReader(message: CreateAssistantToolRequest, reader: jspb.BinaryReader): CreateAssistantToolRequest; -} - -export namespace CreateAssistantToolRequest { - export type AsObject = { - assistantid: string, - name: string, - description: string, - fields?: google_protobuf_struct_pb.Struct.AsObject, - executionmethod: string, - executionoptionsList: Array, - } -} - -export class UpdateAssistantToolRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - hasFields(): boolean; - clearFields(): void; - getFields(): google_protobuf_struct_pb.Struct | undefined; - setFields(value?: google_protobuf_struct_pb.Struct): void; - - getExecutionmethod(): string; - setExecutionmethod(value: string): void; - - clearExecutionoptionsList(): void; - getExecutionoptionsList(): Array; - setExecutionoptionsList(value: Array): void; - addExecutionoptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateAssistantToolRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateAssistantToolRequest): UpdateAssistantToolRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateAssistantToolRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateAssistantToolRequest; - static deserializeBinaryFromReader(message: UpdateAssistantToolRequest, reader: jspb.BinaryReader): UpdateAssistantToolRequest; -} - -export namespace UpdateAssistantToolRequest { - export type AsObject = { - id: string, - assistantid: string, - name: string, - description: string, - fields?: google_protobuf_struct_pb.Struct.AsObject, - executionmethod: string, - executionoptionsList: Array, - } -} - -export class GetAssistantToolRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantToolRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantToolRequest): GetAssistantToolRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantToolRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantToolRequest; - static deserializeBinaryFromReader(message: GetAssistantToolRequest, reader: jspb.BinaryReader): GetAssistantToolRequest; -} - -export namespace GetAssistantToolRequest { - export type AsObject = { - id: string, - assistantid: string, - } -} - -export class DeleteAssistantToolRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteAssistantToolRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeleteAssistantToolRequest): DeleteAssistantToolRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteAssistantToolRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteAssistantToolRequest; - static deserializeBinaryFromReader(message: DeleteAssistantToolRequest, reader: jspb.BinaryReader): DeleteAssistantToolRequest; -} - -export namespace DeleteAssistantToolRequest { - export type AsObject = { - id: string, - assistantid: string, - } -} - -export class GetAssistantToolResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantTool | undefined; - setData(value?: AssistantTool): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantToolResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantToolResponse): GetAssistantToolResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantToolResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantToolResponse; - static deserializeBinaryFromReader(message: GetAssistantToolResponse, reader: jspb.BinaryReader): GetAssistantToolResponse; -} - -export namespace GetAssistantToolResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantTool.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAllAssistantToolRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantToolRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantToolRequest): GetAllAssistantToolRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantToolRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantToolRequest; - static deserializeBinaryFromReader(message: GetAllAssistantToolRequest, reader: jspb.BinaryReader): GetAllAssistantToolRequest; -} - -export namespace GetAllAssistantToolRequest { - export type AsObject = { - assistantid: string, - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllAssistantToolResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: AssistantTool, index?: number): AssistantTool; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantToolResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantToolResponse): GetAllAssistantToolResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantToolResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantToolResponse; - static deserializeBinaryFromReader(message: GetAllAssistantToolResponse, reader: jspb.BinaryReader): GetAllAssistantToolResponse; -} - -export namespace GetAllAssistantToolResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - diff --git a/src/clients/protos/assistant-tool_pb.js b/src/clients/protos/assistant-tool_pb.js index 15c7fde..0ebe0a1 100644 --- a/src/clients/protos/assistant-tool_pb.js +++ b/src/clients/protos/assistant-tool_pb.js @@ -28,10 +28,15 @@ goog.object.extend(proto, common_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.assistant_api.AssistantTool', null, global); +goog.exportSymbol('proto.assistant_api.AssistantToolLog', null, global); goog.exportSymbol('proto.assistant_api.CreateAssistantToolRequest', null, global); goog.exportSymbol('proto.assistant_api.DeleteAssistantToolRequest', null, global); +goog.exportSymbol('proto.assistant_api.GetAllAssistantToolLogRequest', null, global); +goog.exportSymbol('proto.assistant_api.GetAllAssistantToolLogResponse', null, global); goog.exportSymbol('proto.assistant_api.GetAllAssistantToolRequest', null, global); goog.exportSymbol('proto.assistant_api.GetAllAssistantToolResponse', null, global); +goog.exportSymbol('proto.assistant_api.GetAssistantToolLogRequest', null, global); +goog.exportSymbol('proto.assistant_api.GetAssistantToolLogResponse', null, global); goog.exportSymbol('proto.assistant_api.GetAssistantToolRequest', null, global); goog.exportSymbol('proto.assistant_api.GetAssistantToolResponse', null, global); goog.exportSymbol('proto.assistant_api.UpdateAssistantToolRequest', null, global); @@ -203,6 +208,111 @@ if (goog.DEBUG && !COMPILED) { */ proto.assistant_api.GetAllAssistantToolResponse.displayName = 'proto.assistant_api.GetAllAssistantToolResponse'; } +/** + * 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.assistant_api.GetAllAssistantToolLogRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.assistant_api.GetAllAssistantToolLogRequest.repeatedFields_, null); +}; +goog.inherits(proto.assistant_api.GetAllAssistantToolLogRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.assistant_api.GetAllAssistantToolLogRequest.displayName = 'proto.assistant_api.GetAllAssistantToolLogRequest'; +} +/** + * 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.assistant_api.GetAssistantToolLogRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.assistant_api.GetAssistantToolLogRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.assistant_api.GetAssistantToolLogRequest.displayName = 'proto.assistant_api.GetAssistantToolLogRequest'; +} +/** + * 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.assistant_api.GetAssistantToolLogResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.assistant_api.GetAssistantToolLogResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.assistant_api.GetAssistantToolLogResponse.displayName = 'proto.assistant_api.GetAssistantToolLogResponse'; +} +/** + * 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.assistant_api.GetAllAssistantToolLogResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.assistant_api.GetAllAssistantToolLogResponse.repeatedFields_, null); +}; +goog.inherits(proto.assistant_api.GetAllAssistantToolLogResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.assistant_api.GetAllAssistantToolLogResponse.displayName = 'proto.assistant_api.GetAllAssistantToolLogResponse'; +} +/** + * 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.assistant_api.AssistantToolLog = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.assistant_api.AssistantToolLog, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.assistant_api.AssistantToolLog.displayName = 'proto.assistant_api.AssistantToolLog'; +} /** * List of repeated fields within this message type. @@ -2533,4 +2643,1806 @@ proto.assistant_api.GetAllAssistantToolResponse.prototype.hasPaginated = functio }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.assistant_api.GetAllAssistantToolLogRequest.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.assistant_api.GetAllAssistantToolLogRequest.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.GetAllAssistantToolLogRequest.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.assistant_api.GetAllAssistantToolLogRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.assistant_api.GetAllAssistantToolLogRequest.toObject = function(includeInstance, msg) { + var f, obj = { + projectid: jspb.Message.getFieldWithDefault(msg, 2, "0"), + paginate: (f = msg.getPaginate()) && common_pb.Paginate.toObject(includeInstance, f), + criteriasList: jspb.Message.toObjectList(msg.getCriteriasList(), + common_pb.Criteria.toObject, includeInstance), + order: (f = msg.getOrder()) && common_pb.Ordering.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.assistant_api.GetAllAssistantToolLogRequest} + */ +proto.assistant_api.GetAllAssistantToolLogRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.assistant_api.GetAllAssistantToolLogRequest; + return proto.assistant_api.GetAllAssistantToolLogRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.assistant_api.GetAllAssistantToolLogRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.assistant_api.GetAllAssistantToolLogRequest} + */ +proto.assistant_api.GetAllAssistantToolLogRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setProjectid(value); + break; + case 3: + var value = new common_pb.Paginate; + reader.readMessage(value,common_pb.Paginate.deserializeBinaryFromReader); + msg.setPaginate(value); + break; + case 4: + var value = new common_pb.Criteria; + reader.readMessage(value,common_pb.Criteria.deserializeBinaryFromReader); + msg.addCriterias(value); + break; + case 5: + var value = new common_pb.Ordering; + reader.readMessage(value,common_pb.Ordering.deserializeBinaryFromReader); + msg.setOrder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.assistant_api.GetAllAssistantToolLogRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.assistant_api.GetAllAssistantToolLogRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.assistant_api.GetAllAssistantToolLogRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProjectid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f + ); + } + f = message.getPaginate(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_pb.Paginate.serializeBinaryToWriter + ); + } + f = message.getCriteriasList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + common_pb.Criteria.serializeBinaryToWriter + ); + } + f = message.getOrder(); + if (f != null) { + writer.writeMessage( + 5, + f, + common_pb.Ordering.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 projectId = 2; + * @return {string} + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.getProjectid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.GetAllAssistantToolLogRequest} returns this + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.setProjectid = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); +}; + + +/** + * optional Paginate paginate = 3; + * @return {?proto.Paginate} + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.getPaginate = function() { + return /** @type{?proto.Paginate} */ ( + jspb.Message.getWrapperField(this, common_pb.Paginate, 3)); +}; + + +/** + * @param {?proto.Paginate|undefined} value + * @return {!proto.assistant_api.GetAllAssistantToolLogRequest} returns this +*/ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.setPaginate = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.GetAllAssistantToolLogRequest} returns this + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.clearPaginate = function() { + return this.setPaginate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.hasPaginate = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated Criteria criterias = 4; + * @return {!Array} + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.getCriteriasList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_pb.Criteria, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.assistant_api.GetAllAssistantToolLogRequest} returns this +*/ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.setCriteriasList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.Criteria=} opt_value + * @param {number=} opt_index + * @return {!proto.Criteria} + */ +proto.assistant_api.GetAllAssistantToolLogRequest.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.assistant_api.GetAllAssistantToolLogRequest} returns this + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.clearCriteriasList = function() { + return this.setCriteriasList([]); +}; + + +/** + * optional Ordering order = 5; + * @return {?proto.Ordering} + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.getOrder = function() { + return /** @type{?proto.Ordering} */ ( + jspb.Message.getWrapperField(this, common_pb.Ordering, 5)); +}; + + +/** + * @param {?proto.Ordering|undefined} value + * @return {!proto.assistant_api.GetAllAssistantToolLogRequest} returns this +*/ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.setOrder = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.GetAllAssistantToolLogRequest} returns this + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.clearOrder = function() { + return this.setOrder(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.GetAllAssistantToolLogRequest.prototype.hasOrder = 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.assistant_api.GetAssistantToolLogRequest.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.GetAssistantToolLogRequest.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.assistant_api.GetAssistantToolLogRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.assistant_api.GetAssistantToolLogRequest.toObject = function(includeInstance, msg) { + var f, obj = { + projectid: jspb.Message.getFieldWithDefault(msg, 2, "0"), + id: jspb.Message.getFieldWithDefault(msg, 3, "0") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.assistant_api.GetAssistantToolLogRequest} + */ +proto.assistant_api.GetAssistantToolLogRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.assistant_api.GetAssistantToolLogRequest; + return proto.assistant_api.GetAssistantToolLogRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.assistant_api.GetAssistantToolLogRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.assistant_api.GetAssistantToolLogRequest} + */ +proto.assistant_api.GetAssistantToolLogRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setProjectid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.assistant_api.GetAssistantToolLogRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.assistant_api.GetAssistantToolLogRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.assistant_api.GetAssistantToolLogRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.assistant_api.GetAssistantToolLogRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProjectid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f + ); + } + f = message.getId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 3, + f + ); + } +}; + + +/** + * optional uint64 projectId = 2; + * @return {string} + */ +proto.assistant_api.GetAssistantToolLogRequest.prototype.getProjectid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.GetAssistantToolLogRequest} returns this + */ +proto.assistant_api.GetAssistantToolLogRequest.prototype.setProjectid = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); +}; + + +/** + * optional uint64 id = 3; + * @return {string} + */ +proto.assistant_api.GetAssistantToolLogRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.GetAssistantToolLogRequest} returns this + */ +proto.assistant_api.GetAssistantToolLogRequest.prototype.setId = 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} + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.GetAssistantToolLogResponse.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.assistant_api.GetAssistantToolLogResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.assistant_api.GetAssistantToolLogResponse.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()) && proto.assistant_api.AssistantToolLog.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.assistant_api.GetAssistantToolLogResponse} + */ +proto.assistant_api.GetAssistantToolLogResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.assistant_api.GetAssistantToolLogResponse; + return proto.assistant_api.GetAssistantToolLogResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.assistant_api.GetAssistantToolLogResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.assistant_api.GetAssistantToolLogResponse} + */ +proto.assistant_api.GetAssistantToolLogResponse.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.assistant_api.AssistantToolLog; + reader.readMessage(value,proto.assistant_api.AssistantToolLog.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.assistant_api.GetAssistantToolLogResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.assistant_api.GetAssistantToolLogResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.assistant_api.GetAssistantToolLogResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.assistant_api.GetAssistantToolLogResponse.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, + proto.assistant_api.AssistantToolLog.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_pb.Error.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.assistant_api.GetAssistantToolLogResponse} returns this + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool success = 2; + * @return {boolean} + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.assistant_api.GetAssistantToolLogResponse} returns this + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional AssistantToolLog data = 3; + * @return {?proto.assistant_api.AssistantToolLog} + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.getData = function() { + return /** @type{?proto.assistant_api.AssistantToolLog} */ ( + jspb.Message.getWrapperField(this, proto.assistant_api.AssistantToolLog, 3)); +}; + + +/** + * @param {?proto.assistant_api.AssistantToolLog|undefined} value + * @return {!proto.assistant_api.GetAssistantToolLogResponse} returns this +*/ +proto.assistant_api.GetAssistantToolLogResponse.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.GetAssistantToolLogResponse} returns this + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.hasData = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Error error = 4; + * @return {?proto.Error} + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, common_pb.Error, 4)); +}; + + +/** + * @param {?proto.Error|undefined} value + * @return {!proto.assistant_api.GetAssistantToolLogResponse} returns this +*/ +proto.assistant_api.GetAssistantToolLogResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.GetAssistantToolLogResponse} returns this + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.GetAssistantToolLogResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.assistant_api.GetAllAssistantToolLogResponse.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.assistant_api.GetAllAssistantToolLogResponse.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.GetAllAssistantToolLogResponse.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.assistant_api.GetAllAssistantToolLogResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.assistant_api.GetAllAssistantToolLogResponse.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.assistant_api.AssistantToolLog.toObject, includeInstance), + error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f), + paginated: (f = msg.getPaginated()) && common_pb.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.assistant_api.GetAllAssistantToolLogResponse} + */ +proto.assistant_api.GetAllAssistantToolLogResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.assistant_api.GetAllAssistantToolLogResponse; + return proto.assistant_api.GetAllAssistantToolLogResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.assistant_api.GetAllAssistantToolLogResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.assistant_api.GetAllAssistantToolLogResponse} + */ +proto.assistant_api.GetAllAssistantToolLogResponse.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.assistant_api.AssistantToolLog; + reader.readMessage(value,proto.assistant_api.AssistantToolLog.deserializeBinaryFromReader); + msg.addData(value); + break; + case 4: + var value = new common_pb.Error; + reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); + msg.setError(value); + break; + case 5: + var value = new common_pb.Paginated; + reader.readMessage(value,common_pb.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.assistant_api.GetAllAssistantToolLogResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.assistant_api.GetAllAssistantToolLogResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.assistant_api.GetAllAssistantToolLogResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.assistant_api.GetAllAssistantToolLogResponse.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.assistant_api.AssistantToolLog.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_pb.Error.serializeBinaryToWriter + ); + } + f = message.getPaginated(); + if (f != null) { + writer.writeMessage( + 5, + f, + common_pb.Paginated.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.assistant_api.GetAllAssistantToolLogResponse} returns this + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool success = 2; + * @return {boolean} + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.assistant_api.GetAllAssistantToolLogResponse} returns this + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * repeated AssistantToolLog data = 3; + * @return {!Array} + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.getDataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.assistant_api.AssistantToolLog, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.assistant_api.GetAllAssistantToolLogResponse} returns this +*/ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.setDataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.assistant_api.AssistantToolLog=} opt_value + * @param {number=} opt_index + * @return {!proto.assistant_api.AssistantToolLog} + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.addData = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.assistant_api.AssistantToolLog, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.assistant_api.GetAllAssistantToolLogResponse} returns this + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.clearDataList = function() { + return this.setDataList([]); +}; + + +/** + * optional Error error = 4; + * @return {?proto.Error} + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, common_pb.Error, 4)); +}; + + +/** + * @param {?proto.Error|undefined} value + * @return {!proto.assistant_api.GetAllAssistantToolLogResponse} returns this +*/ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.GetAllAssistantToolLogResponse} returns this + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Paginated paginated = 5; + * @return {?proto.Paginated} + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.getPaginated = function() { + return /** @type{?proto.Paginated} */ ( + jspb.Message.getWrapperField(this, common_pb.Paginated, 5)); +}; + + +/** + * @param {?proto.Paginated|undefined} value + * @return {!proto.assistant_api.GetAllAssistantToolLogResponse} returns this +*/ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.setPaginated = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.GetAllAssistantToolLogResponse} returns this + */ +proto.assistant_api.GetAllAssistantToolLogResponse.prototype.clearPaginated = function() { + return this.setPaginated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.GetAllAssistantToolLogResponse.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.assistant_api.AssistantToolLog.prototype.toObject = function(opt_includeInstance) { + return proto.assistant_api.AssistantToolLog.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.assistant_api.AssistantToolLog} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.assistant_api.AssistantToolLog.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "0"), + action: (f = msg.getAction()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + request: (f = msg.getRequest()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + response: (f = msg.getResponse()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + status: jspb.Message.getFieldWithDefault(msg, 5, ""), + 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, 8, "0"), + projectid: jspb.Message.getFieldWithDefault(msg, 9, "0"), + organizationid: jspb.Message.getFieldWithDefault(msg, 10, "0"), + assistantconversationid: jspb.Message.getFieldWithDefault(msg, 11, "0"), + assistantconversationmessageid: jspb.Message.getFieldWithDefault(msg, 12, ""), + assetprefix: jspb.Message.getFieldWithDefault(msg, 14, ""), + executionmethod: jspb.Message.getFieldWithDefault(msg, 15, ""), + timetaken: jspb.Message.getFieldWithDefault(msg, 16, "0"), + assistanttoolid: jspb.Message.getFieldWithDefault(msg, 13, "0"), + assistanttoolname: jspb.Message.getFieldWithDefault(msg, 17, ""), + assistanttool: (f = msg.getAssistanttool()) && proto.assistant_api.AssistantTool.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.assistant_api.AssistantToolLog} + */ +proto.assistant_api.AssistantToolLog.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.assistant_api.AssistantToolLog; + return proto.assistant_api.AssistantToolLog.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.assistant_api.AssistantToolLog} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.assistant_api.AssistantToolLog} + */ +proto.assistant_api.AssistantToolLog.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 2: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setAction(value); + break; + case 3: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setRequest(value); + break; + case 4: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setResponse(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(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; + case 8: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantid(value); + break; + case 9: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setProjectid(value); + break; + case 10: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setOrganizationid(value); + break; + case 11: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantconversationid(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setAssistantconversationmessageid(value); + break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setAssetprefix(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setExecutionmethod(value); + break; + case 16: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setTimetaken(value); + break; + case 13: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistanttoolid(value); + break; + case 17: + var value = /** @type {string} */ (reader.readString()); + msg.setAssistanttoolname(value); + break; + case 18: + var value = new proto.assistant_api.AssistantTool; + reader.readMessage(value,proto.assistant_api.AssistantTool.deserializeBinaryFromReader); + msg.setAssistanttool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.assistant_api.AssistantToolLog.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.assistant_api.AssistantToolLog.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.assistant_api.AssistantToolLog} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.assistant_api.AssistantToolLog.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getAction(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getResponse(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCreateddate(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUpdateddate(); + if (f != null) { + writer.writeMessage( + 7, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getAssistantid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 8, + f + ); + } + f = message.getProjectid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 9, + f + ); + } + f = message.getOrganizationid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 10, + f + ); + } + f = message.getAssistantconversationid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 11, + f + ); + } + f = message.getAssistantconversationmessageid(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getAssetprefix(); + if (f.length > 0) { + writer.writeString( + 14, + f + ); + } + f = message.getExecutionmethod(); + if (f.length > 0) { + writer.writeString( + 15, + f + ); + } + f = message.getTimetaken(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 16, + f + ); + } + f = message.getAssistanttoolid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 13, + f + ); + } + f = message.getAssistanttoolname(); + if (f.length > 0) { + writer.writeString( + 17, + f + ); + } + f = message.getAssistanttool(); + if (f != null) { + writer.writeMessage( + 18, + f, + proto.assistant_api.AssistantTool.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 id = 1; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setId = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct action = 2; + * @return {?proto.google.protobuf.Struct} + */ +proto.assistant_api.AssistantToolLog.prototype.getAction = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.assistant_api.AssistantToolLog} returns this +*/ +proto.assistant_api.AssistantToolLog.prototype.setAction = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.clearAction = function() { + return this.setAction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.AssistantToolLog.prototype.hasAction = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Struct request = 3; + * @return {?proto.google.protobuf.Struct} + */ +proto.assistant_api.AssistantToolLog.prototype.getRequest = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.assistant_api.AssistantToolLog} returns this +*/ +proto.assistant_api.AssistantToolLog.prototype.setRequest = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.clearRequest = function() { + return this.setRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.AssistantToolLog.prototype.hasRequest = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Struct response = 4; + * @return {?proto.google.protobuf.Struct} + */ +proto.assistant_api.AssistantToolLog.prototype.getResponse = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.assistant_api.AssistantToolLog} returns this +*/ +proto.assistant_api.AssistantToolLog.prototype.setResponse = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.clearResponse = function() { + return this.setResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.AssistantToolLog.prototype.hasResponse = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string status = 5; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setStatus = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional google.protobuf.Timestamp createdDate = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.assistant_api.AssistantToolLog.prototype.getCreateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.assistant_api.AssistantToolLog} returns this +*/ +proto.assistant_api.AssistantToolLog.prototype.setCreateddate = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.clearCreateddate = function() { + return this.setCreateddate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.AssistantToolLog.prototype.hasCreateddate = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional google.protobuf.Timestamp updatedDate = 7; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.assistant_api.AssistantToolLog.prototype.getUpdateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.assistant_api.AssistantToolLog} returns this +*/ +proto.assistant_api.AssistantToolLog.prototype.setUpdateddate = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.clearUpdateddate = function() { + return this.setUpdateddate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.AssistantToolLog.prototype.hasUpdateddate = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional uint64 assistantId = 8; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getAssistantid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setAssistantid = function(value) { + return jspb.Message.setProto3StringIntField(this, 8, value); +}; + + +/** + * optional uint64 projectId = 9; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getProjectid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setProjectid = function(value) { + return jspb.Message.setProto3StringIntField(this, 9, value); +}; + + +/** + * optional uint64 organizationId = 10; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getOrganizationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setOrganizationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 10, value); +}; + + +/** + * optional uint64 assistantConversationId = 11; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getAssistantconversationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setAssistantconversationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 11, value); +}; + + +/** + * optional string assistantConversationMessageId = 12; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getAssistantconversationmessageid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setAssistantconversationmessageid = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional string assetPrefix = 14; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getAssetprefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setAssetprefix = function(value) { + return jspb.Message.setProto3StringField(this, 14, value); +}; + + +/** + * optional string executionMethod = 15; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getExecutionmethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setExecutionmethod = function(value) { + return jspb.Message.setProto3StringField(this, 15, value); +}; + + +/** + * optional uint64 timeTaken = 16; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getTimetaken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setTimetaken = function(value) { + return jspb.Message.setProto3StringIntField(this, 16, value); +}; + + +/** + * optional uint64 assistantToolId = 13; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getAssistanttoolid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setAssistanttoolid = function(value) { + return jspb.Message.setProto3StringIntField(this, 13, value); +}; + + +/** + * optional string assistantToolName = 17; + * @return {string} + */ +proto.assistant_api.AssistantToolLog.prototype.getAssistanttoolname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * @param {string} value + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.setAssistanttoolname = function(value) { + return jspb.Message.setProto3StringField(this, 17, value); +}; + + +/** + * optional AssistantTool assistantTool = 18; + * @return {?proto.assistant_api.AssistantTool} + */ +proto.assistant_api.AssistantToolLog.prototype.getAssistanttool = function() { + return /** @type{?proto.assistant_api.AssistantTool} */ ( + jspb.Message.getWrapperField(this, proto.assistant_api.AssistantTool, 18)); +}; + + +/** + * @param {?proto.assistant_api.AssistantTool|undefined} value + * @return {!proto.assistant_api.AssistantToolLog} returns this +*/ +proto.assistant_api.AssistantToolLog.prototype.setAssistanttool = function(value) { + return jspb.Message.setWrapperField(this, 18, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.assistant_api.AssistantToolLog} returns this + */ +proto.assistant_api.AssistantToolLog.prototype.clearAssistanttool = function() { + return this.setAssistanttool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.assistant_api.AssistantToolLog.prototype.hasAssistanttool = function() { + return jspb.Message.getField(this, 18) != null; +}; + + goog.object.extend(exports, proto.assistant_api); diff --git a/src/clients/protos/assistant-webhook.ts b/src/clients/protos/assistant-webhook.ts new file mode 100644 index 0000000..bd1c024 --- /dev/null +++ b/src/clients/protos/assistant-webhook.ts @@ -0,0 +1,2816 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: assistant-webhook.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./common"; +import * as dependency_3 from "./google/protobuf/struct"; +import * as pb_1 from "google-protobuf"; +export namespace assistant_api { + export class AssistantWebhook extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantEvents?: string[]; + description?: string; + httpMethod?: string; + httpUrl?: string; + httpHeaders?: Map; + httpBody?: Map; + timeoutSecond?: number; + executionPriority?: number; + retryStatusCodes?: string[]; + retryCount?: number; + assistantId?: string; + status?: string; + createdBy?: string; + createdUser?: dependency_2.User; + updatedBy?: string; + updatedUser?: dependency_2.User; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 8], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantEvents" in data && data.assistantEvents != undefined) { + this.assistantEvents = data.assistantEvents; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("httpMethod" in data && data.httpMethod != undefined) { + this.httpMethod = data.httpMethod; + } + if ("httpUrl" in data && data.httpUrl != undefined) { + this.httpUrl = data.httpUrl; + } + if ("httpHeaders" in data && data.httpHeaders != undefined) { + this.httpHeaders = data.httpHeaders; + } + if ("httpBody" in data && data.httpBody != undefined) { + this.httpBody = data.httpBody; + } + if ("timeoutSecond" in data && data.timeoutSecond != undefined) { + this.timeoutSecond = data.timeoutSecond; + } + if ("executionPriority" in data && data.executionPriority != undefined) { + this.executionPriority = data.executionPriority; + } + if ("retryStatusCodes" in data && data.retryStatusCodes != undefined) { + this.retryStatusCodes = data.retryStatusCodes; + } + if ("retryCount" in data && data.retryCount != undefined) { + this.retryCount = data.retryCount; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("createdUser" in data && data.createdUser != undefined) { + this.createdUser = data.createdUser; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("updatedUser" in data && data.updatedUser != undefined) { + this.updatedUser = data.updatedUser; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + } + if (!this.httpHeaders) + this.httpHeaders = new Map(); + if (!this.httpBody) + this.httpBody = new Map(); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantEvents() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set assistantEvents(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get httpMethod() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set httpMethod(value: string) { + pb_1.Message.setField(this, 4, value); + } + get httpUrl() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set httpUrl(value: string) { + pb_1.Message.setField(this, 5, value); + } + get httpHeaders() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set httpHeaders(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + get httpBody() { + return pb_1.Message.getField(this, 7) as any as Map; + } + set httpBody(value: Map) { + pb_1.Message.setField(this, 7, value as any); + } + get timeoutSecond() { + return pb_1.Message.getFieldWithDefault(this, 19, 0) as number; + } + set timeoutSecond(value: number) { + pb_1.Message.setField(this, 19, value); + } + get executionPriority() { + return pb_1.Message.getFieldWithDefault(this, 20, 0) as number; + } + set executionPriority(value: number) { + pb_1.Message.setField(this, 20, value); + } + get retryStatusCodes() { + return pb_1.Message.getFieldWithDefault(this, 8, []) as string[]; + } + set retryStatusCodes(value: string[]) { + pb_1.Message.setField(this, 8, value); + } + get retryCount() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set retryCount(value: number) { + pb_1.Message.setField(this, 9, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 10, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 10, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 12, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 13, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 13, value); + } + get createdUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 14) as dependency_2.User; + } + set createdUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_createdUser() { + return pb_1.Message.getField(this, 14) != null; + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 15, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 15, value); + } + get updatedUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 16) as dependency_2.User; + } + set updatedUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 16, value); + } + get has_updatedUser() { + return pb_1.Message.getField(this, 16) != null; + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 17) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 17, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 17) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 18) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 18, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 18) != null; + } + static fromObject(data: { + id?: string; + assistantEvents?: string[]; + description?: string; + httpMethod?: string; + httpUrl?: string; + httpHeaders?: { + [key: string]: string; + }; + httpBody?: { + [key: string]: string; + }; + timeoutSecond?: number; + executionPriority?: number; + retryStatusCodes?: string[]; + retryCount?: number; + assistantId?: string; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + }): AssistantWebhook { + const message = new AssistantWebhook({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantEvents != null) { + message.assistantEvents = data.assistantEvents; + } + if (data.description != null) { + message.description = data.description; + } + if (data.httpMethod != null) { + message.httpMethod = data.httpMethod; + } + if (data.httpUrl != null) { + message.httpUrl = data.httpUrl; + } + if (typeof data.httpHeaders == "object") { + message.httpHeaders = new Map(Object.entries(data.httpHeaders)); + } + if (typeof data.httpBody == "object") { + message.httpBody = new Map(Object.entries(data.httpBody)); + } + if (data.timeoutSecond != null) { + message.timeoutSecond = data.timeoutSecond; + } + if (data.executionPriority != null) { + message.executionPriority = data.executionPriority; + } + if (data.retryStatusCodes != null) { + message.retryStatusCodes = data.retryStatusCodes; + } + if (data.retryCount != null) { + message.retryCount = data.retryCount; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.createdUser != null) { + message.createdUser = dependency_2.User.fromObject(data.createdUser); + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.updatedUser != null) { + message.updatedUser = dependency_2.User.fromObject(data.updatedUser); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + return message; + } + toObject() { + const data: { + id?: string; + assistantEvents?: string[]; + description?: string; + httpMethod?: string; + httpUrl?: string; + httpHeaders?: { + [key: string]: string; + }; + httpBody?: { + [key: string]: string; + }; + timeoutSecond?: number; + executionPriority?: number; + retryStatusCodes?: string[]; + retryCount?: number; + assistantId?: string; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantEvents != null) { + data.assistantEvents = this.assistantEvents; + } + if (this.description != null) { + data.description = this.description; + } + if (this.httpMethod != null) { + data.httpMethod = this.httpMethod; + } + if (this.httpUrl != null) { + data.httpUrl = this.httpUrl; + } + if (this.httpHeaders != null) { + data.httpHeaders = (Object.fromEntries)(this.httpHeaders); + } + if (this.httpBody != null) { + data.httpBody = (Object.fromEntries)(this.httpBody); + } + if (this.timeoutSecond != null) { + data.timeoutSecond = this.timeoutSecond; + } + if (this.executionPriority != null) { + data.executionPriority = this.executionPriority; + } + if (this.retryStatusCodes != null) { + data.retryStatusCodes = this.retryStatusCodes; + } + if (this.retryCount != null) { + data.retryCount = this.retryCount; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.createdUser != null) { + data.createdUser = this.createdUser.toObject(); + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.updatedUser != null) { + data.updatedUser = this.updatedUser.toObject(); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantEvents.length) + writer.writeRepeatedString(2, this.assistantEvents); + if (this.description.length) + writer.writeString(3, this.description); + if (this.httpMethod.length) + writer.writeString(4, this.httpMethod); + if (this.httpUrl.length) + writer.writeString(5, this.httpUrl); + for (const [key, value] of this.httpHeaders) { + writer.writeMessage(6, this.httpHeaders, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + for (const [key, value] of this.httpBody) { + writer.writeMessage(7, this.httpBody, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (this.timeoutSecond != 0) + writer.writeUint32(19, this.timeoutSecond); + if (this.executionPriority != 0) + writer.writeUint32(20, this.executionPriority); + if (this.retryStatusCodes.length) + writer.writeRepeatedString(8, this.retryStatusCodes); + if (this.retryCount != 0) + writer.writeUint32(9, this.retryCount); + if (this.assistantId != "0") + writer.writeUint64String(10, this.assistantId); + if (this.status.length) + writer.writeString(12, this.status); + if (this.createdBy != "0") + writer.writeUint64String(13, this.createdBy); + if (this.has_createdUser) + writer.writeMessage(14, this.createdUser, () => this.createdUser.serialize(writer)); + if (this.updatedBy != "0") + writer.writeUint64String(15, this.updatedBy); + if (this.has_updatedUser) + writer.writeMessage(16, this.updatedUser, () => this.updatedUser.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(17, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(18, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantWebhook { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantWebhook(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.httpMethod = reader.readString(); + break; + case 5: + message.httpUrl = reader.readString(); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.httpHeaders as any, reader, reader.readString, reader.readString)); + break; + case 7: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.httpBody as any, reader, reader.readString, reader.readString)); + break; + case 19: + message.timeoutSecond = reader.readUint32(); + break; + case 20: + message.executionPriority = reader.readUint32(); + break; + case 8: + pb_1.Message.addToRepeatedField(message, 8, reader.readString()); + break; + case 9: + message.retryCount = reader.readUint32(); + break; + case 10: + message.assistantId = reader.readUint64String(); + break; + case 12: + message.status = reader.readString(); + break; + case 13: + message.createdBy = reader.readUint64String(); + break; + case 14: + reader.readMessage(message.createdUser, () => message.createdUser = dependency_2.User.deserialize(reader)); + break; + case 15: + message.updatedBy = reader.readUint64String(); + break; + case 16: + reader.readMessage(message.updatedUser, () => message.updatedUser = dependency_2.User.deserialize(reader)); + break; + case 17: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 18: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantWebhook { + return AssistantWebhook.deserialize(bytes); + } + } + export class AssistantWebhookLog extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + webhookId?: string; + request?: dependency_3.google.protobuf.Struct; + response?: dependency_3.google.protobuf.Struct; + status?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + assistantId?: string; + projectId?: string; + organizationId?: string; + assistantConversationId?: string; + assetPrefix?: string; + event?: string; + responseStatus?: string; + timeTaken?: string; + retryCount?: number; + httpMethod?: string; + httpUrl?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("webhookId" in data && data.webhookId != undefined) { + this.webhookId = data.webhookId; + } + if ("request" in data && data.request != undefined) { + this.request = data.request; + } + if ("response" in data && data.response != undefined) { + this.response = data.response; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("assistantConversationId" in data && data.assistantConversationId != undefined) { + this.assistantConversationId = data.assistantConversationId; + } + if ("assetPrefix" in data && data.assetPrefix != undefined) { + this.assetPrefix = data.assetPrefix; + } + if ("event" in data && data.event != undefined) { + this.event = data.event; + } + if ("responseStatus" in data && data.responseStatus != undefined) { + this.responseStatus = data.responseStatus; + } + if ("timeTaken" in data && data.timeTaken != undefined) { + this.timeTaken = data.timeTaken; + } + if ("retryCount" in data && data.retryCount != undefined) { + this.retryCount = data.retryCount; + } + if ("httpMethod" in data && data.httpMethod != undefined) { + this.httpMethod = data.httpMethod; + } + if ("httpUrl" in data && data.httpUrl != undefined) { + this.httpUrl = data.httpUrl; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get webhookId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set webhookId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get request() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 3) as dependency_3.google.protobuf.Struct; + } + set request(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_request() { + return pb_1.Message.getField(this, 3) != null; + } + get response() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 4) as dependency_3.google.protobuf.Struct; + } + set response(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_response() { + return pb_1.Message.getField(this, 4) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 5, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 6) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 6) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 7) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 7) != null; + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 8, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 9, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 9, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 10, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 10, value); + } + get assistantConversationId() { + return pb_1.Message.getFieldWithDefault(this, 11, "0") as string; + } + set assistantConversationId(value: string) { + pb_1.Message.setField(this, 11, value); + } + get assetPrefix() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set assetPrefix(value: string) { + pb_1.Message.setField(this, 12, value); + } + get event() { + return pb_1.Message.getFieldWithDefault(this, 13, "") as string; + } + set event(value: string) { + pb_1.Message.setField(this, 13, value); + } + get responseStatus() { + return pb_1.Message.getFieldWithDefault(this, 14, "0") as string; + } + set responseStatus(value: string) { + pb_1.Message.setField(this, 14, value); + } + get timeTaken() { + return pb_1.Message.getFieldWithDefault(this, 15, "0") as string; + } + set timeTaken(value: string) { + pb_1.Message.setField(this, 15, value); + } + get retryCount() { + return pb_1.Message.getFieldWithDefault(this, 16, 0) as number; + } + set retryCount(value: number) { + pb_1.Message.setField(this, 16, value); + } + get httpMethod() { + return pb_1.Message.getFieldWithDefault(this, 17, "") as string; + } + set httpMethod(value: string) { + pb_1.Message.setField(this, 17, value); + } + get httpUrl() { + return pb_1.Message.getFieldWithDefault(this, 18, "") as string; + } + set httpUrl(value: string) { + pb_1.Message.setField(this, 18, value); + } + static fromObject(data: { + id?: string; + webhookId?: string; + request?: ReturnType; + response?: ReturnType; + status?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + assistantId?: string; + projectId?: string; + organizationId?: string; + assistantConversationId?: string; + assetPrefix?: string; + event?: string; + responseStatus?: string; + timeTaken?: string; + retryCount?: number; + httpMethod?: string; + httpUrl?: string; + }): AssistantWebhookLog { + const message = new AssistantWebhookLog({}); + if (data.id != null) { + message.id = data.id; + } + if (data.webhookId != null) { + message.webhookId = data.webhookId; + } + if (data.request != null) { + message.request = dependency_3.google.protobuf.Struct.fromObject(data.request); + } + if (data.response != null) { + message.response = dependency_3.google.protobuf.Struct.fromObject(data.response); + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.assistantConversationId != null) { + message.assistantConversationId = data.assistantConversationId; + } + if (data.assetPrefix != null) { + message.assetPrefix = data.assetPrefix; + } + if (data.event != null) { + message.event = data.event; + } + if (data.responseStatus != null) { + message.responseStatus = data.responseStatus; + } + if (data.timeTaken != null) { + message.timeTaken = data.timeTaken; + } + if (data.retryCount != null) { + message.retryCount = data.retryCount; + } + if (data.httpMethod != null) { + message.httpMethod = data.httpMethod; + } + if (data.httpUrl != null) { + message.httpUrl = data.httpUrl; + } + return message; + } + toObject() { + const data: { + id?: string; + webhookId?: string; + request?: ReturnType; + response?: ReturnType; + status?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + assistantId?: string; + projectId?: string; + organizationId?: string; + assistantConversationId?: string; + assetPrefix?: string; + event?: string; + responseStatus?: string; + timeTaken?: string; + retryCount?: number; + httpMethod?: string; + httpUrl?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.webhookId != null) { + data.webhookId = this.webhookId; + } + if (this.request != null) { + data.request = this.request.toObject(); + } + if (this.response != null) { + data.response = this.response.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.assistantConversationId != null) { + data.assistantConversationId = this.assistantConversationId; + } + if (this.assetPrefix != null) { + data.assetPrefix = this.assetPrefix; + } + if (this.event != null) { + data.event = this.event; + } + if (this.responseStatus != null) { + data.responseStatus = this.responseStatus; + } + if (this.timeTaken != null) { + data.timeTaken = this.timeTaken; + } + if (this.retryCount != null) { + data.retryCount = this.retryCount; + } + if (this.httpMethod != null) { + data.httpMethod = this.httpMethod; + } + if (this.httpUrl != null) { + data.httpUrl = this.httpUrl; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.webhookId != "0") + writer.writeUint64String(2, this.webhookId); + if (this.has_request) + writer.writeMessage(3, this.request, () => this.request.serialize(writer)); + if (this.has_response) + writer.writeMessage(4, this.response, () => this.response.serialize(writer)); + if (this.status.length) + writer.writeString(5, this.status); + if (this.has_createdDate) + writer.writeMessage(6, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(7, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.assistantId != "0") + writer.writeUint64String(8, this.assistantId); + if (this.projectId != "0") + writer.writeUint64String(9, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(10, this.organizationId); + if (this.assistantConversationId != "0") + writer.writeUint64String(11, this.assistantConversationId); + if (this.assetPrefix.length) + writer.writeString(12, this.assetPrefix); + if (this.event.length) + writer.writeString(13, this.event); + if (this.responseStatus != "0") + writer.writeUint64String(14, this.responseStatus); + if (this.timeTaken != "0") + writer.writeUint64String(15, this.timeTaken); + if (this.retryCount != 0) + writer.writeUint32(16, this.retryCount); + if (this.httpMethod.length) + writer.writeString(17, this.httpMethod); + if (this.httpUrl.length) + writer.writeString(18, this.httpUrl); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantWebhookLog { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantWebhookLog(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.webhookId = reader.readUint64String(); + break; + case 3: + reader.readMessage(message.request, () => message.request = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 4: + reader.readMessage(message.response, () => message.response = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 5: + message.status = reader.readString(); + break; + case 6: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 7: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 8: + message.assistantId = reader.readUint64String(); + break; + case 9: + message.projectId = reader.readUint64String(); + break; + case 10: + message.organizationId = reader.readUint64String(); + break; + case 11: + message.assistantConversationId = reader.readUint64String(); + break; + case 12: + message.assetPrefix = reader.readString(); + break; + case 13: + message.event = reader.readString(); + break; + case 14: + message.responseStatus = reader.readUint64String(); + break; + case 15: + message.timeTaken = reader.readUint64String(); + break; + case 16: + message.retryCount = reader.readUint32(); + break; + case 17: + message.httpMethod = reader.readString(); + break; + case 18: + message.httpUrl = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantWebhookLog { + return AssistantWebhookLog.deserialize(bytes); + } + } + export class CreateAssistantWebhookRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantEvents?: string[]; + description?: string; + httpMethod?: string; + httpUrl?: string; + httpHeaders?: Map; + httpBody?: Map; + timeoutSecond?: number; + retryStatusCodes?: string[]; + maxRetryCount?: number; + assistantId?: string; + executionPriority?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 8], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantEvents" in data && data.assistantEvents != undefined) { + this.assistantEvents = data.assistantEvents; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("httpMethod" in data && data.httpMethod != undefined) { + this.httpMethod = data.httpMethod; + } + if ("httpUrl" in data && data.httpUrl != undefined) { + this.httpUrl = data.httpUrl; + } + if ("httpHeaders" in data && data.httpHeaders != undefined) { + this.httpHeaders = data.httpHeaders; + } + if ("httpBody" in data && data.httpBody != undefined) { + this.httpBody = data.httpBody; + } + if ("timeoutSecond" in data && data.timeoutSecond != undefined) { + this.timeoutSecond = data.timeoutSecond; + } + if ("retryStatusCodes" in data && data.retryStatusCodes != undefined) { + this.retryStatusCodes = data.retryStatusCodes; + } + if ("maxRetryCount" in data && data.maxRetryCount != undefined) { + this.maxRetryCount = data.maxRetryCount; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("executionPriority" in data && data.executionPriority != undefined) { + this.executionPriority = data.executionPriority; + } + } + if (!this.httpHeaders) + this.httpHeaders = new Map(); + if (!this.httpBody) + this.httpBody = new Map(); + } + get assistantEvents() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set assistantEvents(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get httpMethod() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set httpMethod(value: string) { + pb_1.Message.setField(this, 4, value); + } + get httpUrl() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set httpUrl(value: string) { + pb_1.Message.setField(this, 5, value); + } + get httpHeaders() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set httpHeaders(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + get httpBody() { + return pb_1.Message.getField(this, 11) as any as Map; + } + set httpBody(value: Map) { + pb_1.Message.setField(this, 11, value as any); + } + get timeoutSecond() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set timeoutSecond(value: number) { + pb_1.Message.setField(this, 7, value); + } + get retryStatusCodes() { + return pb_1.Message.getFieldWithDefault(this, 8, []) as string[]; + } + set retryStatusCodes(value: string[]) { + pb_1.Message.setField(this, 8, value); + } + get maxRetryCount() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set maxRetryCount(value: number) { + pb_1.Message.setField(this, 9, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 10, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 10, value); + } + get executionPriority() { + return pb_1.Message.getFieldWithDefault(this, 20, 0) as number; + } + set executionPriority(value: number) { + pb_1.Message.setField(this, 20, value); + } + static fromObject(data: { + assistantEvents?: string[]; + description?: string; + httpMethod?: string; + httpUrl?: string; + httpHeaders?: { + [key: string]: string; + }; + httpBody?: { + [key: string]: string; + }; + timeoutSecond?: number; + retryStatusCodes?: string[]; + maxRetryCount?: number; + assistantId?: string; + executionPriority?: number; + }): CreateAssistantWebhookRequest { + const message = new CreateAssistantWebhookRequest({}); + if (data.assistantEvents != null) { + message.assistantEvents = data.assistantEvents; + } + if (data.description != null) { + message.description = data.description; + } + if (data.httpMethod != null) { + message.httpMethod = data.httpMethod; + } + if (data.httpUrl != null) { + message.httpUrl = data.httpUrl; + } + if (typeof data.httpHeaders == "object") { + message.httpHeaders = new Map(Object.entries(data.httpHeaders)); + } + if (typeof data.httpBody == "object") { + message.httpBody = new Map(Object.entries(data.httpBody)); + } + if (data.timeoutSecond != null) { + message.timeoutSecond = data.timeoutSecond; + } + if (data.retryStatusCodes != null) { + message.retryStatusCodes = data.retryStatusCodes; + } + if (data.maxRetryCount != null) { + message.maxRetryCount = data.maxRetryCount; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.executionPriority != null) { + message.executionPriority = data.executionPriority; + } + return message; + } + toObject() { + const data: { + assistantEvents?: string[]; + description?: string; + httpMethod?: string; + httpUrl?: string; + httpHeaders?: { + [key: string]: string; + }; + httpBody?: { + [key: string]: string; + }; + timeoutSecond?: number; + retryStatusCodes?: string[]; + maxRetryCount?: number; + assistantId?: string; + executionPriority?: number; + } = {}; + if (this.assistantEvents != null) { + data.assistantEvents = this.assistantEvents; + } + if (this.description != null) { + data.description = this.description; + } + if (this.httpMethod != null) { + data.httpMethod = this.httpMethod; + } + if (this.httpUrl != null) { + data.httpUrl = this.httpUrl; + } + if (this.httpHeaders != null) { + data.httpHeaders = (Object.fromEntries)(this.httpHeaders); + } + if (this.httpBody != null) { + data.httpBody = (Object.fromEntries)(this.httpBody); + } + if (this.timeoutSecond != null) { + data.timeoutSecond = this.timeoutSecond; + } + if (this.retryStatusCodes != null) { + data.retryStatusCodes = this.retryStatusCodes; + } + if (this.maxRetryCount != null) { + data.maxRetryCount = this.maxRetryCount; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.executionPriority != null) { + data.executionPriority = this.executionPriority; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantEvents.length) + writer.writeRepeatedString(2, this.assistantEvents); + if (this.description.length) + writer.writeString(3, this.description); + if (this.httpMethod.length) + writer.writeString(4, this.httpMethod); + if (this.httpUrl.length) + writer.writeString(5, this.httpUrl); + for (const [key, value] of this.httpHeaders) { + writer.writeMessage(6, this.httpHeaders, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + for (const [key, value] of this.httpBody) { + writer.writeMessage(11, this.httpBody, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (this.timeoutSecond != 0) + writer.writeUint32(7, this.timeoutSecond); + if (this.retryStatusCodes.length) + writer.writeRepeatedString(8, this.retryStatusCodes); + if (this.maxRetryCount != 0) + writer.writeUint32(9, this.maxRetryCount); + if (this.assistantId != "0") + writer.writeUint64String(10, this.assistantId); + if (this.executionPriority != 0) + writer.writeUint32(20, this.executionPriority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateAssistantWebhookRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateAssistantWebhookRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.httpMethod = reader.readString(); + break; + case 5: + message.httpUrl = reader.readString(); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.httpHeaders as any, reader, reader.readString, reader.readString)); + break; + case 11: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.httpBody as any, reader, reader.readString, reader.readString)); + break; + case 7: + message.timeoutSecond = reader.readUint32(); + break; + case 8: + pb_1.Message.addToRepeatedField(message, 8, reader.readString()); + break; + case 9: + message.maxRetryCount = reader.readUint32(); + break; + case 10: + message.assistantId = reader.readUint64String(); + break; + case 20: + message.executionPriority = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateAssistantWebhookRequest { + return CreateAssistantWebhookRequest.deserialize(bytes); + } + } + export class UpdateAssistantWebhookRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantEvents?: string[]; + description?: string; + httpMethod?: string; + httpUrl?: string; + httpHeaders?: Map; + httpBody?: Map; + timeoutSecond?: number; + retryStatusCodes?: string[]; + maxRetryCount?: number; + assistantId?: string; + executionPriority?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 8], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantEvents" in data && data.assistantEvents != undefined) { + this.assistantEvents = data.assistantEvents; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("httpMethod" in data && data.httpMethod != undefined) { + this.httpMethod = data.httpMethod; + } + if ("httpUrl" in data && data.httpUrl != undefined) { + this.httpUrl = data.httpUrl; + } + if ("httpHeaders" in data && data.httpHeaders != undefined) { + this.httpHeaders = data.httpHeaders; + } + if ("httpBody" in data && data.httpBody != undefined) { + this.httpBody = data.httpBody; + } + if ("timeoutSecond" in data && data.timeoutSecond != undefined) { + this.timeoutSecond = data.timeoutSecond; + } + if ("retryStatusCodes" in data && data.retryStatusCodes != undefined) { + this.retryStatusCodes = data.retryStatusCodes; + } + if ("maxRetryCount" in data && data.maxRetryCount != undefined) { + this.maxRetryCount = data.maxRetryCount; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("executionPriority" in data && data.executionPriority != undefined) { + this.executionPriority = data.executionPriority; + } + } + if (!this.httpHeaders) + this.httpHeaders = new Map(); + if (!this.httpBody) + this.httpBody = new Map(); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantEvents() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set assistantEvents(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get httpMethod() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set httpMethod(value: string) { + pb_1.Message.setField(this, 4, value); + } + get httpUrl() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set httpUrl(value: string) { + pb_1.Message.setField(this, 5, value); + } + get httpHeaders() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set httpHeaders(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + get httpBody() { + return pb_1.Message.getField(this, 11) as any as Map; + } + set httpBody(value: Map) { + pb_1.Message.setField(this, 11, value as any); + } + get timeoutSecond() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set timeoutSecond(value: number) { + pb_1.Message.setField(this, 7, value); + } + get retryStatusCodes() { + return pb_1.Message.getFieldWithDefault(this, 8, []) as string[]; + } + set retryStatusCodes(value: string[]) { + pb_1.Message.setField(this, 8, value); + } + get maxRetryCount() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set maxRetryCount(value: number) { + pb_1.Message.setField(this, 9, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 10, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 10, value); + } + get executionPriority() { + return pb_1.Message.getFieldWithDefault(this, 20, 0) as number; + } + set executionPriority(value: number) { + pb_1.Message.setField(this, 20, value); + } + static fromObject(data: { + id?: string; + assistantEvents?: string[]; + description?: string; + httpMethod?: string; + httpUrl?: string; + httpHeaders?: { + [key: string]: string; + }; + httpBody?: { + [key: string]: string; + }; + timeoutSecond?: number; + retryStatusCodes?: string[]; + maxRetryCount?: number; + assistantId?: string; + executionPriority?: number; + }): UpdateAssistantWebhookRequest { + const message = new UpdateAssistantWebhookRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantEvents != null) { + message.assistantEvents = data.assistantEvents; + } + if (data.description != null) { + message.description = data.description; + } + if (data.httpMethod != null) { + message.httpMethod = data.httpMethod; + } + if (data.httpUrl != null) { + message.httpUrl = data.httpUrl; + } + if (typeof data.httpHeaders == "object") { + message.httpHeaders = new Map(Object.entries(data.httpHeaders)); + } + if (typeof data.httpBody == "object") { + message.httpBody = new Map(Object.entries(data.httpBody)); + } + if (data.timeoutSecond != null) { + message.timeoutSecond = data.timeoutSecond; + } + if (data.retryStatusCodes != null) { + message.retryStatusCodes = data.retryStatusCodes; + } + if (data.maxRetryCount != null) { + message.maxRetryCount = data.maxRetryCount; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.executionPriority != null) { + message.executionPriority = data.executionPriority; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantEvents?: string[]; + description?: string; + httpMethod?: string; + httpUrl?: string; + httpHeaders?: { + [key: string]: string; + }; + httpBody?: { + [key: string]: string; + }; + timeoutSecond?: number; + retryStatusCodes?: string[]; + maxRetryCount?: number; + assistantId?: string; + executionPriority?: number; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantEvents != null) { + data.assistantEvents = this.assistantEvents; + } + if (this.description != null) { + data.description = this.description; + } + if (this.httpMethod != null) { + data.httpMethod = this.httpMethod; + } + if (this.httpUrl != null) { + data.httpUrl = this.httpUrl; + } + if (this.httpHeaders != null) { + data.httpHeaders = (Object.fromEntries)(this.httpHeaders); + } + if (this.httpBody != null) { + data.httpBody = (Object.fromEntries)(this.httpBody); + } + if (this.timeoutSecond != null) { + data.timeoutSecond = this.timeoutSecond; + } + if (this.retryStatusCodes != null) { + data.retryStatusCodes = this.retryStatusCodes; + } + if (this.maxRetryCount != null) { + data.maxRetryCount = this.maxRetryCount; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.executionPriority != null) { + data.executionPriority = this.executionPriority; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantEvents.length) + writer.writeRepeatedString(2, this.assistantEvents); + if (this.description.length) + writer.writeString(3, this.description); + if (this.httpMethod.length) + writer.writeString(4, this.httpMethod); + if (this.httpUrl.length) + writer.writeString(5, this.httpUrl); + for (const [key, value] of this.httpHeaders) { + writer.writeMessage(6, this.httpHeaders, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + for (const [key, value] of this.httpBody) { + writer.writeMessage(11, this.httpBody, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (this.timeoutSecond != 0) + writer.writeUint32(7, this.timeoutSecond); + if (this.retryStatusCodes.length) + writer.writeRepeatedString(8, this.retryStatusCodes); + if (this.maxRetryCount != 0) + writer.writeUint32(9, this.maxRetryCount); + if (this.assistantId != "0") + writer.writeUint64String(10, this.assistantId); + if (this.executionPriority != 0) + writer.writeUint32(20, this.executionPriority); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateAssistantWebhookRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateAssistantWebhookRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.httpMethod = reader.readString(); + break; + case 5: + message.httpUrl = reader.readString(); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.httpHeaders as any, reader, reader.readString, reader.readString)); + break; + case 11: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.httpBody as any, reader, reader.readString, reader.readString)); + break; + case 7: + message.timeoutSecond = reader.readUint32(); + break; + case 8: + pb_1.Message.addToRepeatedField(message, 8, reader.readString()); + break; + case 9: + message.maxRetryCount = reader.readUint32(); + break; + case 10: + message.assistantId = reader.readUint64String(); + break; + case 20: + message.executionPriority = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateAssistantWebhookRequest { + return UpdateAssistantWebhookRequest.deserialize(bytes); + } + } + export class GetAssistantWebhookRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: string; + assistantId?: string; + }): GetAssistantWebhookRequest { + const message = new GetAssistantWebhookRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantWebhookRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantWebhookRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantWebhookRequest { + return GetAssistantWebhookRequest.deserialize(bytes); + } + } + export class DeleteAssistantWebhookRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + assistantId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: string; + assistantId?: string; + }): DeleteAssistantWebhookRequest { + const message = new DeleteAssistantWebhookRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + return message; + } + toObject() { + const data: { + id?: string; + assistantId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.assistantId != "0") + writer.writeUint64String(2, this.assistantId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeleteAssistantWebhookRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteAssistantWebhookRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.assistantId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DeleteAssistantWebhookRequest { + return DeleteAssistantWebhookRequest.deserialize(bytes); + } + } + export class GetAssistantWebhookResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantWebhook; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantWebhook, 3) as AssistantWebhook; + } + set data(value: AssistantWebhook) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantWebhookResponse { + const message = new GetAssistantWebhookResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantWebhook.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantWebhookResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantWebhookResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantWebhook.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantWebhookResponse { + return GetAssistantWebhookResponse.deserialize(bytes); + } + } + export class GetAllAssistantWebhookRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + webhookId?: string; + assistantId?: string; + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("webhookId" in data && data.webhookId != undefined) { + this.webhookId = data.webhookId; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get webhookId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set webhookId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 4, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 2) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 2) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 3) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + webhookId?: string; + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllAssistantWebhookRequest { + const message = new GetAllAssistantWebhookRequest({}); + if (data.webhookId != null) { + message.webhookId = data.webhookId; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + webhookId?: string; + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.webhookId != null) { + data.webhookId = this.webhookId; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.webhookId != "0") + writer.writeUint64String(1, this.webhookId); + if (this.assistantId != "0") + writer.writeUint64String(4, this.assistantId); + if (this.has_paginate) + writer.writeMessage(2, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(3, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantWebhookRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantWebhookRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.webhookId = reader.readUint64String(); + break; + case 4: + message.assistantId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 3: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantWebhookRequest { + return GetAllAssistantWebhookRequest.deserialize(bytes); + } + } + export class GetAllAssistantWebhookResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantWebhook[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantWebhook, 3) as AssistantWebhook[]; + } + set data(value: AssistantWebhook[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantWebhookResponse { + const message = new GetAllAssistantWebhookResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => AssistantWebhook.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: AssistantWebhook) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: AssistantWebhook) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantWebhookResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantWebhookResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AssistantWebhook.deserialize(reader), AssistantWebhook)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantWebhookResponse { + return GetAllAssistantWebhookResponse.deserialize(bytes); + } + } + export class GetAllAssistantWebhookLogRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + projectId?: string; + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + order?: dependency_2.Ordering; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("order" in data && data.order != undefined) { + this.order = data.order; + } + } + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 3) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 3) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 4) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get order() { + return pb_1.Message.getWrapperField(this, dependency_2.Ordering, 5) as dependency_2.Ordering; + } + set order(value: dependency_2.Ordering) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_order() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + projectId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + order?: ReturnType; + }): GetAllAssistantWebhookLogRequest { + const message = new GetAllAssistantWebhookLogRequest({}); + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.order != null) { + message.order = dependency_2.Ordering.fromObject(data.order); + } + return message; + } + toObject() { + const data: { + projectId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + order?: ReturnType; + } = {}; + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.order != null) { + data.order = this.order.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.projectId != "0") + writer.writeUint64String(2, this.projectId); + if (this.has_paginate) + writer.writeMessage(3, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(4, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.has_order) + writer.writeMessage(5, this.order, () => this.order.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantWebhookLogRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantWebhookLogRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.projectId = reader.readUint64String(); + break; + case 3: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 4: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 5: + reader.readMessage(message.order, () => message.order = dependency_2.Ordering.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantWebhookLogRequest { + return GetAllAssistantWebhookLogRequest.deserialize(bytes); + } + } + export class GetAssistantWebhookLogRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + projectId?: string; + id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + projectId?: string; + id?: string; + }): GetAssistantWebhookLogRequest { + const message = new GetAssistantWebhookLogRequest({}); + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + projectId?: string; + id?: string; + } = {}; + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.id != null) { + data.id = this.id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.projectId != "0") + writer.writeUint64String(2, this.projectId); + if (this.id != "0") + writer.writeUint64String(3, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantWebhookLogRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantWebhookLogRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.projectId = reader.readUint64String(); + break; + case 3: + message.id = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantWebhookLogRequest { + return GetAssistantWebhookLogRequest.deserialize(bytes); + } + } + export class GetAssistantWebhookLogResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantWebhookLog; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AssistantWebhookLog, 3) as AssistantWebhookLog; + } + set data(value: AssistantWebhookLog) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAssistantWebhookLogResponse { + const message = new GetAssistantWebhookLogResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AssistantWebhookLog.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAssistantWebhookLogResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAssistantWebhookLogResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AssistantWebhookLog.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAssistantWebhookLogResponse { + return GetAssistantWebhookLogResponse.deserialize(bytes); + } + } + export class GetAllAssistantWebhookLogResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantWebhookLog[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantWebhookLog, 3) as AssistantWebhookLog[]; + } + set data(value: AssistantWebhookLog[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantWebhookLogResponse { + const message = new GetAllAssistantWebhookLogResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => AssistantWebhookLog.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: AssistantWebhookLog) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: AssistantWebhookLog) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantWebhookLogResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantWebhookLogResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AssistantWebhookLog.deserialize(reader), AssistantWebhookLog)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantWebhookLogResponse { + return GetAllAssistantWebhookLogResponse.deserialize(bytes); + } + } +} diff --git a/src/clients/protos/assistant-webhook_grpc_pb.d.ts b/src/clients/protos/assistant-webhook_grpc_pb.d.ts deleted file mode 100644 index 51b4d69..0000000 --- a/src/clients/protos/assistant-webhook_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/src/clients/protos/assistant-webhook_pb.d.ts b/src/clients/protos/assistant-webhook_pb.d.ts deleted file mode 100644 index 744b5b4..0000000 --- a/src/clients/protos/assistant-webhook_pb.d.ts +++ /dev/null @@ -1,636 +0,0 @@ -// package: assistant_api -// file: assistant-webhook.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as common_pb from "./common_pb"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; - -export class AssistantWebhook extends jspb.Message { - getId(): string; - setId(value: string): void; - - clearAssistanteventsList(): void; - getAssistanteventsList(): Array; - setAssistanteventsList(value: Array): void; - addAssistantevents(value: string, index?: number): string; - - getDescription(): string; - setDescription(value: string): void; - - getHttpmethod(): string; - setHttpmethod(value: string): void; - - getHttpurl(): string; - setHttpurl(value: string): void; - - getHttpheadersMap(): jspb.Map; - clearHttpheadersMap(): void; - getHttpbodyMap(): jspb.Map; - clearHttpbodyMap(): void; - getTimeoutsecond(): number; - setTimeoutsecond(value: number): void; - - getExecutionpriority(): number; - setExecutionpriority(value: number): void; - - clearRetrystatuscodesList(): void; - getRetrystatuscodesList(): Array; - setRetrystatuscodesList(value: Array): void; - addRetrystatuscodes(value: string, index?: number): string; - - getRetrycount(): number; - setRetrycount(value: number): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - hasCreateduser(): boolean; - clearCreateduser(): void; - getCreateduser(): common_pb.User | undefined; - setCreateduser(value?: common_pb.User): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - hasUpdateduser(): boolean; - clearUpdateduser(): void; - getUpdateduser(): common_pb.User | undefined; - setUpdateduser(value?: common_pb.User): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantWebhook.AsObject; - static toObject(includeInstance: boolean, msg: AssistantWebhook): AssistantWebhook.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantWebhook, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantWebhook; - static deserializeBinaryFromReader(message: AssistantWebhook, reader: jspb.BinaryReader): AssistantWebhook; -} - -export namespace AssistantWebhook { - export type AsObject = { - id: string, - assistanteventsList: Array, - description: string, - httpmethod: string, - httpurl: string, - httpheadersMap: Array<[string, string]>, - httpbodyMap: Array<[string, string]>, - timeoutsecond: number, - executionpriority: number, - retrystatuscodesList: Array, - retrycount: number, - assistantid: string, - status: string, - createdby: string, - createduser?: common_pb.User.AsObject, - updatedby: string, - updateduser?: common_pb.User.AsObject, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class AssistantWebhookLog extends jspb.Message { - getId(): string; - setId(value: string): void; - - getWebhookid(): string; - setWebhookid(value: string): void; - - hasRequest(): boolean; - clearRequest(): void; - getRequest(): google_protobuf_struct_pb.Struct | undefined; - setRequest(value?: google_protobuf_struct_pb.Struct): void; - - hasResponse(): boolean; - clearResponse(): void; - getResponse(): google_protobuf_struct_pb.Struct | undefined; - setResponse(value?: google_protobuf_struct_pb.Struct): void; - - getStatus(): string; - setStatus(value: string): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getProjectid(): string; - setProjectid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - getConversationid(): string; - setConversationid(value: string): void; - - getAssetprefix(): string; - setAssetprefix(value: string): void; - - getEvent(): string; - setEvent(value: string): void; - - getResponsestatus(): string; - setResponsestatus(value: string): void; - - getTimetaken(): string; - setTimetaken(value: string): void; - - getRetrycount(): number; - setRetrycount(value: number): void; - - getHttpmethod(): string; - setHttpmethod(value: string): void; - - getHttpurl(): string; - setHttpurl(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantWebhookLog.AsObject; - static toObject(includeInstance: boolean, msg: AssistantWebhookLog): AssistantWebhookLog.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantWebhookLog, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantWebhookLog; - static deserializeBinaryFromReader(message: AssistantWebhookLog, reader: jspb.BinaryReader): AssistantWebhookLog; -} - -export namespace AssistantWebhookLog { - export type AsObject = { - id: string, - webhookid: string, - request?: google_protobuf_struct_pb.Struct.AsObject, - response?: google_protobuf_struct_pb.Struct.AsObject, - status: string, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - assistantid: string, - projectid: string, - organizationid: string, - conversationid: string, - assetprefix: string, - event: string, - responsestatus: string, - timetaken: string, - retrycount: number, - httpmethod: string, - httpurl: string, - } -} - -export class CreateAssistantWebhookRequest extends jspb.Message { - clearAssistanteventsList(): void; - getAssistanteventsList(): Array; - setAssistanteventsList(value: Array): void; - addAssistantevents(value: string, index?: number): string; - - getDescription(): string; - setDescription(value: string): void; - - getHttpmethod(): string; - setHttpmethod(value: string): void; - - getHttpurl(): string; - setHttpurl(value: string): void; - - getHttpheadersMap(): jspb.Map; - clearHttpheadersMap(): void; - getHttpbodyMap(): jspb.Map; - clearHttpbodyMap(): void; - getTimeoutsecond(): number; - setTimeoutsecond(value: number): void; - - clearRetrystatuscodesList(): void; - getRetrystatuscodesList(): Array; - setRetrystatuscodesList(value: Array): void; - addRetrystatuscodes(value: string, index?: number): string; - - getMaxretrycount(): number; - setMaxretrycount(value: number): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getExecutionpriority(): number; - setExecutionpriority(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateAssistantWebhookRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateAssistantWebhookRequest): CreateAssistantWebhookRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateAssistantWebhookRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateAssistantWebhookRequest; - static deserializeBinaryFromReader(message: CreateAssistantWebhookRequest, reader: jspb.BinaryReader): CreateAssistantWebhookRequest; -} - -export namespace CreateAssistantWebhookRequest { - export type AsObject = { - assistanteventsList: Array, - description: string, - httpmethod: string, - httpurl: string, - httpheadersMap: Array<[string, string]>, - httpbodyMap: Array<[string, string]>, - timeoutsecond: number, - retrystatuscodesList: Array, - maxretrycount: number, - assistantid: string, - executionpriority: number, - } -} - -export class UpdateAssistantWebhookRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - clearAssistanteventsList(): void; - getAssistanteventsList(): Array; - setAssistanteventsList(value: Array): void; - addAssistantevents(value: string, index?: number): string; - - getDescription(): string; - setDescription(value: string): void; - - getHttpmethod(): string; - setHttpmethod(value: string): void; - - getHttpurl(): string; - setHttpurl(value: string): void; - - getHttpheadersMap(): jspb.Map; - clearHttpheadersMap(): void; - getHttpbodyMap(): jspb.Map; - clearHttpbodyMap(): void; - getTimeoutsecond(): number; - setTimeoutsecond(value: number): void; - - clearRetrystatuscodesList(): void; - getRetrystatuscodesList(): Array; - setRetrystatuscodesList(value: Array): void; - addRetrystatuscodes(value: string, index?: number): string; - - getMaxretrycount(): number; - setMaxretrycount(value: number): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getExecutionpriority(): number; - setExecutionpriority(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateAssistantWebhookRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateAssistantWebhookRequest): UpdateAssistantWebhookRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateAssistantWebhookRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateAssistantWebhookRequest; - static deserializeBinaryFromReader(message: UpdateAssistantWebhookRequest, reader: jspb.BinaryReader): UpdateAssistantWebhookRequest; -} - -export namespace UpdateAssistantWebhookRequest { - export type AsObject = { - id: string, - assistanteventsList: Array, - description: string, - httpmethod: string, - httpurl: string, - httpheadersMap: Array<[string, string]>, - httpbodyMap: Array<[string, string]>, - timeoutsecond: number, - retrystatuscodesList: Array, - maxretrycount: number, - assistantid: string, - executionpriority: number, - } -} - -export class GetAssistantWebhookRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantWebhookRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantWebhookRequest): GetAssistantWebhookRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantWebhookRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantWebhookRequest; - static deserializeBinaryFromReader(message: GetAssistantWebhookRequest, reader: jspb.BinaryReader): GetAssistantWebhookRequest; -} - -export namespace GetAssistantWebhookRequest { - export type AsObject = { - id: string, - assistantid: string, - } -} - -export class DeleteAssistantWebhookRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteAssistantWebhookRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeleteAssistantWebhookRequest): DeleteAssistantWebhookRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteAssistantWebhookRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteAssistantWebhookRequest; - static deserializeBinaryFromReader(message: DeleteAssistantWebhookRequest, reader: jspb.BinaryReader): DeleteAssistantWebhookRequest; -} - -export namespace DeleteAssistantWebhookRequest { - export type AsObject = { - id: string, - assistantid: string, - } -} - -export class GetAssistantWebhookResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantWebhook | undefined; - setData(value?: AssistantWebhook): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantWebhookResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantWebhookResponse): GetAssistantWebhookResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantWebhookResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantWebhookResponse; - static deserializeBinaryFromReader(message: GetAssistantWebhookResponse, reader: jspb.BinaryReader): GetAssistantWebhookResponse; -} - -export namespace GetAssistantWebhookResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantWebhook.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAllAssistantWebhookRequest extends jspb.Message { - getWebhookid(): string; - setWebhookid(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantWebhookRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantWebhookRequest): GetAllAssistantWebhookRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantWebhookRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantWebhookRequest; - static deserializeBinaryFromReader(message: GetAllAssistantWebhookRequest, reader: jspb.BinaryReader): GetAllAssistantWebhookRequest; -} - -export namespace GetAllAssistantWebhookRequest { - export type AsObject = { - webhookid: string, - assistantid: string, - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllAssistantWebhookResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: AssistantWebhook, index?: number): AssistantWebhook; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantWebhookResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantWebhookResponse): GetAllAssistantWebhookResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantWebhookResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantWebhookResponse; - static deserializeBinaryFromReader(message: GetAllAssistantWebhookResponse, reader: jspb.BinaryReader): GetAllAssistantWebhookResponse; -} - -export namespace GetAllAssistantWebhookResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class GetAllAssistantWebhookLogRequest extends jspb.Message { - getProjectid(): string; - setProjectid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - hasOrder(): boolean; - clearOrder(): void; - getOrder(): common_pb.Ordering | undefined; - setOrder(value?: common_pb.Ordering): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantWebhookLogRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantWebhookLogRequest): GetAllAssistantWebhookLogRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantWebhookLogRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantWebhookLogRequest; - static deserializeBinaryFromReader(message: GetAllAssistantWebhookLogRequest, reader: jspb.BinaryReader): GetAllAssistantWebhookLogRequest; -} - -export namespace GetAllAssistantWebhookLogRequest { - export type AsObject = { - projectid: string, - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - order?: common_pb.Ordering.AsObject, - } -} - -export class GetAssistantWebhookLogRequest extends jspb.Message { - getProjectid(): string; - setProjectid(value: string): void; - - getId(): string; - setId(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantWebhookLogRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantWebhookLogRequest): GetAssistantWebhookLogRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantWebhookLogRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantWebhookLogRequest; - static deserializeBinaryFromReader(message: GetAssistantWebhookLogRequest, reader: jspb.BinaryReader): GetAssistantWebhookLogRequest; -} - -export namespace GetAssistantWebhookLogRequest { - export type AsObject = { - projectid: string, - id: string, - } -} - -export class GetAssistantWebhookLogResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AssistantWebhookLog | undefined; - setData(value?: AssistantWebhookLog): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAssistantWebhookLogResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAssistantWebhookLogResponse): GetAssistantWebhookLogResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAssistantWebhookLogResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAssistantWebhookLogResponse; - static deserializeBinaryFromReader(message: GetAssistantWebhookLogResponse, reader: jspb.BinaryReader): GetAssistantWebhookLogResponse; -} - -export namespace GetAssistantWebhookLogResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AssistantWebhookLog.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAllAssistantWebhookLogResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: AssistantWebhookLog, index?: number): AssistantWebhookLog; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantWebhookLogResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantWebhookLogResponse): GetAllAssistantWebhookLogResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantWebhookLogResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantWebhookLogResponse; - static deserializeBinaryFromReader(message: GetAllAssistantWebhookLogResponse, reader: jspb.BinaryReader): GetAllAssistantWebhookLogResponse; -} - -export namespace GetAllAssistantWebhookLogResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - diff --git a/src/clients/protos/assistant-webhook_pb.js b/src/clients/protos/assistant-webhook_pb.js index 2d83cf4..02eeb07 100644 --- a/src/clients/protos/assistant-webhook_pb.js +++ b/src/clients/protos/assistant-webhook_pb.js @@ -1160,7 +1160,7 @@ proto.assistant_api.AssistantWebhookLog.toObject = function(includeInstance, msg assistantid: jspb.Message.getFieldWithDefault(msg, 8, "0"), projectid: jspb.Message.getFieldWithDefault(msg, 9, "0"), organizationid: jspb.Message.getFieldWithDefault(msg, 10, "0"), - conversationid: jspb.Message.getFieldWithDefault(msg, 11, "0"), + assistantconversationid: jspb.Message.getFieldWithDefault(msg, 11, "0"), assetprefix: jspb.Message.getFieldWithDefault(msg, 12, ""), event: jspb.Message.getFieldWithDefault(msg, 13, ""), responsestatus: jspb.Message.getFieldWithDefault(msg, 14, "0"), @@ -1250,7 +1250,7 @@ proto.assistant_api.AssistantWebhookLog.deserializeBinaryFromReader = function(m break; case 11: var value = /** @type {string} */ (reader.readUint64String()); - msg.setConversationid(value); + msg.setAssistantconversationid(value); break; case 12: var value = /** @type {string} */ (reader.readString()); @@ -1383,7 +1383,7 @@ proto.assistant_api.AssistantWebhookLog.serializeBinaryToWriter = function(messa f ); } - f = message.getConversationid(); + f = message.getAssistantconversationid(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( 11, @@ -1699,10 +1699,10 @@ proto.assistant_api.AssistantWebhookLog.prototype.setOrganizationid = function(v /** - * optional uint64 conversationId = 11; + * optional uint64 assistantConversationId = 11; * @return {string} */ -proto.assistant_api.AssistantWebhookLog.prototype.getConversationid = function() { +proto.assistant_api.AssistantWebhookLog.prototype.getAssistantconversationid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "0")); }; @@ -1711,7 +1711,7 @@ proto.assistant_api.AssistantWebhookLog.prototype.getConversationid = function() * @param {string} value * @return {!proto.assistant_api.AssistantWebhookLog} returns this */ -proto.assistant_api.AssistantWebhookLog.prototype.setConversationid = function(value) { +proto.assistant_api.AssistantWebhookLog.prototype.setAssistantconversationid = function(value) { return jspb.Message.setProto3StringIntField(this, 11, value); }; diff --git a/src/clients/protos/audit-logging-api.ts b/src/clients/protos/audit-logging-api.ts new file mode 100644 index 0000000..d1fbdf5 --- /dev/null +++ b/src/clients/protos/audit-logging-api.ts @@ -0,0 +1,1287 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: audit-logging-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/struct"; +import * as dependency_2 from "./google/protobuf/timestamp"; +import * as dependency_3 from "./common"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace integration_api { + export class AuditLog extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + integrationName?: string; + assetPrefix?: string; + responseStatus?: number; + timeTaken?: number; + status?: string; + projectId?: string; + organizationId?: string; + credentialId?: string; + externalAuditMetadatas?: dependency_3.Metadata[]; + createdDate?: dependency_2.google.protobuf.Timestamp; + updatedDate?: dependency_2.google.protobuf.Timestamp; + request?: dependency_1.google.protobuf.Struct; + response?: dependency_1.google.protobuf.Struct; + metrics?: dependency_3.Metric[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [10, 15], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("integrationName" in data && data.integrationName != undefined) { + this.integrationName = data.integrationName; + } + if ("assetPrefix" in data && data.assetPrefix != undefined) { + this.assetPrefix = data.assetPrefix; + } + if ("responseStatus" in data && data.responseStatus != undefined) { + this.responseStatus = data.responseStatus; + } + if ("timeTaken" in data && data.timeTaken != undefined) { + this.timeTaken = data.timeTaken; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("credentialId" in data && data.credentialId != undefined) { + this.credentialId = data.credentialId; + } + if ("externalAuditMetadatas" in data && data.externalAuditMetadatas != undefined) { + this.externalAuditMetadatas = data.externalAuditMetadatas; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("request" in data && data.request != undefined) { + this.request = data.request; + } + if ("response" in data && data.response != undefined) { + this.response = data.response; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get integrationName() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set integrationName(value: string) { + pb_1.Message.setField(this, 2, value); + } + get assetPrefix() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set assetPrefix(value: string) { + pb_1.Message.setField(this, 3, value); + } + get responseStatus() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set responseStatus(value: number) { + pb_1.Message.setField(this, 4, value); + } + get timeTaken() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set timeTaken(value: number) { + pb_1.Message.setField(this, 5, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 6, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 7, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 7, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 8, value); + } + get credentialId() { + return pb_1.Message.getFieldWithDefault(this, 9, "0") as string; + } + set credentialId(value: string) { + pb_1.Message.setField(this, 9, value); + } + get externalAuditMetadatas() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Metadata, 10) as dependency_3.Metadata[]; + } + set externalAuditMetadatas(value: dependency_3.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 10, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 11) as dependency_2.google.protobuf.Timestamp; + } + set createdDate(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 11, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 11) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 12) as dependency_2.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 12, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 12) != null; + } + get request() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Struct, 13) as dependency_1.google.protobuf.Struct; + } + set request(value: dependency_1.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 13, value); + } + get has_request() { + return pb_1.Message.getField(this, 13) != null; + } + get response() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Struct, 14) as dependency_1.google.protobuf.Struct; + } + set response(value: dependency_1.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_response() { + return pb_1.Message.getField(this, 14) != null; + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Metric, 15) as dependency_3.Metric[]; + } + set metrics(value: dependency_3.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 15, value); + } + static fromObject(data: { + id?: string; + integrationName?: string; + assetPrefix?: string; + responseStatus?: number; + timeTaken?: number; + status?: string; + projectId?: string; + organizationId?: string; + credentialId?: string; + externalAuditMetadatas?: ReturnType[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + request?: ReturnType; + response?: ReturnType; + metrics?: ReturnType[]; + }): AuditLog { + const message = new AuditLog({}); + if (data.id != null) { + message.id = data.id; + } + if (data.integrationName != null) { + message.integrationName = data.integrationName; + } + if (data.assetPrefix != null) { + message.assetPrefix = data.assetPrefix; + } + if (data.responseStatus != null) { + message.responseStatus = data.responseStatus; + } + if (data.timeTaken != null) { + message.timeTaken = data.timeTaken; + } + if (data.status != null) { + message.status = data.status; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.credentialId != null) { + message.credentialId = data.credentialId; + } + if (data.externalAuditMetadatas != null) { + message.externalAuditMetadatas = data.externalAuditMetadatas.map(item => dependency_3.Metadata.fromObject(item)); + } + if (data.createdDate != null) { + message.createdDate = dependency_2.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_2.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.request != null) { + message.request = dependency_1.google.protobuf.Struct.fromObject(data.request); + } + if (data.response != null) { + message.response = dependency_1.google.protobuf.Struct.fromObject(data.response); + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => dependency_3.Metric.fromObject(item)); + } + return message; + } + toObject() { + const data: { + id?: string; + integrationName?: string; + assetPrefix?: string; + responseStatus?: number; + timeTaken?: number; + status?: string; + projectId?: string; + organizationId?: string; + credentialId?: string; + externalAuditMetadatas?: ReturnType[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + request?: ReturnType; + response?: ReturnType; + metrics?: ReturnType[]; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.integrationName != null) { + data.integrationName = this.integrationName; + } + if (this.assetPrefix != null) { + data.assetPrefix = this.assetPrefix; + } + if (this.responseStatus != null) { + data.responseStatus = this.responseStatus; + } + if (this.timeTaken != null) { + data.timeTaken = this.timeTaken; + } + if (this.status != null) { + data.status = this.status; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.credentialId != null) { + data.credentialId = this.credentialId; + } + if (this.externalAuditMetadatas != null) { + data.externalAuditMetadatas = this.externalAuditMetadatas.map((item: dependency_3.Metadata) => item.toObject()); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.request != null) { + data.request = this.request.toObject(); + } + if (this.response != null) { + data.response = this.response.toObject(); + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: dependency_3.Metric) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.integrationName.length) + writer.writeString(2, this.integrationName); + if (this.assetPrefix.length) + writer.writeString(3, this.assetPrefix); + if (this.responseStatus != 0) + writer.writeInt64(4, this.responseStatus); + if (this.timeTaken != 0) + writer.writeInt64(5, this.timeTaken); + if (this.status.length) + writer.writeString(6, this.status); + if (this.projectId != "0") + writer.writeUint64String(7, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(8, this.organizationId); + if (this.credentialId != "0") + writer.writeUint64String(9, this.credentialId); + if (this.externalAuditMetadatas.length) + writer.writeRepeatedMessage(10, this.externalAuditMetadatas, (item: dependency_3.Metadata) => item.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(11, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(12, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.has_request) + writer.writeMessage(13, this.request, () => this.request.serialize(writer)); + if (this.has_response) + writer.writeMessage(14, this.response, () => this.response.serialize(writer)); + if (this.metrics.length) + writer.writeRepeatedMessage(15, this.metrics, (item: dependency_3.Metric) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuditLog { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuditLog(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.integrationName = reader.readString(); + break; + case 3: + message.assetPrefix = reader.readString(); + break; + case 4: + message.responseStatus = reader.readInt64(); + break; + case 5: + message.timeTaken = reader.readInt64(); + break; + case 6: + message.status = reader.readString(); + break; + case 7: + message.projectId = reader.readUint64String(); + break; + case 8: + message.organizationId = reader.readUint64String(); + break; + case 9: + message.credentialId = reader.readUint64String(); + break; + case 10: + reader.readMessage(message.externalAuditMetadatas, () => pb_1.Message.addToRepeatedWrapperField(message, 10, dependency_3.Metadata.deserialize(reader), dependency_3.Metadata)); + break; + case 11: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 12: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 13: + reader.readMessage(message.request, () => message.request = dependency_1.google.protobuf.Struct.deserialize(reader)); + break; + case 14: + reader.readMessage(message.response, () => message.response = dependency_1.google.protobuf.Struct.deserialize(reader)); + break; + case 15: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 15, dependency_3.Metric.deserialize(reader), dependency_3.Metric)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AuditLog { + return AuditLog.deserialize(bytes); + } + } + export class GetAllAuditLogRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_3.Paginate; + criterias?: dependency_3.Criteria[]; + projectId?: string; + organizationId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_3.Paginate, 1) as dependency_3.Paginate; + } + set paginate(value: dependency_3.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Criteria, 2) as dependency_3.Criteria[]; + } + set criterias(value: dependency_3.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + projectId?: string; + organizationId?: string; + }): GetAllAuditLogRequest { + const message = new GetAllAuditLogRequest({}); + if (data.paginate != null) { + message.paginate = dependency_3.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_3.Criteria.fromObject(item)); + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + projectId?: string; + organizationId?: string; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_3.Criteria) => item.toObject()); + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_3.Criteria) => item.serialize(writer)); + if (this.projectId != "0") + writer.writeUint64String(3, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(4, this.organizationId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAuditLogRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAuditLogRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_3.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.Criteria.deserialize(reader), dependency_3.Criteria)); + break; + case 3: + message.projectId = reader.readUint64String(); + break; + case 4: + message.organizationId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAuditLogRequest { + return GetAllAuditLogRequest.deserialize(bytes); + } + } + export class GetAllAuditLogResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AuditLog[]; + error?: dependency_3.Error; + paginated?: dependency_3.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, AuditLog, 3) as AuditLog[]; + } + set data(value: AuditLog[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_3.Paginated, 5) as dependency_3.Paginated; + } + set paginated(value: dependency_3.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAuditLogResponse { + const message = new GetAllAuditLogResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => AuditLog.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_3.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: AuditLog) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: AuditLog) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAuditLogResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAuditLogResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AuditLog.deserialize(reader), AuditLog)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_3.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAuditLogResponse { + return GetAllAuditLogResponse.deserialize(bytes); + } + } + export class GetAuditLogRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + projectId?: string; + organizationId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + id?: string; + projectId?: string; + organizationId?: string; + }): GetAuditLogRequest { + const message = new GetAuditLogRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + return message; + } + toObject() { + const data: { + id?: string; + projectId?: string; + organizationId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.projectId != "0") + writer.writeUint64String(3, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(4, this.organizationId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAuditLogRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAuditLogRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 3: + message.projectId = reader.readUint64String(); + break; + case 4: + message.organizationId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAuditLogRequest { + return GetAuditLogRequest.deserialize(bytes); + } + } + export class GetAuditLogResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AuditLog; + error?: dependency_3.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AuditLog, 3) as AuditLog; + } + set data(value: AuditLog) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetAuditLogResponse { + const message = new GetAuditLogResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AuditLog.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAuditLogResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAuditLogResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AuditLog.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAuditLogResponse { + return GetAuditLogResponse.deserialize(bytes); + } + } + export class CreateMetadataRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + additionalData?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("additionalData" in data && data.additionalData != undefined) { + this.additionalData = data.additionalData; + } + } + if (!this.additionalData) + this.additionalData = new Map(); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get additionalData() { + return pb_1.Message.getField(this, 2) as any as Map; + } + set additionalData(value: Map) { + pb_1.Message.setField(this, 2, value as any); + } + static fromObject(data: { + id?: string; + additionalData?: { + [key: string]: string; + }; + }): CreateMetadataRequest { + const message = new CreateMetadataRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (typeof data.additionalData == "object") { + message.additionalData = new Map(Object.entries(data.additionalData)); + } + return message; + } + toObject() { + const data: { + id?: string; + additionalData?: { + [key: string]: string; + }; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.additionalData != null) { + data.additionalData = (Object.fromEntries)(this.additionalData); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + for (const [key, value] of this.additionalData) { + writer.writeMessage(2, this.additionalData, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateMetadataRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateMetadataRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.additionalData as any, reader, reader.readString, reader.readString)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateMetadataRequest { + return CreateMetadataRequest.deserialize(bytes); + } + } + export class CreateMetadataResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AuditLog; + error?: dependency_3.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, AuditLog, 3) as AuditLog; + } + set data(value: AuditLog) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): CreateMetadataResponse { + const message = new CreateMetadataResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = AuditLog.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateMetadataResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateMetadataResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = AuditLog.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateMetadataResponse { + return CreateMetadataResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedAuditLoggingServiceService { + static definition = { + GetAllAuditLog: { + path: "/integration_api.AuditLoggingService/GetAllAuditLog", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllAuditLogRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllAuditLogRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllAuditLogResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllAuditLogResponse.deserialize(new Uint8Array(bytes)) + }, + GetAuditLog: { + path: "/integration_api.AuditLoggingService/GetAuditLog", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAuditLogRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAuditLogRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAuditLogResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAuditLogResponse.deserialize(new Uint8Array(bytes)) + }, + CreateMetadata: { + path: "/integration_api.AuditLoggingService/CreateMetadata", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateMetadataRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateMetadataRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateMetadataResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateMetadataResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GetAllAuditLog(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAuditLog(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateMetadata(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class AuditLoggingServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedAuditLoggingServiceService.definition, "AuditLoggingService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GetAllAuditLog: GrpcUnaryServiceInterface = (message: GetAllAuditLogRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAuditLog(message, metadata, options, callback); + }; + GetAuditLog: GrpcUnaryServiceInterface = (message: GetAuditLogRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAuditLog(message, metadata, options, callback); + }; + CreateMetadata: GrpcUnaryServiceInterface = (message: CreateMetadataRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateMetadata(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/audit-logging-api_grpc_pb.d.ts b/src/clients/protos/audit-logging-api_grpc_pb.d.ts deleted file mode 100644 index a2d9e3a..0000000 --- a/src/clients/protos/audit-logging-api_grpc_pb.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: integration_api -// file: audit-logging-api.proto - -import * as audit_logging_api_pb from "./audit-logging-api_pb"; -import * as grpc from "grpc"; - -interface IAuditLoggingServiceService extends grpc.ServiceDefinition { - getAllAuditLog: grpc.MethodDefinition; - getAuditLog: grpc.MethodDefinition; - createMetadata: grpc.MethodDefinition; -} - -export const AuditLoggingServiceService: IAuditLoggingServiceService; - -export interface IAuditLoggingServiceServer extends grpc.UntypedServiceImplementation { - getAllAuditLog: grpc.handleUnaryCall; - getAuditLog: grpc.handleUnaryCall; - createMetadata: grpc.handleUnaryCall; -} - -export class AuditLoggingServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - getAllAuditLog(argument: audit_logging_api_pb.GetAllAuditLogRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAuditLog(argument: audit_logging_api_pb.GetAllAuditLogRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAuditLog(argument: audit_logging_api_pb.GetAllAuditLogRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAuditLog(argument: audit_logging_api_pb.GetAuditLogRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAuditLog(argument: audit_logging_api_pb.GetAuditLogRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAuditLog(argument: audit_logging_api_pb.GetAuditLogRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createMetadata(argument: audit_logging_api_pb.CreateMetadataRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createMetadata(argument: audit_logging_api_pb.CreateMetadataRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createMetadata(argument: audit_logging_api_pb.CreateMetadataRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/audit-logging-api_pb.d.ts b/src/clients/protos/audit-logging-api_pb.d.ts deleted file mode 100644 index 83d1b88..0000000 --- a/src/clients/protos/audit-logging-api_pb.d.ts +++ /dev/null @@ -1,297 +0,0 @@ -// package: integration_api -// file: audit-logging-api.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as common_pb from "./common_pb"; - -export class AuditLog extends jspb.Message { - getId(): string; - setId(value: string): void; - - getIntegrationname(): string; - setIntegrationname(value: string): void; - - getAssetprefix(): string; - setAssetprefix(value: string): void; - - getResponsestatus(): number; - setResponsestatus(value: number): void; - - getTimetaken(): number; - setTimetaken(value: number): void; - - getStatus(): string; - setStatus(value: string): void; - - getProjectid(): string; - setProjectid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - getCredentialid(): string; - setCredentialid(value: string): void; - - clearExternalauditmetadatasList(): void; - getExternalauditmetadatasList(): Array; - setExternalauditmetadatasList(value: Array): void; - addExternalauditmetadatas(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasRequest(): boolean; - clearRequest(): void; - getRequest(): google_protobuf_struct_pb.Struct | undefined; - setRequest(value?: google_protobuf_struct_pb.Struct): void; - - hasResponse(): boolean; - clearResponse(): void; - getResponse(): google_protobuf_struct_pb.Struct | undefined; - setResponse(value?: google_protobuf_struct_pb.Struct): void; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: common_pb.Metric, index?: number): common_pb.Metric; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AuditLog.AsObject; - static toObject(includeInstance: boolean, msg: AuditLog): AuditLog.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AuditLog, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AuditLog; - static deserializeBinaryFromReader(message: AuditLog, reader: jspb.BinaryReader): AuditLog; -} - -export namespace AuditLog { - export type AsObject = { - id: string, - integrationname: string, - assetprefix: string, - responsestatus: number, - timetaken: number, - status: string, - projectid: string, - organizationid: string, - credentialid: string, - externalauditmetadatasList: Array, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - request?: google_protobuf_struct_pb.Struct.AsObject, - response?: google_protobuf_struct_pb.Struct.AsObject, - metricsList: Array, - } -} - -export class GetAllAuditLogRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - getProjectid(): string; - setProjectid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAuditLogRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAuditLogRequest): GetAllAuditLogRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAuditLogRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAuditLogRequest; - static deserializeBinaryFromReader(message: GetAllAuditLogRequest, reader: jspb.BinaryReader): GetAllAuditLogRequest; -} - -export namespace GetAllAuditLogRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - projectid: string, - organizationid: string, - } -} - -export class GetAllAuditLogResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: AuditLog, index?: number): AuditLog; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAuditLogResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAuditLogResponse): GetAllAuditLogResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAuditLogResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAuditLogResponse; - static deserializeBinaryFromReader(message: GetAllAuditLogResponse, reader: jspb.BinaryReader): GetAllAuditLogResponse; -} - -export namespace GetAllAuditLogResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class GetAuditLogRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getProjectid(): string; - setProjectid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAuditLogRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAuditLogRequest): GetAuditLogRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAuditLogRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAuditLogRequest; - static deserializeBinaryFromReader(message: GetAuditLogRequest, reader: jspb.BinaryReader): GetAuditLogRequest; -} - -export namespace GetAuditLogRequest { - export type AsObject = { - id: string, - projectid: string, - organizationid: string, - } -} - -export class GetAuditLogResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AuditLog | undefined; - setData(value?: AuditLog): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAuditLogResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAuditLogResponse): GetAuditLogResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAuditLogResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAuditLogResponse; - static deserializeBinaryFromReader(message: GetAuditLogResponse, reader: jspb.BinaryReader): GetAuditLogResponse; -} - -export namespace GetAuditLogResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AuditLog.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class CreateMetadataRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - getAdditionaldataMap(): jspb.Map; - clearAdditionaldataMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateMetadataRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateMetadataRequest): CreateMetadataRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateMetadataRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateMetadataRequest; - static deserializeBinaryFromReader(message: CreateMetadataRequest, reader: jspb.BinaryReader): CreateMetadataRequest; -} - -export namespace CreateMetadataRequest { - export type AsObject = { - id: string, - additionaldataMap: Array<[string, string]>, - } -} - -export class CreateMetadataResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): AuditLog | undefined; - setData(value?: AuditLog): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateMetadataResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateMetadataResponse): CreateMetadataResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateMetadataResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateMetadataResponse; - static deserializeBinaryFromReader(message: CreateMetadataResponse, reader: jspb.BinaryReader): CreateMetadataResponse; -} - -export namespace CreateMetadataResponse { - export type AsObject = { - code: number, - success: boolean, - data?: AuditLog.AsObject, - error?: common_pb.Error.AsObject, - } -} - diff --git a/src/clients/protos/common.ts b/src/clients/protos/common.ts new file mode 100644 index 0000000..b86861a --- /dev/null +++ b/src/clients/protos/common.ts @@ -0,0 +1,5235 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: common.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./google/protobuf/struct"; +import * as pb_1 from "google-protobuf"; +export enum Source { + WEB_PLUGIN = 0, + DEBUGGER = 1, + SDK = 2, + PHONE_CALL = 3, + WHATSAPP = 4 +} +export class FieldSelector extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + field?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("field" in data && data.field != undefined) { + this.field = data.field; + } + } + } + get field() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set field(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + field?: string; + }): FieldSelector { + const message = new FieldSelector({}); + if (data.field != null) { + message.field = data.field; + } + return message; + } + toObject() { + const data: { + field?: string; + } = {}; + if (this.field != null) { + data.field = this.field; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.field.length) + writer.writeString(1, this.field); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FieldSelector { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FieldSelector(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.field = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FieldSelector { + return FieldSelector.deserialize(bytes); + } +} +export class Criteria extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + key?: string; + value?: string; + logic?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + if ("logic" in data && data.logic != undefined) { + this.logic = data.logic; + } + } + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set value(value: string) { + pb_1.Message.setField(this, 2, value); + } + get logic() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set logic(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + key?: string; + value?: string; + logic?: string; + }): Criteria { + const message = new Criteria({}); + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + if (data.logic != null) { + message.logic = data.logic; + } + return message; + } + toObject() { + const data: { + key?: string; + value?: string; + logic?: string; + } = {}; + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + if (this.logic != null) { + data.logic = this.logic; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.key.length) + writer.writeString(1, this.key); + if (this.value.length) + writer.writeString(2, this.value); + if (this.logic.length) + writer.writeString(3, this.logic); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Criteria { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Criteria(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.key = reader.readString(); + break; + case 2: + message.value = reader.readString(); + break; + case 3: + message.logic = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Criteria { + return Criteria.deserialize(bytes); + } +} +export class Error extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + errorCode?: string; + errorMessage?: string; + humanMessage?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("errorCode" in data && data.errorCode != undefined) { + this.errorCode = data.errorCode; + } + if ("errorMessage" in data && data.errorMessage != undefined) { + this.errorMessage = data.errorMessage; + } + if ("humanMessage" in data && data.humanMessage != undefined) { + this.humanMessage = data.humanMessage; + } + } + } + get errorCode() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set errorCode(value: string) { + pb_1.Message.setField(this, 1, value); + } + get errorMessage() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set errorMessage(value: string) { + pb_1.Message.setField(this, 2, value); + } + get humanMessage() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set humanMessage(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + errorCode?: string; + errorMessage?: string; + humanMessage?: string; + }): Error { + const message = new Error({}); + if (data.errorCode != null) { + message.errorCode = data.errorCode; + } + if (data.errorMessage != null) { + message.errorMessage = data.errorMessage; + } + if (data.humanMessage != null) { + message.humanMessage = data.humanMessage; + } + return message; + } + toObject() { + const data: { + errorCode?: string; + errorMessage?: string; + humanMessage?: string; + } = {}; + if (this.errorCode != null) { + data.errorCode = this.errorCode; + } + if (this.errorMessage != null) { + data.errorMessage = this.errorMessage; + } + if (this.humanMessage != null) { + data.humanMessage = this.humanMessage; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.errorCode != "0") + writer.writeUint64String(1, this.errorCode); + if (this.errorMessage.length) + writer.writeString(2, this.errorMessage); + if (this.humanMessage.length) + writer.writeString(3, this.humanMessage); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Error { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Error(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.errorCode = reader.readUint64String(); + break; + case 2: + message.errorMessage = reader.readString(); + break; + case 3: + message.humanMessage = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Error { + return Error.deserialize(bytes); + } +} +export class Paginate extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + page?: number; + pageSize?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("page" in data && data.page != undefined) { + this.page = data.page; + } + if ("pageSize" in data && data.pageSize != undefined) { + this.pageSize = data.pageSize; + } + } + } + get page() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set page(value: number) { + pb_1.Message.setField(this, 1, value); + } + get pageSize() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set pageSize(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + page?: number; + pageSize?: number; + }): Paginate { + const message = new Paginate({}); + if (data.page != null) { + message.page = data.page; + } + if (data.pageSize != null) { + message.pageSize = data.pageSize; + } + return message; + } + toObject() { + const data: { + page?: number; + pageSize?: number; + } = {}; + if (this.page != null) { + data.page = this.page; + } + if (this.pageSize != null) { + data.pageSize = this.pageSize; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.page != 0) + writer.writeUint32(1, this.page); + if (this.pageSize != 0) + writer.writeUint32(2, this.pageSize); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Paginate { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Paginate(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.page = reader.readUint32(); + break; + case 2: + message.pageSize = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Paginate { + return Paginate.deserialize(bytes); + } +} +export class Paginated extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + currentPage?: number; + totalItem?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("currentPage" in data && data.currentPage != undefined) { + this.currentPage = data.currentPage; + } + if ("totalItem" in data && data.totalItem != undefined) { + this.totalItem = data.totalItem; + } + } + } + get currentPage() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set currentPage(value: number) { + pb_1.Message.setField(this, 1, value); + } + get totalItem() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set totalItem(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + currentPage?: number; + totalItem?: number; + }): Paginated { + const message = new Paginated({}); + if (data.currentPage != null) { + message.currentPage = data.currentPage; + } + if (data.totalItem != null) { + message.totalItem = data.totalItem; + } + return message; + } + toObject() { + const data: { + currentPage?: number; + totalItem?: number; + } = {}; + if (this.currentPage != null) { + data.currentPage = this.currentPage; + } + if (this.totalItem != null) { + data.totalItem = this.totalItem; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.currentPage != 0) + writer.writeUint32(1, this.currentPage); + if (this.totalItem != 0) + writer.writeUint32(2, this.totalItem); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Paginated { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Paginated(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.currentPage = reader.readUint32(); + break; + case 2: + message.totalItem = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Paginated { + return Paginated.deserialize(bytes); + } +} +export class Ordering extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + column?: string; + order?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("column" in data && data.column != undefined) { + this.column = data.column; + } + if ("order" in data && data.order != undefined) { + this.order = data.order; + } + } + } + get column() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set column(value: string) { + pb_1.Message.setField(this, 1, value); + } + get order() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set order(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + column?: string; + order?: string; + }): Ordering { + const message = new Ordering({}); + if (data.column != null) { + message.column = data.column; + } + if (data.order != null) { + message.order = data.order; + } + return message; + } + toObject() { + const data: { + column?: string; + order?: string; + } = {}; + if (this.column != null) { + data.column = this.column; + } + if (this.order != null) { + data.order = this.order; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.column.length) + writer.writeString(1, this.column); + if (this.order.length) + writer.writeString(2, this.order); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Ordering { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Ordering(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.column = reader.readString(); + break; + case 2: + message.order = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Ordering { + return Ordering.deserialize(bytes); + } +} +export class User extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + email?: string; + role?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + status?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("email" in data && data.email != undefined) { + this.email = data.email; + } + if ("role" in data && data.role != undefined) { + this.role = data.role; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get email() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set email(value: string) { + pb_1.Message.setField(this, 3, value); + } + get role() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set role(value: string) { + pb_1.Message.setField(this, 4, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 6) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 6) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + id?: string; + name?: string; + email?: string; + role?: string; + createdDate?: ReturnType; + status?: string; + }): User { + const message = new User({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.email != null) { + message.email = data.email; + } + if (data.role != null) { + message.role = data.role; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + email?: string; + role?: string; + createdDate?: ReturnType; + status?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.email != null) { + data.email = this.email; + } + if (this.role != null) { + data.role = this.role; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.email.length) + writer.writeString(3, this.email); + if (this.role.length) + writer.writeString(4, this.role); + if (this.has_createdDate) + writer.writeMessage(6, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.status.length) + writer.writeString(5, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): User { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new User(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.email = reader.readString(); + break; + case 4: + message.role = reader.readString(); + break; + case 6: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 5: + message.status = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): User { + return User.deserialize(bytes); + } +} +export class BaseResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Map; + error?: Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + if (!this.data) + this.data = new Map(); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getField(this, 3) as any as Map; + } + set data(value: Map) { + pb_1.Message.setField(this, 3, value as any); + } + get error() { + return pb_1.Message.getWrapperField(this, Error, 4) as Error; + } + set error(value: Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: { + [key: string]: string; + }; + error?: ReturnType; + }): BaseResponse { + const message = new BaseResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (typeof data.data == "object") { + message.data = new Map(Object.entries(data.data)); + } + if (data.error != null) { + message.error = Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: { + [key: string]: string; + }; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = (Object.fromEntries)(this.data); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + for (const [key, value] of this.data) { + writer.writeMessage(3, this.data, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BaseResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BaseResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.data as any, reader, reader.readString, reader.readString)); + break; + case 4: + reader.readMessage(message.error, () => message.error = Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BaseResponse { + return BaseResponse.deserialize(bytes); + } +} +export class Metadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + key?: string; + value?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 2, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set value(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + id?: string; + key?: string; + value?: string; + }): Metadata { + const message = new Metadata({}); + if (data.id != null) { + message.id = data.id; + } + if (data.key != null) { + message.key = data.key; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + id?: string; + key?: string; + value?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.key != null) { + data.key = this.key; + } + if (this.value != null) { + data.value = this.value; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.key.length) + writer.writeString(2, this.key); + if (this.value.length) + writer.writeString(3, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Metadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Metadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.key = reader.readString(); + break; + case 3: + message.value = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Metadata { + return Metadata.deserialize(bytes); + } +} +export class Argument extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + value?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set value(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + id?: string; + name?: string; + value?: string; + }): Argument { + const message = new Argument({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + value?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.value != null) { + data.value = this.value; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.value.length) + writer.writeString(3, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Argument { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Argument(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.value = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Argument { + return Argument.deserialize(bytes); + } +} +export class Variable extends pb_1.Message { + #one_of_decls: number[][] = [[4]]; + constructor(data?: any[] | ({ + id?: string; + name?: string; + type?: string; + } & (({ + defaultValue?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("defaultValue" in data && data.defaultValue != undefined) { + this.defaultValue = data.defaultValue; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set type(value: string) { + pb_1.Message.setField(this, 3, value); + } + get defaultValue() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set defaultValue(value: string) { + pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value); + } + get has_defaultValue() { + return pb_1.Message.getField(this, 4) != null; + } + get _defaultValue() { + const cases: { + [index: number]: "none" | "defaultValue"; + } = { + 0: "none", + 4: "defaultValue" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + static fromObject(data: { + id?: string; + name?: string; + type?: string; + defaultValue?: string; + }): Variable { + const message = new Variable({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.type != null) { + message.type = data.type; + } + if (data.defaultValue != null) { + message.defaultValue = data.defaultValue; + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + type?: string; + defaultValue?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.type != null) { + data.type = this.type; + } + if (this.defaultValue != null) { + data.defaultValue = this.defaultValue; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.type.length) + writer.writeString(3, this.type); + if (this.has_defaultValue) + writer.writeString(4, this.defaultValue); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Variable { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Variable(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.type = reader.readString(); + break; + case 4: + message.defaultValue = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Variable { + return Variable.deserialize(bytes); + } +} +export class Provider extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + description?: string; + humanName?: string; + image?: string; + website?: string; + status?: string; + connectConfiguration?: Variable[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [9], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("humanName" in data && data.humanName != undefined) { + this.humanName = data.humanName; + } + if ("image" in data && data.image != undefined) { + this.image = data.image; + } + if ("website" in data && data.website != undefined) { + this.website = data.website; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("connectConfiguration" in data && data.connectConfiguration != undefined) { + this.connectConfiguration = data.connectConfiguration; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get humanName() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set humanName(value: string) { + pb_1.Message.setField(this, 4, value); + } + get image() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set image(value: string) { + pb_1.Message.setField(this, 5, value); + } + get website() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set website(value: string) { + pb_1.Message.setField(this, 6, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 7, value); + } + get connectConfiguration() { + return pb_1.Message.getRepeatedWrapperField(this, Variable, 9) as Variable[]; + } + set connectConfiguration(value: Variable[]) { + pb_1.Message.setRepeatedWrapperField(this, 9, value); + } + static fromObject(data: { + id?: string; + name?: string; + description?: string; + humanName?: string; + image?: string; + website?: string; + status?: string; + connectConfiguration?: ReturnType[]; + }): Provider { + const message = new Provider({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.humanName != null) { + message.humanName = data.humanName; + } + if (data.image != null) { + message.image = data.image; + } + if (data.website != null) { + message.website = data.website; + } + if (data.status != null) { + message.status = data.status; + } + if (data.connectConfiguration != null) { + message.connectConfiguration = data.connectConfiguration.map(item => Variable.fromObject(item)); + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + description?: string; + humanName?: string; + image?: string; + website?: string; + status?: string; + connectConfiguration?: ReturnType[]; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.humanName != null) { + data.humanName = this.humanName; + } + if (this.image != null) { + data.image = this.image; + } + if (this.website != null) { + data.website = this.website; + } + if (this.status != null) { + data.status = this.status; + } + if (this.connectConfiguration != null) { + data.connectConfiguration = this.connectConfiguration.map((item: Variable) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.humanName.length) + writer.writeString(4, this.humanName); + if (this.image.length) + writer.writeString(5, this.image); + if (this.website.length) + writer.writeString(6, this.website); + if (this.status.length) + writer.writeString(7, this.status); + if (this.connectConfiguration.length) + writer.writeRepeatedMessage(9, this.connectConfiguration, (item: Variable) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Provider { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Provider(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.humanName = reader.readString(); + break; + case 5: + message.image = reader.readString(); + break; + case 6: + message.website = reader.readString(); + break; + case 7: + message.status = reader.readString(); + break; + case 9: + reader.readMessage(message.connectConfiguration, () => pb_1.Message.addToRepeatedWrapperField(message, 9, Variable.deserialize(reader), Variable)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Provider { + return Provider.deserialize(bytes); + } +} +export class Tag extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + tag?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("tag" in data && data.tag != undefined) { + this.tag = data.tag; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get tag() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set tag(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: string; + tag?: string[]; + }): Tag { + const message = new Tag({}); + if (data.id != null) { + message.id = data.id; + } + if (data.tag != null) { + message.tag = data.tag; + } + return message; + } + toObject() { + const data: { + id?: string; + tag?: string[]; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.tag != null) { + data.tag = this.tag; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.tag.length) + writer.writeRepeatedString(2, this.tag); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Tag { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Tag(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Tag { + return Tag.deserialize(bytes); + } +} +export class Organization extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + description?: string; + industry?: string; + contact?: string; + size?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("industry" in data && data.industry != undefined) { + this.industry = data.industry; + } + if ("contact" in data && data.contact != undefined) { + this.contact = data.contact; + } + if ("size" in data && data.size != undefined) { + this.size = data.size; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get industry() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set industry(value: string) { + pb_1.Message.setField(this, 4, value); + } + get contact() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set contact(value: string) { + pb_1.Message.setField(this, 5, value); + } + get size() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set size(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + id?: string; + name?: string; + description?: string; + industry?: string; + contact?: string; + size?: string; + }): Organization { + const message = new Organization({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.industry != null) { + message.industry = data.industry; + } + if (data.contact != null) { + message.contact = data.contact; + } + if (data.size != null) { + message.size = data.size; + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + description?: string; + industry?: string; + contact?: string; + size?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.industry != null) { + data.industry = this.industry; + } + if (this.contact != null) { + data.contact = this.contact; + } + if (this.size != null) { + data.size = this.size; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.industry.length) + writer.writeString(4, this.industry); + if (this.contact.length) + writer.writeString(5, this.contact); + if (this.size.length) + writer.writeString(6, this.size); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Organization { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Organization(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.industry = reader.readString(); + break; + case 5: + message.contact = reader.readString(); + break; + case 6: + message.size = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Organization { + return Organization.deserialize(bytes); + } +} +export class Metric extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + value?: string; + description?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set value(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + name?: string; + value?: string; + description?: string; + }): Metric { + const message = new Metric({}); + if (data.name != null) { + message.name = data.name; + } + if (data.value != null) { + message.value = data.value; + } + if (data.description != null) { + message.description = data.description; + } + return message; + } + toObject() { + const data: { + name?: string; + value?: string; + description?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.value != null) { + data.value = this.value; + } + if (this.description != null) { + data.description = this.description; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.name.length) + writer.writeString(1, this.name); + if (this.value.length) + writer.writeString(2, this.value); + if (this.description.length) + writer.writeString(3, this.description); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Metric { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Metric(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.value = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Metric { + return Metric.deserialize(bytes); + } +} +export class Content extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + contentType?: string; + contentFormat?: string; + content?: Uint8Array; + meta?: dependency_2.google.protobuf.Struct; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("contentType" in data && data.contentType != undefined) { + this.contentType = data.contentType; + } + if ("contentFormat" in data && data.contentFormat != undefined) { + this.contentFormat = data.contentFormat; + } + if ("content" in data && data.content != undefined) { + this.content = data.content; + } + if ("meta" in data && data.meta != undefined) { + this.meta = data.meta; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get contentType() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set contentType(value: string) { + pb_1.Message.setField(this, 2, value); + } + get contentFormat() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set contentFormat(value: string) { + pb_1.Message.setField(this, 3, value); + } + get content() { + return pb_1.Message.getFieldWithDefault(this, 4, new Uint8Array(0)) as Uint8Array; + } + set content(value: Uint8Array) { + pb_1.Message.setField(this, 4, value); + } + get meta() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Struct, 5) as dependency_2.google.protobuf.Struct; + } + set meta(value: dependency_2.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_meta() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + name?: string; + contentType?: string; + contentFormat?: string; + content?: Uint8Array; + meta?: ReturnType; + }): Content { + const message = new Content({}); + if (data.name != null) { + message.name = data.name; + } + if (data.contentType != null) { + message.contentType = data.contentType; + } + if (data.contentFormat != null) { + message.contentFormat = data.contentFormat; + } + if (data.content != null) { + message.content = data.content; + } + if (data.meta != null) { + message.meta = dependency_2.google.protobuf.Struct.fromObject(data.meta); + } + return message; + } + toObject() { + const data: { + name?: string; + contentType?: string; + contentFormat?: string; + content?: Uint8Array; + meta?: ReturnType; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.contentType != null) { + data.contentType = this.contentType; + } + if (this.contentFormat != null) { + data.contentFormat = this.contentFormat; + } + if (this.content != null) { + data.content = this.content; + } + if (this.meta != null) { + data.meta = this.meta.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.name.length) + writer.writeString(1, this.name); + if (this.contentType.length) + writer.writeString(2, this.contentType); + if (this.contentFormat.length) + writer.writeString(3, this.contentFormat); + if (this.content.length) + writer.writeBytes(4, this.content); + if (this.has_meta) + writer.writeMessage(5, this.meta, () => this.meta.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Content { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Content(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.contentType = reader.readString(); + break; + case 3: + message.contentFormat = reader.readString(); + break; + case 4: + message.content = reader.readBytes(); + break; + case 5: + reader.readMessage(message.meta, () => message.meta = dependency_2.google.protobuf.Struct.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Content { + return Content.deserialize(bytes); + } +} +export class Message extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + role?: string; + contents?: Content[]; + toolCalls?: ToolCall[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("role" in data && data.role != undefined) { + this.role = data.role; + } + if ("contents" in data && data.contents != undefined) { + this.contents = data.contents; + } + if ("toolCalls" in data && data.toolCalls != undefined) { + this.toolCalls = data.toolCalls; + } + } + } + get role() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set role(value: string) { + pb_1.Message.setField(this, 1, value); + } + get contents() { + return pb_1.Message.getRepeatedWrapperField(this, Content, 2) as Content[]; + } + set contents(value: Content[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get toolCalls() { + return pb_1.Message.getRepeatedWrapperField(this, ToolCall, 3) as ToolCall[]; + } + set toolCalls(value: ToolCall[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + role?: string; + contents?: ReturnType[]; + toolCalls?: ReturnType[]; + }): Message { + const message = new Message({}); + if (data.role != null) { + message.role = data.role; + } + if (data.contents != null) { + message.contents = data.contents.map(item => Content.fromObject(item)); + } + if (data.toolCalls != null) { + message.toolCalls = data.toolCalls.map(item => ToolCall.fromObject(item)); + } + return message; + } + toObject() { + const data: { + role?: string; + contents?: ReturnType[]; + toolCalls?: ReturnType[]; + } = {}; + if (this.role != null) { + data.role = this.role; + } + if (this.contents != null) { + data.contents = this.contents.map((item: Content) => item.toObject()); + } + if (this.toolCalls != null) { + data.toolCalls = this.toolCalls.map((item: ToolCall) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.role.length) + writer.writeString(1, this.role); + if (this.contents.length) + writer.writeRepeatedMessage(2, this.contents, (item: Content) => item.serialize(writer)); + if (this.toolCalls.length) + writer.writeRepeatedMessage(3, this.toolCalls, (item: ToolCall) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Message { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Message(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.role = reader.readString(); + break; + case 2: + reader.readMessage(message.contents, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Content.deserialize(reader), Content)); + break; + case 3: + reader.readMessage(message.toolCalls, () => pb_1.Message.addToRepeatedWrapperField(message, 3, ToolCall.deserialize(reader), ToolCall)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Message { + return Message.deserialize(bytes); + } +} +export class ToolCall extends pb_1.Message { + #one_of_decls: number[][] = [[3]]; + constructor(data?: any[] | ({ + id?: string; + type?: string; + } & (({ + function?: FunctionCall; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("function" in data && data.function != undefined) { + this.function = data.function; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set type(value: string) { + pb_1.Message.setField(this, 2, value); + } + get function() { + return pb_1.Message.getWrapperField(this, FunctionCall, 3) as FunctionCall; + } + set function(value: FunctionCall) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_function() { + return pb_1.Message.getField(this, 3) != null; + } + get _function() { + const cases: { + [index: number]: "none" | "function"; + } = { + 0: "none", + 3: "function" + }; + return cases[pb_1.Message.computeOneofCase(this, [3])]; + } + static fromObject(data: { + id?: string; + type?: string; + function?: ReturnType; + }): ToolCall { + const message = new ToolCall({}); + if (data.id != null) { + message.id = data.id; + } + if (data.type != null) { + message.type = data.type; + } + if (data.function != null) { + message.function = FunctionCall.fromObject(data.function); + } + return message; + } + toObject() { + const data: { + id?: string; + type?: string; + function?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.type != null) { + data.type = this.type; + } + if (this.function != null) { + data.function = this.function.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id.length) + writer.writeString(1, this.id); + if (this.type.length) + writer.writeString(2, this.type); + if (this.has_function) + writer.writeMessage(3, this.function, () => this.function.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ToolCall { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ToolCall(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readString(); + break; + case 2: + message.type = reader.readString(); + break; + case 3: + reader.readMessage(message.function, () => message.function = FunctionCall.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ToolCall { + return ToolCall.deserialize(bytes); + } +} +export class FunctionCall extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + arguments?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("arguments" in data && data.arguments != undefined) { + this.arguments = data.arguments; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get arguments() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set arguments(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + name?: string; + arguments?: string; + }): FunctionCall { + const message = new FunctionCall({}); + if (data.name != null) { + message.name = data.name; + } + if (data.arguments != null) { + message.arguments = data.arguments; + } + return message; + } + toObject() { + const data: { + name?: string; + arguments?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.arguments != null) { + data.arguments = this.arguments; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.name.length) + writer.writeString(1, this.name); + if (this.arguments.length) + writer.writeString(2, this.arguments); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FunctionCall { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FunctionCall(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.arguments = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FunctionCall { + return FunctionCall.deserialize(bytes); + } +} +export class Knowledge extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + description?: string; + visibility?: string; + language?: string; + embeddingModelProviderId?: string; + embeddingModelProviderName?: string; + knowledgeEmbeddingModelOptions?: Metadata[]; + status?: string; + createdBy?: string; + createdUser?: User; + updatedBy?: string; + updatedUser?: User; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + organizationId?: string; + projectId?: string; + organization?: Organization; + knowledgeTag?: Tag; + documentCount?: number; + tokenCount?: number; + wordCount?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [8], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("visibility" in data && data.visibility != undefined) { + this.visibility = data.visibility; + } + if ("language" in data && data.language != undefined) { + this.language = data.language; + } + if ("embeddingModelProviderId" in data && data.embeddingModelProviderId != undefined) { + this.embeddingModelProviderId = data.embeddingModelProviderId; + } + if ("embeddingModelProviderName" in data && data.embeddingModelProviderName != undefined) { + this.embeddingModelProviderName = data.embeddingModelProviderName; + } + if ("knowledgeEmbeddingModelOptions" in data && data.knowledgeEmbeddingModelOptions != undefined) { + this.knowledgeEmbeddingModelOptions = data.knowledgeEmbeddingModelOptions; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("createdUser" in data && data.createdUser != undefined) { + this.createdUser = data.createdUser; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("updatedUser" in data && data.updatedUser != undefined) { + this.updatedUser = data.updatedUser; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organization" in data && data.organization != undefined) { + this.organization = data.organization; + } + if ("knowledgeTag" in data && data.knowledgeTag != undefined) { + this.knowledgeTag = data.knowledgeTag; + } + if ("documentCount" in data && data.documentCount != undefined) { + this.documentCount = data.documentCount; + } + if ("tokenCount" in data && data.tokenCount != undefined) { + this.tokenCount = data.tokenCount; + } + if ("wordCount" in data && data.wordCount != undefined) { + this.wordCount = data.wordCount; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get visibility() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set visibility(value: string) { + pb_1.Message.setField(this, 4, value); + } + get language() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set language(value: string) { + pb_1.Message.setField(this, 5, value); + } + get embeddingModelProviderId() { + return pb_1.Message.getFieldWithDefault(this, 6, "0") as string; + } + set embeddingModelProviderId(value: string) { + pb_1.Message.setField(this, 6, value); + } + get embeddingModelProviderName() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set embeddingModelProviderName(value: string) { + pb_1.Message.setField(this, 7, value); + } + get knowledgeEmbeddingModelOptions() { + return pb_1.Message.getRepeatedWrapperField(this, Metadata, 8) as Metadata[]; + } + set knowledgeEmbeddingModelOptions(value: Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 8, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 12, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 13, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 13, value); + } + get createdUser() { + return pb_1.Message.getWrapperField(this, User, 14) as User; + } + set createdUser(value: User) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_createdUser() { + return pb_1.Message.getField(this, 14) != null; + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 15, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 15, value); + } + get updatedUser() { + return pb_1.Message.getWrapperField(this, User, 16) as User; + } + set updatedUser(value: User) { + pb_1.Message.setWrapperField(this, 16, value); + } + get has_updatedUser() { + return pb_1.Message.getField(this, 16) != null; + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 17) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 17, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 17) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 18) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 18, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 18) != null; + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 19, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 19, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 20, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 20, value); + } + get organization() { + return pb_1.Message.getWrapperField(this, Organization, 21) as Organization; + } + set organization(value: Organization) { + pb_1.Message.setWrapperField(this, 21, value); + } + get has_organization() { + return pb_1.Message.getField(this, 21) != null; + } + get knowledgeTag() { + return pb_1.Message.getWrapperField(this, Tag, 22) as Tag; + } + set knowledgeTag(value: Tag) { + pb_1.Message.setWrapperField(this, 22, value); + } + get has_knowledgeTag() { + return pb_1.Message.getField(this, 22) != null; + } + get documentCount() { + return pb_1.Message.getFieldWithDefault(this, 23, 0) as number; + } + set documentCount(value: number) { + pb_1.Message.setField(this, 23, value); + } + get tokenCount() { + return pb_1.Message.getFieldWithDefault(this, 24, 0) as number; + } + set tokenCount(value: number) { + pb_1.Message.setField(this, 24, value); + } + get wordCount() { + return pb_1.Message.getFieldWithDefault(this, 25, 0) as number; + } + set wordCount(value: number) { + pb_1.Message.setField(this, 25, value); + } + static fromObject(data: { + id?: string; + name?: string; + description?: string; + visibility?: string; + language?: string; + embeddingModelProviderId?: string; + embeddingModelProviderName?: string; + knowledgeEmbeddingModelOptions?: ReturnType[]; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + organizationId?: string; + projectId?: string; + organization?: ReturnType; + knowledgeTag?: ReturnType; + documentCount?: number; + tokenCount?: number; + wordCount?: number; + }): Knowledge { + const message = new Knowledge({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.visibility != null) { + message.visibility = data.visibility; + } + if (data.language != null) { + message.language = data.language; + } + if (data.embeddingModelProviderId != null) { + message.embeddingModelProviderId = data.embeddingModelProviderId; + } + if (data.embeddingModelProviderName != null) { + message.embeddingModelProviderName = data.embeddingModelProviderName; + } + if (data.knowledgeEmbeddingModelOptions != null) { + message.knowledgeEmbeddingModelOptions = data.knowledgeEmbeddingModelOptions.map(item => Metadata.fromObject(item)); + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.createdUser != null) { + message.createdUser = User.fromObject(data.createdUser); + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.updatedUser != null) { + message.updatedUser = User.fromObject(data.updatedUser); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organization != null) { + message.organization = Organization.fromObject(data.organization); + } + if (data.knowledgeTag != null) { + message.knowledgeTag = Tag.fromObject(data.knowledgeTag); + } + if (data.documentCount != null) { + message.documentCount = data.documentCount; + } + if (data.tokenCount != null) { + message.tokenCount = data.tokenCount; + } + if (data.wordCount != null) { + message.wordCount = data.wordCount; + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + description?: string; + visibility?: string; + language?: string; + embeddingModelProviderId?: string; + embeddingModelProviderName?: string; + knowledgeEmbeddingModelOptions?: ReturnType[]; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + organizationId?: string; + projectId?: string; + organization?: ReturnType; + knowledgeTag?: ReturnType; + documentCount?: number; + tokenCount?: number; + wordCount?: number; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.visibility != null) { + data.visibility = this.visibility; + } + if (this.language != null) { + data.language = this.language; + } + if (this.embeddingModelProviderId != null) { + data.embeddingModelProviderId = this.embeddingModelProviderId; + } + if (this.embeddingModelProviderName != null) { + data.embeddingModelProviderName = this.embeddingModelProviderName; + } + if (this.knowledgeEmbeddingModelOptions != null) { + data.knowledgeEmbeddingModelOptions = this.knowledgeEmbeddingModelOptions.map((item: Metadata) => item.toObject()); + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.createdUser != null) { + data.createdUser = this.createdUser.toObject(); + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.updatedUser != null) { + data.updatedUser = this.updatedUser.toObject(); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organization != null) { + data.organization = this.organization.toObject(); + } + if (this.knowledgeTag != null) { + data.knowledgeTag = this.knowledgeTag.toObject(); + } + if (this.documentCount != null) { + data.documentCount = this.documentCount; + } + if (this.tokenCount != null) { + data.tokenCount = this.tokenCount; + } + if (this.wordCount != null) { + data.wordCount = this.wordCount; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.visibility.length) + writer.writeString(4, this.visibility); + if (this.language.length) + writer.writeString(5, this.language); + if (this.embeddingModelProviderId != "0") + writer.writeUint64String(6, this.embeddingModelProviderId); + if (this.embeddingModelProviderName.length) + writer.writeString(7, this.embeddingModelProviderName); + if (this.knowledgeEmbeddingModelOptions.length) + writer.writeRepeatedMessage(8, this.knowledgeEmbeddingModelOptions, (item: Metadata) => item.serialize(writer)); + if (this.status.length) + writer.writeString(12, this.status); + if (this.createdBy != "0") + writer.writeUint64String(13, this.createdBy); + if (this.has_createdUser) + writer.writeMessage(14, this.createdUser, () => this.createdUser.serialize(writer)); + if (this.updatedBy != "0") + writer.writeUint64String(15, this.updatedBy); + if (this.has_updatedUser) + writer.writeMessage(16, this.updatedUser, () => this.updatedUser.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(17, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(18, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.organizationId != "0") + writer.writeUint64String(19, this.organizationId); + if (this.projectId != "0") + writer.writeUint64String(20, this.projectId); + if (this.has_organization) + writer.writeMessage(21, this.organization, () => this.organization.serialize(writer)); + if (this.has_knowledgeTag) + writer.writeMessage(22, this.knowledgeTag, () => this.knowledgeTag.serialize(writer)); + if (this.documentCount != 0) + writer.writeUint32(23, this.documentCount); + if (this.tokenCount != 0) + writer.writeUint32(24, this.tokenCount); + if (this.wordCount != 0) + writer.writeUint32(25, this.wordCount); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Knowledge { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Knowledge(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.visibility = reader.readString(); + break; + case 5: + message.language = reader.readString(); + break; + case 6: + message.embeddingModelProviderId = reader.readUint64String(); + break; + case 7: + message.embeddingModelProviderName = reader.readString(); + break; + case 8: + reader.readMessage(message.knowledgeEmbeddingModelOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 8, Metadata.deserialize(reader), Metadata)); + break; + case 12: + message.status = reader.readString(); + break; + case 13: + message.createdBy = reader.readUint64String(); + break; + case 14: + reader.readMessage(message.createdUser, () => message.createdUser = User.deserialize(reader)); + break; + case 15: + message.updatedBy = reader.readUint64String(); + break; + case 16: + reader.readMessage(message.updatedUser, () => message.updatedUser = User.deserialize(reader)); + break; + case 17: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 18: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 19: + message.organizationId = reader.readUint64String(); + break; + case 20: + message.projectId = reader.readUint64String(); + break; + case 21: + reader.readMessage(message.organization, () => message.organization = Organization.deserialize(reader)); + break; + case 22: + reader.readMessage(message.knowledgeTag, () => message.knowledgeTag = Tag.deserialize(reader)); + break; + case 23: + message.documentCount = reader.readUint32(); + break; + case 24: + message.tokenCount = reader.readUint32(); + break; + case 25: + message.wordCount = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Knowledge { + return Knowledge.deserialize(bytes); + } +} +export class TextPrompt extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + role?: string; + content?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("role" in data && data.role != undefined) { + this.role = data.role; + } + if ("content" in data && data.content != undefined) { + this.content = data.content; + } + } + } + get role() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set role(value: string) { + pb_1.Message.setField(this, 1, value); + } + get content() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set content(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + role?: string; + content?: string; + }): TextPrompt { + const message = new TextPrompt({}); + if (data.role != null) { + message.role = data.role; + } + if (data.content != null) { + message.content = data.content; + } + return message; + } + toObject() { + const data: { + role?: string; + content?: string; + } = {}; + if (this.role != null) { + data.role = this.role; + } + if (this.content != null) { + data.content = this.content; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.role.length) + writer.writeString(1, this.role); + if (this.content.length) + writer.writeString(2, this.content); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TextPrompt { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TextPrompt(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.role = reader.readString(); + break; + case 2: + message.content = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TextPrompt { + return TextPrompt.deserialize(bytes); + } +} +export class TextChatCompletePrompt extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + prompt?: TextPrompt[]; + promptVariables?: Variable[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("prompt" in data && data.prompt != undefined) { + this.prompt = data.prompt; + } + if ("promptVariables" in data && data.promptVariables != undefined) { + this.promptVariables = data.promptVariables; + } + } + } + get prompt() { + return pb_1.Message.getRepeatedWrapperField(this, TextPrompt, 1) as TextPrompt[]; + } + set prompt(value: TextPrompt[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get promptVariables() { + return pb_1.Message.getRepeatedWrapperField(this, Variable, 2) as Variable[]; + } + set promptVariables(value: Variable[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + prompt?: ReturnType[]; + promptVariables?: ReturnType[]; + }): TextChatCompletePrompt { + const message = new TextChatCompletePrompt({}); + if (data.prompt != null) { + message.prompt = data.prompt.map(item => TextPrompt.fromObject(item)); + } + if (data.promptVariables != null) { + message.promptVariables = data.promptVariables.map(item => Variable.fromObject(item)); + } + return message; + } + toObject() { + const data: { + prompt?: ReturnType[]; + promptVariables?: ReturnType[]; + } = {}; + if (this.prompt != null) { + data.prompt = this.prompt.map((item: TextPrompt) => item.toObject()); + } + if (this.promptVariables != null) { + data.promptVariables = this.promptVariables.map((item: Variable) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.prompt.length) + writer.writeRepeatedMessage(1, this.prompt, (item: TextPrompt) => item.serialize(writer)); + if (this.promptVariables.length) + writer.writeRepeatedMessage(2, this.promptVariables, (item: Variable) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TextChatCompletePrompt { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TextChatCompletePrompt(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.prompt, () => pb_1.Message.addToRepeatedWrapperField(message, 1, TextPrompt.deserialize(reader), TextPrompt)); + break; + case 2: + reader.readMessage(message.promptVariables, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Variable.deserialize(reader), Variable)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TextChatCompletePrompt { + return TextChatCompletePrompt.deserialize(bytes); + } +} +export class AssistantMessageStage extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + stage?: string; + additionalData?: Map; + timetaken?: number; + lifecycleId?: string; + startTimestamp?: dependency_1.google.protobuf.Timestamp; + endTimestamp?: dependency_1.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("stage" in data && data.stage != undefined) { + this.stage = data.stage; + } + if ("additionalData" in data && data.additionalData != undefined) { + this.additionalData = data.additionalData; + } + if ("timetaken" in data && data.timetaken != undefined) { + this.timetaken = data.timetaken; + } + if ("lifecycleId" in data && data.lifecycleId != undefined) { + this.lifecycleId = data.lifecycleId; + } + if ("startTimestamp" in data && data.startTimestamp != undefined) { + this.startTimestamp = data.startTimestamp; + } + if ("endTimestamp" in data && data.endTimestamp != undefined) { + this.endTimestamp = data.endTimestamp; + } + } + if (!this.additionalData) + this.additionalData = new Map(); + } + get stage() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set stage(value: string) { + pb_1.Message.setField(this, 1, value); + } + get additionalData() { + return pb_1.Message.getField(this, 2) as any as Map; + } + set additionalData(value: Map) { + pb_1.Message.setField(this, 2, value as any); + } + get timetaken() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set timetaken(value: number) { + pb_1.Message.setField(this, 3, value); + } + get lifecycleId() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set lifecycleId(value: string) { + pb_1.Message.setField(this, 4, value); + } + get startTimestamp() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 5) as dependency_1.google.protobuf.Timestamp; + } + set startTimestamp(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_startTimestamp() { + return pb_1.Message.getField(this, 5) != null; + } + get endTimestamp() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 6) as dependency_1.google.protobuf.Timestamp; + } + set endTimestamp(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_endTimestamp() { + return pb_1.Message.getField(this, 6) != null; + } + static fromObject(data: { + stage?: string; + additionalData?: { + [key: string]: string; + }; + timetaken?: number; + lifecycleId?: string; + startTimestamp?: ReturnType; + endTimestamp?: ReturnType; + }): AssistantMessageStage { + const message = new AssistantMessageStage({}); + if (data.stage != null) { + message.stage = data.stage; + } + if (typeof data.additionalData == "object") { + message.additionalData = new Map(Object.entries(data.additionalData)); + } + if (data.timetaken != null) { + message.timetaken = data.timetaken; + } + if (data.lifecycleId != null) { + message.lifecycleId = data.lifecycleId; + } + if (data.startTimestamp != null) { + message.startTimestamp = dependency_1.google.protobuf.Timestamp.fromObject(data.startTimestamp); + } + if (data.endTimestamp != null) { + message.endTimestamp = dependency_1.google.protobuf.Timestamp.fromObject(data.endTimestamp); + } + return message; + } + toObject() { + const data: { + stage?: string; + additionalData?: { + [key: string]: string; + }; + timetaken?: number; + lifecycleId?: string; + startTimestamp?: ReturnType; + endTimestamp?: ReturnType; + } = {}; + if (this.stage != null) { + data.stage = this.stage; + } + if (this.additionalData != null) { + data.additionalData = (Object.fromEntries)(this.additionalData); + } + if (this.timetaken != null) { + data.timetaken = this.timetaken; + } + if (this.lifecycleId != null) { + data.lifecycleId = this.lifecycleId; + } + if (this.startTimestamp != null) { + data.startTimestamp = this.startTimestamp.toObject(); + } + if (this.endTimestamp != null) { + data.endTimestamp = this.endTimestamp.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.stage.length) + writer.writeString(1, this.stage); + for (const [key, value] of this.additionalData) { + writer.writeMessage(2, this.additionalData, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (this.timetaken != 0) + writer.writeUint64(3, this.timetaken); + if (this.lifecycleId.length) + writer.writeString(4, this.lifecycleId); + if (this.has_startTimestamp) + writer.writeMessage(5, this.startTimestamp, () => this.startTimestamp.serialize(writer)); + if (this.has_endTimestamp) + writer.writeMessage(6, this.endTimestamp, () => this.endTimestamp.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantMessageStage { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantMessageStage(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.stage = reader.readString(); + break; + case 2: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.additionalData as any, reader, reader.readString, reader.readString)); + break; + case 3: + message.timetaken = reader.readUint64(); + break; + case 4: + message.lifecycleId = reader.readString(); + break; + case 5: + reader.readMessage(message.startTimestamp, () => message.startTimestamp = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 6: + reader.readMessage(message.endTimestamp, () => message.endTimestamp = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantMessageStage { + return AssistantMessageStage.deserialize(bytes); + } +} +export class AssistantConversationMessage extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + messageId?: string; + assistantConversationId?: string; + request?: Message; + response?: Message; + source?: string; + metrics?: Metric[]; + status?: string; + createdBy?: string; + updatedBy?: string; + suggestedQuestions?: string[]; + stages?: AssistantMessageStage[]; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + assistantId?: string; + assistantProviderModelId?: string; + metadata?: Metadata[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [10, 14, 15, 31], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("messageId" in data && data.messageId != undefined) { + this.messageId = data.messageId; + } + if ("assistantConversationId" in data && data.assistantConversationId != undefined) { + this.assistantConversationId = data.assistantConversationId; + } + if ("request" in data && data.request != undefined) { + this.request = data.request; + } + if ("response" in data && data.response != undefined) { + this.response = data.response; + } + if ("source" in data && data.source != undefined) { + this.source = data.source; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("suggestedQuestions" in data && data.suggestedQuestions != undefined) { + this.suggestedQuestions = data.suggestedQuestions; + } + if ("stages" in data && data.stages != undefined) { + this.stages = data.stages; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("assistantProviderModelId" in data && data.assistantProviderModelId != undefined) { + this.assistantProviderModelId = data.assistantProviderModelId; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get messageId() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set messageId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get assistantConversationId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantConversationId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get request() { + return pb_1.Message.getWrapperField(this, Message, 5) as Message; + } + set request(value: Message) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_request() { + return pb_1.Message.getField(this, 5) != null; + } + get response() { + return pb_1.Message.getWrapperField(this, Message, 7) as Message; + } + set response(value: Message) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_response() { + return pb_1.Message.getField(this, 7) != null; + } + get source() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set source(value: string) { + pb_1.Message.setField(this, 9, value); + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, Metric, 10) as Metric[]; + } + set metrics(value: Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 10, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 11, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 12, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 12, value); + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 13, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 13, value); + } + get suggestedQuestions() { + return pb_1.Message.getFieldWithDefault(this, 14, []) as string[]; + } + set suggestedQuestions(value: string[]) { + pb_1.Message.setField(this, 14, value); + } + get stages() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantMessageStage, 15) as AssistantMessageStage[]; + } + set stages(value: AssistantMessageStage[]) { + pb_1.Message.setRepeatedWrapperField(this, 15, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 28, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 28, value); + } + get assistantProviderModelId() { + return pb_1.Message.getFieldWithDefault(this, 29, "0") as string; + } + set assistantProviderModelId(value: string) { + pb_1.Message.setField(this, 29, value); + } + get metadata() { + return pb_1.Message.getRepeatedWrapperField(this, Metadata, 31) as Metadata[]; + } + set metadata(value: Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 31, value); + } + static fromObject(data: { + id?: string; + messageId?: string; + assistantConversationId?: string; + request?: ReturnType; + response?: ReturnType; + source?: string; + metrics?: ReturnType[]; + status?: string; + createdBy?: string; + updatedBy?: string; + suggestedQuestions?: string[]; + stages?: ReturnType[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + assistantId?: string; + assistantProviderModelId?: string; + metadata?: ReturnType[]; + }): AssistantConversationMessage { + const message = new AssistantConversationMessage({}); + if (data.id != null) { + message.id = data.id; + } + if (data.messageId != null) { + message.messageId = data.messageId; + } + if (data.assistantConversationId != null) { + message.assistantConversationId = data.assistantConversationId; + } + if (data.request != null) { + message.request = Message.fromObject(data.request); + } + if (data.response != null) { + message.response = Message.fromObject(data.response); + } + if (data.source != null) { + message.source = data.source; + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => Metric.fromObject(item)); + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.suggestedQuestions != null) { + message.suggestedQuestions = data.suggestedQuestions; + } + if (data.stages != null) { + message.stages = data.stages.map(item => AssistantMessageStage.fromObject(item)); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.assistantProviderModelId != null) { + message.assistantProviderModelId = data.assistantProviderModelId; + } + if (data.metadata != null) { + message.metadata = data.metadata.map(item => Metadata.fromObject(item)); + } + return message; + } + toObject() { + const data: { + id?: string; + messageId?: string; + assistantConversationId?: string; + request?: ReturnType; + response?: ReturnType; + source?: string; + metrics?: ReturnType[]; + status?: string; + createdBy?: string; + updatedBy?: string; + suggestedQuestions?: string[]; + stages?: ReturnType[]; + createdDate?: ReturnType; + updatedDate?: ReturnType; + assistantId?: string; + assistantProviderModelId?: string; + metadata?: ReturnType[]; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.messageId != null) { + data.messageId = this.messageId; + } + if (this.assistantConversationId != null) { + data.assistantConversationId = this.assistantConversationId; + } + if (this.request != null) { + data.request = this.request.toObject(); + } + if (this.response != null) { + data.response = this.response.toObject(); + } + if (this.source != null) { + data.source = this.source; + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: Metric) => item.toObject()); + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.suggestedQuestions != null) { + data.suggestedQuestions = this.suggestedQuestions; + } + if (this.stages != null) { + data.stages = this.stages.map((item: AssistantMessageStage) => item.toObject()); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.assistantProviderModelId != null) { + data.assistantProviderModelId = this.assistantProviderModelId; + } + if (this.metadata != null) { + data.metadata = this.metadata.map((item: Metadata) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.messageId.length) + writer.writeString(3, this.messageId); + if (this.assistantConversationId != "0") + writer.writeUint64String(2, this.assistantConversationId); + if (this.has_request) + writer.writeMessage(5, this.request, () => this.request.serialize(writer)); + if (this.has_response) + writer.writeMessage(7, this.response, () => this.response.serialize(writer)); + if (this.source.length) + writer.writeString(9, this.source); + if (this.metrics.length) + writer.writeRepeatedMessage(10, this.metrics, (item: Metric) => item.serialize(writer)); + if (this.status.length) + writer.writeString(11, this.status); + if (this.createdBy != "0") + writer.writeUint64String(12, this.createdBy); + if (this.updatedBy != "0") + writer.writeUint64String(13, this.updatedBy); + if (this.suggestedQuestions.length) + writer.writeRepeatedString(14, this.suggestedQuestions); + if (this.stages.length) + writer.writeRepeatedMessage(15, this.stages, (item: AssistantMessageStage) => item.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.assistantId != "0") + writer.writeUint64String(28, this.assistantId); + if (this.assistantProviderModelId != "0") + writer.writeUint64String(29, this.assistantProviderModelId); + if (this.metadata.length) + writer.writeRepeatedMessage(31, this.metadata, (item: Metadata) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantConversationMessage { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantConversationMessage(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 3: + message.messageId = reader.readString(); + break; + case 2: + message.assistantConversationId = reader.readUint64String(); + break; + case 5: + reader.readMessage(message.request, () => message.request = Message.deserialize(reader)); + break; + case 7: + reader.readMessage(message.response, () => message.response = Message.deserialize(reader)); + break; + case 9: + message.source = reader.readString(); + break; + case 10: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 10, Metric.deserialize(reader), Metric)); + break; + case 11: + message.status = reader.readString(); + break; + case 12: + message.createdBy = reader.readUint64String(); + break; + case 13: + message.updatedBy = reader.readUint64String(); + break; + case 14: + pb_1.Message.addToRepeatedField(message, 14, reader.readString()); + break; + case 15: + reader.readMessage(message.stages, () => pb_1.Message.addToRepeatedWrapperField(message, 15, AssistantMessageStage.deserialize(reader), AssistantMessageStage)); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 28: + message.assistantId = reader.readUint64String(); + break; + case 29: + message.assistantProviderModelId = reader.readUint64String(); + break; + case 31: + reader.readMessage(message.metadata, () => pb_1.Message.addToRepeatedWrapperField(message, 31, Metadata.deserialize(reader), Metadata)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantConversationMessage { + return AssistantConversationMessage.deserialize(bytes); + } +} +export class AssistantConversationContext extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + metadata?: dependency_2.google.protobuf.Struct; + result?: dependency_2.google.protobuf.Struct; + query?: dependency_2.google.protobuf.Struct; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + if ("query" in data && data.query != undefined) { + this.query = data.query; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get metadata() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Struct, 3) as dependency_2.google.protobuf.Struct; + } + set metadata(value: dependency_2.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_metadata() { + return pb_1.Message.getField(this, 3) != null; + } + get result() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Struct, 4) as dependency_2.google.protobuf.Struct; + } + set result(value: dependency_2.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_result() { + return pb_1.Message.getField(this, 4) != null; + } + get query() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Struct, 5) as dependency_2.google.protobuf.Struct; + } + set query(value: dependency_2.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_query() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + id?: string; + metadata?: ReturnType; + result?: ReturnType; + query?: ReturnType; + }): AssistantConversationContext { + const message = new AssistantConversationContext({}); + if (data.id != null) { + message.id = data.id; + } + if (data.metadata != null) { + message.metadata = dependency_2.google.protobuf.Struct.fromObject(data.metadata); + } + if (data.result != null) { + message.result = dependency_2.google.protobuf.Struct.fromObject(data.result); + } + if (data.query != null) { + message.query = dependency_2.google.protobuf.Struct.fromObject(data.query); + } + return message; + } + toObject() { + const data: { + id?: string; + metadata?: ReturnType; + result?: ReturnType; + query?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.metadata != null) { + data.metadata = this.metadata.toObject(); + } + if (this.result != null) { + data.result = this.result.toObject(); + } + if (this.query != null) { + data.query = this.query.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.has_metadata) + writer.writeMessage(3, this.metadata, () => this.metadata.serialize(writer)); + if (this.has_result) + writer.writeMessage(4, this.result, () => this.result.serialize(writer)); + if (this.has_query) + writer.writeMessage(5, this.query, () => this.query.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantConversationContext { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantConversationContext(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 3: + reader.readMessage(message.metadata, () => message.metadata = dependency_2.google.protobuf.Struct.deserialize(reader)); + break; + case 4: + reader.readMessage(message.result, () => message.result = dependency_2.google.protobuf.Struct.deserialize(reader)); + break; + case 5: + reader.readMessage(message.query, () => message.query = dependency_2.google.protobuf.Struct.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantConversationContext { + return AssistantConversationContext.deserialize(bytes); + } +} +export class AssistantConversationRecording extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + recordingUrl?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("recordingUrl" in data && data.recordingUrl != undefined) { + this.recordingUrl = data.recordingUrl; + } + } + } + get recordingUrl() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set recordingUrl(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + recordingUrl?: string; + }): AssistantConversationRecording { + const message = new AssistantConversationRecording({}); + if (data.recordingUrl != null) { + message.recordingUrl = data.recordingUrl; + } + return message; + } + toObject() { + const data: { + recordingUrl?: string; + } = {}; + if (this.recordingUrl != null) { + data.recordingUrl = this.recordingUrl; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.recordingUrl.length) + writer.writeString(1, this.recordingUrl); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantConversationRecording { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantConversationRecording(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.recordingUrl = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantConversationRecording { + return AssistantConversationRecording.deserialize(bytes); + } +} +export class AssistantConversation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + userId?: string; + assistantId?: string; + name?: string; + projectId?: string; + organizationId?: string; + source?: string; + createdBy?: string; + updatedBy?: string; + user?: User; + assistantProviderModelId?: string; + assistantConversationMessage?: AssistantConversationMessage[]; + identifier?: string; + status?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + contexts?: AssistantConversationContext[]; + metrics?: Metric[]; + metadata?: Metadata[]; + arguments?: Argument[]; + options?: Metadata[]; + direction?: string; + recordings?: AssistantConversationRecording[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [13, 28, 30, 32, 31, 33, 35], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("userId" in data && data.userId != undefined) { + this.userId = data.userId; + } + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("source" in data && data.source != undefined) { + this.source = data.source; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("user" in data && data.user != undefined) { + this.user = data.user; + } + if ("assistantProviderModelId" in data && data.assistantProviderModelId != undefined) { + this.assistantProviderModelId = data.assistantProviderModelId; + } + if ("assistantConversationMessage" in data && data.assistantConversationMessage != undefined) { + this.assistantConversationMessage = data.assistantConversationMessage; + } + if ("identifier" in data && data.identifier != undefined) { + this.identifier = data.identifier; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("contexts" in data && data.contexts != undefined) { + this.contexts = data.contexts; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("arguments" in data && data.arguments != undefined) { + this.arguments = data.arguments; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + if ("direction" in data && data.direction != undefined) { + this.direction = data.direction; + } + if ("recordings" in data && data.recordings != undefined) { + this.recordings = data.recordings; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get userId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set userId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 4, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 5, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 6, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 6, value); + } + get source() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set source(value: string) { + pb_1.Message.setField(this, 7, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 8, value); + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 9, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 9, value); + } + get user() { + return pb_1.Message.getWrapperField(this, User, 10) as User; + } + set user(value: User) { + pb_1.Message.setWrapperField(this, 10, value); + } + get has_user() { + return pb_1.Message.getField(this, 10) != null; + } + get assistantProviderModelId() { + return pb_1.Message.getFieldWithDefault(this, 12, "0") as string; + } + set assistantProviderModelId(value: string) { + pb_1.Message.setField(this, 12, value); + } + get assistantConversationMessage() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantConversationMessage, 13) as AssistantConversationMessage[]; + } + set assistantConversationMessage(value: AssistantConversationMessage[]) { + pb_1.Message.setRepeatedWrapperField(this, 13, value); + } + get identifier() { + return pb_1.Message.getFieldWithDefault(this, 14, "") as string; + } + set identifier(value: string) { + pb_1.Message.setField(this, 14, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 15, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 15, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + get contexts() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantConversationContext, 28) as AssistantConversationContext[]; + } + set contexts(value: AssistantConversationContext[]) { + pb_1.Message.setRepeatedWrapperField(this, 28, value); + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, Metric, 30) as Metric[]; + } + set metrics(value: Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 30, value); + } + get metadata() { + return pb_1.Message.getRepeatedWrapperField(this, Metadata, 32) as Metadata[]; + } + set metadata(value: Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 32, value); + } + get arguments() { + return pb_1.Message.getRepeatedWrapperField(this, Argument, 31) as Argument[]; + } + set arguments(value: Argument[]) { + pb_1.Message.setRepeatedWrapperField(this, 31, value); + } + get options() { + return pb_1.Message.getRepeatedWrapperField(this, Metadata, 33) as Metadata[]; + } + set options(value: Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 33, value); + } + get direction() { + return pb_1.Message.getFieldWithDefault(this, 34, "") as string; + } + set direction(value: string) { + pb_1.Message.setField(this, 34, value); + } + get recordings() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantConversationRecording, 35) as AssistantConversationRecording[]; + } + set recordings(value: AssistantConversationRecording[]) { + pb_1.Message.setRepeatedWrapperField(this, 35, value); + } + static fromObject(data: { + id?: string; + userId?: string; + assistantId?: string; + name?: string; + projectId?: string; + organizationId?: string; + source?: string; + createdBy?: string; + updatedBy?: string; + user?: ReturnType; + assistantProviderModelId?: string; + assistantConversationMessage?: ReturnType[]; + identifier?: string; + status?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + contexts?: ReturnType[]; + metrics?: ReturnType[]; + metadata?: ReturnType[]; + arguments?: ReturnType[]; + options?: ReturnType[]; + direction?: string; + recordings?: ReturnType[]; + }): AssistantConversation { + const message = new AssistantConversation({}); + if (data.id != null) { + message.id = data.id; + } + if (data.userId != null) { + message.userId = data.userId; + } + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.source != null) { + message.source = data.source; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.user != null) { + message.user = User.fromObject(data.user); + } + if (data.assistantProviderModelId != null) { + message.assistantProviderModelId = data.assistantProviderModelId; + } + if (data.assistantConversationMessage != null) { + message.assistantConversationMessage = data.assistantConversationMessage.map(item => AssistantConversationMessage.fromObject(item)); + } + if (data.identifier != null) { + message.identifier = data.identifier; + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.contexts != null) { + message.contexts = data.contexts.map(item => AssistantConversationContext.fromObject(item)); + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => Metric.fromObject(item)); + } + if (data.metadata != null) { + message.metadata = data.metadata.map(item => Metadata.fromObject(item)); + } + if (data.arguments != null) { + message.arguments = data.arguments.map(item => Argument.fromObject(item)); + } + if (data.options != null) { + message.options = data.options.map(item => Metadata.fromObject(item)); + } + if (data.direction != null) { + message.direction = data.direction; + } + if (data.recordings != null) { + message.recordings = data.recordings.map(item => AssistantConversationRecording.fromObject(item)); + } + return message; + } + toObject() { + const data: { + id?: string; + userId?: string; + assistantId?: string; + name?: string; + projectId?: string; + organizationId?: string; + source?: string; + createdBy?: string; + updatedBy?: string; + user?: ReturnType; + assistantProviderModelId?: string; + assistantConversationMessage?: ReturnType[]; + identifier?: string; + status?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + contexts?: ReturnType[]; + metrics?: ReturnType[]; + metadata?: ReturnType[]; + arguments?: ReturnType[]; + options?: ReturnType[]; + direction?: string; + recordings?: ReturnType[]; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.userId != null) { + data.userId = this.userId; + } + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.source != null) { + data.source = this.source; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.user != null) { + data.user = this.user.toObject(); + } + if (this.assistantProviderModelId != null) { + data.assistantProviderModelId = this.assistantProviderModelId; + } + if (this.assistantConversationMessage != null) { + data.assistantConversationMessage = this.assistantConversationMessage.map((item: AssistantConversationMessage) => item.toObject()); + } + if (this.identifier != null) { + data.identifier = this.identifier; + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.contexts != null) { + data.contexts = this.contexts.map((item: AssistantConversationContext) => item.toObject()); + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: Metric) => item.toObject()); + } + if (this.metadata != null) { + data.metadata = this.metadata.map((item: Metadata) => item.toObject()); + } + if (this.arguments != null) { + data.arguments = this.arguments.map((item: Argument) => item.toObject()); + } + if (this.options != null) { + data.options = this.options.map((item: Metadata) => item.toObject()); + } + if (this.direction != null) { + data.direction = this.direction; + } + if (this.recordings != null) { + data.recordings = this.recordings.map((item: AssistantConversationRecording) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.userId != "0") + writer.writeUint64String(2, this.userId); + if (this.assistantId != "0") + writer.writeUint64String(3, this.assistantId); + if (this.name.length) + writer.writeString(4, this.name); + if (this.projectId != "0") + writer.writeUint64String(5, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(6, this.organizationId); + if (this.source.length) + writer.writeString(7, this.source); + if (this.createdBy != "0") + writer.writeUint64String(8, this.createdBy); + if (this.updatedBy != "0") + writer.writeUint64String(9, this.updatedBy); + if (this.has_user) + writer.writeMessage(10, this.user, () => this.user.serialize(writer)); + if (this.assistantProviderModelId != "0") + writer.writeUint64String(12, this.assistantProviderModelId); + if (this.assistantConversationMessage.length) + writer.writeRepeatedMessage(13, this.assistantConversationMessage, (item: AssistantConversationMessage) => item.serialize(writer)); + if (this.identifier.length) + writer.writeString(14, this.identifier); + if (this.status.length) + writer.writeString(15, this.status); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.contexts.length) + writer.writeRepeatedMessage(28, this.contexts, (item: AssistantConversationContext) => item.serialize(writer)); + if (this.metrics.length) + writer.writeRepeatedMessage(30, this.metrics, (item: Metric) => item.serialize(writer)); + if (this.metadata.length) + writer.writeRepeatedMessage(32, this.metadata, (item: Metadata) => item.serialize(writer)); + if (this.arguments.length) + writer.writeRepeatedMessage(31, this.arguments, (item: Argument) => item.serialize(writer)); + if (this.options.length) + writer.writeRepeatedMessage(33, this.options, (item: Metadata) => item.serialize(writer)); + if (this.direction.length) + writer.writeString(34, this.direction); + if (this.recordings.length) + writer.writeRepeatedMessage(35, this.recordings, (item: AssistantConversationRecording) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantConversation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantConversation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.userId = reader.readUint64String(); + break; + case 3: + message.assistantId = reader.readUint64String(); + break; + case 4: + message.name = reader.readString(); + break; + case 5: + message.projectId = reader.readUint64String(); + break; + case 6: + message.organizationId = reader.readUint64String(); + break; + case 7: + message.source = reader.readString(); + break; + case 8: + message.createdBy = reader.readUint64String(); + break; + case 9: + message.updatedBy = reader.readUint64String(); + break; + case 10: + reader.readMessage(message.user, () => message.user = User.deserialize(reader)); + break; + case 12: + message.assistantProviderModelId = reader.readUint64String(); + break; + case 13: + reader.readMessage(message.assistantConversationMessage, () => pb_1.Message.addToRepeatedWrapperField(message, 13, AssistantConversationMessage.deserialize(reader), AssistantConversationMessage)); + break; + case 14: + message.identifier = reader.readString(); + break; + case 15: + message.status = reader.readString(); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 28: + reader.readMessage(message.contexts, () => pb_1.Message.addToRepeatedWrapperField(message, 28, AssistantConversationContext.deserialize(reader), AssistantConversationContext)); + break; + case 30: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 30, Metric.deserialize(reader), Metric)); + break; + case 32: + reader.readMessage(message.metadata, () => pb_1.Message.addToRepeatedWrapperField(message, 32, Metadata.deserialize(reader), Metadata)); + break; + case 31: + reader.readMessage(message.arguments, () => pb_1.Message.addToRepeatedWrapperField(message, 31, Argument.deserialize(reader), Argument)); + break; + case 33: + reader.readMessage(message.options, () => pb_1.Message.addToRepeatedWrapperField(message, 33, Metadata.deserialize(reader), Metadata)); + break; + case 34: + message.direction = reader.readString(); + break; + case 35: + reader.readMessage(message.recordings, () => pb_1.Message.addToRepeatedWrapperField(message, 35, AssistantConversationRecording.deserialize(reader), AssistantConversationRecording)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantConversation { + return AssistantConversation.deserialize(bytes); + } +} +export class GetAllAssistantConversationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + paginate?: Paginate; + criterias?: Criteria[]; + source?: Source; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("source" in data && data.source != undefined) { + this.source = data.source; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, Paginate, 2) as Paginate; + } + set paginate(value: Paginate) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 2) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, Criteria, 3) as Criteria[]; + } + set criterias(value: Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get source() { + return pb_1.Message.getFieldWithDefault(this, 7, Source.WEB_PLUGIN) as Source; + } + set source(value: Source) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + source?: Source; + }): GetAllAssistantConversationRequest { + const message = new GetAllAssistantConversationRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.paginate != null) { + message.paginate = Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => Criteria.fromObject(item)); + } + if (data.source != null) { + message.source = data.source; + } + return message; + } + toObject() { + const data: { + assistantId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + source?: Source; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: Criteria) => item.toObject()); + } + if (this.source != null) { + data.source = this.source; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.has_paginate) + writer.writeMessage(2, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(3, this.criterias, (item: Criteria) => item.serialize(writer)); + if (this.source != Source.WEB_PLUGIN) + writer.writeEnum(7, this.source); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantConversationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantConversationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.paginate, () => message.paginate = Paginate.deserialize(reader)); + break; + case 3: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Criteria.deserialize(reader), Criteria)); + break; + case 7: + message.source = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantConversationRequest { + return GetAllAssistantConversationRequest.deserialize(bytes); + } +} +export class GetAllAssistantConversationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantConversation[]; + error?: Error; + paginated?: Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantConversation, 3) as AssistantConversation[]; + } + set data(value: AssistantConversation[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, Error, 4) as Error; + } + set error(value: Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, Paginated, 5) as Paginated; + } + set paginated(value: Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllAssistantConversationResponse { + const message = new GetAllAssistantConversationResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => AssistantConversation.fromObject(item)); + } + if (data.error != null) { + message.error = Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: AssistantConversation) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: AssistantConversation) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllAssistantConversationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllAssistantConversationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AssistantConversation.deserialize(reader), AssistantConversation)); + break; + case 4: + reader.readMessage(message.error, () => message.error = Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllAssistantConversationResponse { + return GetAllAssistantConversationResponse.deserialize(bytes); + } +} +export class GetAllConversationMessageRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + assistantConversationId?: string; + paginate?: Paginate; + criterias?: Criteria[]; + order?: Ordering; + source?: Source; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("assistantConversationId" in data && data.assistantConversationId != undefined) { + this.assistantConversationId = data.assistantConversationId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("order" in data && data.order != undefined) { + this.order = data.order; + } + if ("source" in data && data.source != undefined) { + this.source = data.source; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantConversationId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantConversationId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, Paginate, 3) as Paginate; + } + set paginate(value: Paginate) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 3) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, Criteria, 4) as Criteria[]; + } + set criterias(value: Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get order() { + return pb_1.Message.getWrapperField(this, Ordering, 5) as Ordering; + } + set order(value: Ordering) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_order() { + return pb_1.Message.getField(this, 5) != null; + } + get source() { + return pb_1.Message.getFieldWithDefault(this, 7, Source.WEB_PLUGIN) as Source; + } + set source(value: Source) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + assistantId?: string; + assistantConversationId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + order?: ReturnType; + source?: Source; + }): GetAllConversationMessageRequest { + const message = new GetAllConversationMessageRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.assistantConversationId != null) { + message.assistantConversationId = data.assistantConversationId; + } + if (data.paginate != null) { + message.paginate = Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => Criteria.fromObject(item)); + } + if (data.order != null) { + message.order = Ordering.fromObject(data.order); + } + if (data.source != null) { + message.source = data.source; + } + return message; + } + toObject() { + const data: { + assistantId?: string; + assistantConversationId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + order?: ReturnType; + source?: Source; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.assistantConversationId != null) { + data.assistantConversationId = this.assistantConversationId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: Criteria) => item.toObject()); + } + if (this.order != null) { + data.order = this.order.toObject(); + } + if (this.source != null) { + data.source = this.source; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.assistantConversationId != "0") + writer.writeUint64String(2, this.assistantConversationId); + if (this.has_paginate) + writer.writeMessage(3, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(4, this.criterias, (item: Criteria) => item.serialize(writer)); + if (this.has_order) + writer.writeMessage(5, this.order, () => this.order.serialize(writer)); + if (this.source != Source.WEB_PLUGIN) + writer.writeEnum(7, this.source); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllConversationMessageRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllConversationMessageRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + message.assistantConversationId = reader.readUint64String(); + break; + case 3: + reader.readMessage(message.paginate, () => message.paginate = Paginate.deserialize(reader)); + break; + case 4: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 4, Criteria.deserialize(reader), Criteria)); + break; + case 5: + reader.readMessage(message.order, () => message.order = Ordering.deserialize(reader)); + break; + case 7: + message.source = reader.readEnum(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllConversationMessageRequest { + return GetAllConversationMessageRequest.deserialize(bytes); + } +} +export class GetAllConversationMessageResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: AssistantConversationMessage[]; + error?: Error; + paginated?: Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, AssistantConversationMessage, 3) as AssistantConversationMessage[]; + } + set data(value: AssistantConversationMessage[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, Error, 4) as Error; + } + set error(value: Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, Paginated, 5) as Paginated; + } + set paginated(value: Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllConversationMessageResponse { + const message = new GetAllConversationMessageResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => AssistantConversationMessage.fromObject(item)); + } + if (data.error != null) { + message.error = Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: AssistantConversationMessage) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: AssistantConversationMessage) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllConversationMessageResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllConversationMessageResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AssistantConversationMessage.deserialize(reader), AssistantConversationMessage)); + break; + case 4: + reader.readMessage(message.error, () => message.error = Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllConversationMessageResponse { + return GetAllConversationMessageResponse.deserialize(bytes); + } +} diff --git a/src/clients/protos/common_grpc_pb.d.ts b/src/clients/protos/common_grpc_pb.d.ts deleted file mode 100644 index 51b4d69..0000000 --- a/src/clients/protos/common_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/src/clients/protos/common_pb.d.ts b/src/clients/protos/common_pb.d.ts deleted file mode 100644 index ced0cb7..0000000 --- a/src/clients/protos/common_pb.d.ts +++ /dev/null @@ -1,1235 +0,0 @@ -// package: -// file: common.proto - -import * as jspb from "google-protobuf"; -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"; - -export class FieldSelector extends jspb.Message { - getField(): string; - setField(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FieldSelector.AsObject; - static toObject(includeInstance: boolean, msg: FieldSelector): FieldSelector.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FieldSelector, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FieldSelector; - static deserializeBinaryFromReader(message: FieldSelector, reader: jspb.BinaryReader): FieldSelector; -} - -export namespace FieldSelector { - export type AsObject = { - field: string, - } -} - -export class Criteria extends jspb.Message { - getKey(): string; - setKey(value: string): void; - - getValue(): string; - setValue(value: string): void; - - getLogic(): string; - setLogic(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Criteria.AsObject; - static toObject(includeInstance: boolean, msg: Criteria): Criteria.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Criteria, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Criteria; - static deserializeBinaryFromReader(message: Criteria, reader: jspb.BinaryReader): Criteria; -} - -export namespace Criteria { - export type AsObject = { - key: string, - value: string, - logic: string, - } -} - -export class Error extends jspb.Message { - getErrorcode(): string; - setErrorcode(value: string): void; - - getErrormessage(): string; - setErrormessage(value: string): void; - - getHumanmessage(): string; - setHumanmessage(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Error.AsObject; - static toObject(includeInstance: boolean, msg: Error): Error.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Error, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Error; - static deserializeBinaryFromReader(message: Error, reader: jspb.BinaryReader): Error; -} - -export namespace Error { - export type AsObject = { - errorcode: string, - errormessage: string, - humanmessage: string, - } -} - -export class Paginate extends jspb.Message { - getPage(): number; - setPage(value: number): void; - - getPagesize(): number; - setPagesize(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Paginate.AsObject; - static toObject(includeInstance: boolean, msg: Paginate): Paginate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Paginate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Paginate; - static deserializeBinaryFromReader(message: Paginate, reader: jspb.BinaryReader): Paginate; -} - -export namespace Paginate { - export type AsObject = { - page: number, - pagesize: number, - } -} - -export class Paginated extends jspb.Message { - getCurrentpage(): number; - setCurrentpage(value: number): void; - - getTotalitem(): number; - setTotalitem(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Paginated.AsObject; - static toObject(includeInstance: boolean, msg: Paginated): Paginated.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Paginated, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Paginated; - static deserializeBinaryFromReader(message: Paginated, reader: jspb.BinaryReader): Paginated; -} - -export namespace Paginated { - export type AsObject = { - currentpage: number, - totalitem: number, - } -} - -export class Ordering extends jspb.Message { - getColumn(): string; - setColumn(value: string): void; - - getOrder(): string; - setOrder(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Ordering.AsObject; - static toObject(includeInstance: boolean, msg: Ordering): Ordering.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Ordering, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Ordering; - static deserializeBinaryFromReader(message: Ordering, reader: jspb.BinaryReader): Ordering; -} - -export namespace Ordering { - export type AsObject = { - column: string, - order: string, - } -} - -export class User extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getEmail(): string; - setEmail(value: string): void; - - getRole(): string; - setRole(value: string): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getStatus(): string; - setStatus(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): User.AsObject; - static toObject(includeInstance: boolean, msg: User): User.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: User, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): User; - static deserializeBinaryFromReader(message: User, reader: jspb.BinaryReader): User; -} - -export namespace User { - export type AsObject = { - id: string, - name: string, - email: string, - role: string, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - status: string, - } -} - -export class BaseResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getDataMap(): jspb.Map; - clearDataMap(): void; - hasError(): boolean; - clearError(): void; - getError(): Error | undefined; - setError(value?: Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BaseResponse.AsObject; - static toObject(includeInstance: boolean, msg: BaseResponse): BaseResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BaseResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BaseResponse; - static deserializeBinaryFromReader(message: BaseResponse, reader: jspb.BinaryReader): BaseResponse; -} - -export namespace BaseResponse { - export type AsObject = { - code: number, - success: boolean, - dataMap: Array<[string, string]>, - error?: Error.AsObject, - } -} - -export class Metadata extends jspb.Message { - getId(): string; - setId(value: string): void; - - getKey(): string; - setKey(value: string): void; - - getValue(): string; - setValue(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Metadata.AsObject; - static toObject(includeInstance: boolean, msg: Metadata): Metadata.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Metadata, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Metadata; - static deserializeBinaryFromReader(message: Metadata, reader: jspb.BinaryReader): Metadata; -} - -export namespace Metadata { - export type AsObject = { - id: string, - key: string, - value: string, - } -} - -export class Argument extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getValue(): string; - setValue(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Argument.AsObject; - static toObject(includeInstance: boolean, msg: Argument): Argument.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Argument, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Argument; - static deserializeBinaryFromReader(message: Argument, reader: jspb.BinaryReader): Argument; -} - -export namespace Argument { - export type AsObject = { - id: string, - name: string, - value: string, - } -} - -export class Variable extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getType(): string; - setType(value: string): void; - - hasDefaultvalue(): boolean; - clearDefaultvalue(): void; - getDefaultvalue(): string; - setDefaultvalue(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Variable.AsObject; - static toObject(includeInstance: boolean, msg: Variable): Variable.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Variable, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Variable; - static deserializeBinaryFromReader(message: Variable, reader: jspb.BinaryReader): Variable; -} - -export namespace Variable { - export type AsObject = { - id: string, - name: string, - type: string, - defaultvalue: string, - } -} - -export class Provider extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - getHumanname(): string; - setHumanname(value: string): void; - - getImage(): string; - setImage(value: string): void; - - getWebsite(): string; - setWebsite(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - clearConnectconfigurationList(): void; - getConnectconfigurationList(): Array; - setConnectconfigurationList(value: Array): void; - addConnectconfiguration(value?: Variable, index?: number): Variable; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Provider.AsObject; - static toObject(includeInstance: boolean, msg: Provider): Provider.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Provider, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Provider; - static deserializeBinaryFromReader(message: Provider, reader: jspb.BinaryReader): Provider; -} - -export namespace Provider { - export type AsObject = { - id: string, - name: string, - description: string, - humanname: string, - image: string, - website: string, - status: string, - connectconfigurationList: Array, - } -} - -export class Tag extends jspb.Message { - getId(): string; - setId(value: string): void; - - clearTagList(): void; - getTagList(): Array; - setTagList(value: Array): void; - addTag(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Tag.AsObject; - static toObject(includeInstance: boolean, msg: Tag): Tag.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Tag, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Tag; - static deserializeBinaryFromReader(message: Tag, reader: jspb.BinaryReader): Tag; -} - -export namespace Tag { - export type AsObject = { - id: string, - tagList: Array, - } -} - -export class Organization extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - getIndustry(): string; - setIndustry(value: string): void; - - getContact(): string; - setContact(value: string): void; - - getSize(): string; - setSize(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Organization.AsObject; - static toObject(includeInstance: boolean, msg: Organization): Organization.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Organization, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Organization; - static deserializeBinaryFromReader(message: Organization, reader: jspb.BinaryReader): Organization; -} - -export namespace Organization { - export type AsObject = { - id: string, - name: string, - description: string, - industry: string, - contact: string, - size: string, - } -} - -export class Metric extends jspb.Message { - getName(): string; - setName(value: string): void; - - getValue(): string; - setValue(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Metric.AsObject; - static toObject(includeInstance: boolean, msg: Metric): Metric.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Metric, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Metric; - static deserializeBinaryFromReader(message: Metric, reader: jspb.BinaryReader): Metric; -} - -export namespace Metric { - export type AsObject = { - name: string, - value: string, - description: string, - } -} - -export class Content 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): Content.AsObject; - static toObject(includeInstance: boolean, msg: Content): Content.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; -} - -export namespace Content { - export type AsObject = { - name: string, - contenttype: string, - contentformat: string, - content: Uint8Array | string, - meta?: google_protobuf_struct_pb.Struct.AsObject, - } -} - -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; - - clearToolcallsList(): void; - getToolcallsList(): Array; - setToolcallsList(value: Array): void; - addToolcalls(value?: ToolCall, index?: number): ToolCall; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Message.AsObject; - static toObject(includeInstance: boolean, msg: Message): Message.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Message, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Message; - static deserializeBinaryFromReader(message: Message, reader: jspb.BinaryReader): Message; -} - -export namespace Message { - export type AsObject = { - role: string, - contentsList: Array, - toolcallsList: Array, - } -} - -export class ToolCall extends jspb.Message { - getId(): string; - setId(value: string): void; - - getType(): string; - setType(value: string): void; - - hasFunction(): boolean; - clearFunction(): void; - getFunction(): FunctionCall | undefined; - setFunction(value?: FunctionCall): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ToolCall.AsObject; - static toObject(includeInstance: boolean, msg: ToolCall): ToolCall.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ToolCall, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ToolCall; - static deserializeBinaryFromReader(message: ToolCall, reader: jspb.BinaryReader): ToolCall; -} - -export namespace ToolCall { - export type AsObject = { - id: string, - type: string, - pb_function?: FunctionCall.AsObject, - } -} - -export class FunctionCall extends jspb.Message { - getName(): string; - setName(value: string): void; - - getArguments(): string; - setArguments(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FunctionCall.AsObject; - static toObject(includeInstance: boolean, msg: FunctionCall): FunctionCall.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FunctionCall, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FunctionCall; - static deserializeBinaryFromReader(message: FunctionCall, reader: jspb.BinaryReader): FunctionCall; -} - -export namespace FunctionCall { - export type AsObject = { - name: string, - arguments: string, - } -} - -export class Knowledge extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - getVisibility(): string; - setVisibility(value: string): void; - - getLanguage(): string; - setLanguage(value: string): void; - - getEmbeddingmodelproviderid(): string; - setEmbeddingmodelproviderid(value: string): void; - - getEmbeddingmodelprovidername(): string; - setEmbeddingmodelprovidername(value: string): void; - - clearKnowledgeembeddingmodeloptionsList(): void; - getKnowledgeembeddingmodeloptionsList(): Array; - setKnowledgeembeddingmodeloptionsList(value: Array): void; - addKnowledgeembeddingmodeloptions(value?: Metadata, index?: number): Metadata; - - getStatus(): string; - setStatus(value: string): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - hasCreateduser(): boolean; - clearCreateduser(): void; - getCreateduser(): User | undefined; - setCreateduser(value?: User): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - hasUpdateduser(): boolean; - clearUpdateduser(): void; - getUpdateduser(): User | undefined; - setUpdateduser(value?: User): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - getProjectid(): string; - setProjectid(value: string): void; - - hasOrganization(): boolean; - clearOrganization(): void; - getOrganization(): Organization | undefined; - setOrganization(value?: Organization): void; - - hasKnowledgetag(): boolean; - clearKnowledgetag(): void; - getKnowledgetag(): Tag | undefined; - setKnowledgetag(value?: Tag): void; - - getDocumentcount(): number; - setDocumentcount(value: number): void; - - getTokencount(): number; - setTokencount(value: number): void; - - getWordcount(): number; - setWordcount(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Knowledge.AsObject; - static toObject(includeInstance: boolean, msg: Knowledge): Knowledge.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Knowledge, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Knowledge; - static deserializeBinaryFromReader(message: Knowledge, reader: jspb.BinaryReader): Knowledge; -} - -export namespace Knowledge { - export type AsObject = { - id: string, - name: string, - description: string, - visibility: string, - language: string, - embeddingmodelproviderid: string, - embeddingmodelprovidername: string, - knowledgeembeddingmodeloptionsList: Array, - status: string, - createdby: string, - createduser?: User.AsObject, - updatedby: string, - updateduser?: User.AsObject, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - organizationid: string, - projectid: string, - organization?: Organization.AsObject, - knowledgetag?: Tag.AsObject, - documentcount: number, - tokencount: number, - wordcount: number, - } -} - -export class TextPrompt extends jspb.Message { - getRole(): string; - setRole(value: string): void; - - getContent(): string; - setContent(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TextPrompt.AsObject; - static toObject(includeInstance: boolean, msg: TextPrompt): TextPrompt.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TextPrompt, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TextPrompt; - static deserializeBinaryFromReader(message: TextPrompt, reader: jspb.BinaryReader): TextPrompt; -} - -export namespace TextPrompt { - export type AsObject = { - role: string, - content: string, - } -} - -export class TextChatCompletePrompt extends jspb.Message { - clearPromptList(): void; - getPromptList(): Array; - setPromptList(value: Array): void; - addPrompt(value?: TextPrompt, index?: number): TextPrompt; - - clearPromptvariablesList(): void; - getPromptvariablesList(): Array; - setPromptvariablesList(value: Array): void; - addPromptvariables(value?: Variable, index?: number): Variable; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TextChatCompletePrompt.AsObject; - static toObject(includeInstance: boolean, msg: TextChatCompletePrompt): TextChatCompletePrompt.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TextChatCompletePrompt, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TextChatCompletePrompt; - static deserializeBinaryFromReader(message: TextChatCompletePrompt, reader: jspb.BinaryReader): TextChatCompletePrompt; -} - -export namespace TextChatCompletePrompt { - export type AsObject = { - promptList: Array, - promptvariablesList: Array, - } -} - -export class AssistantMessageStage extends jspb.Message { - getStage(): string; - setStage(value: string): void; - - getAdditionaldataMap(): jspb.Map; - clearAdditionaldataMap(): void; - getTimetaken(): number; - setTimetaken(value: number): void; - - getLifecycleid(): string; - setLifecycleid(value: string): void; - - hasStarttimestamp(): boolean; - clearStarttimestamp(): void; - getStarttimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; - setStarttimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasEndtimestamp(): boolean; - clearEndtimestamp(): void; - getEndtimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; - setEndtimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantMessageStage.AsObject; - static toObject(includeInstance: boolean, msg: AssistantMessageStage): AssistantMessageStage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantMessageStage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantMessageStage; - static deserializeBinaryFromReader(message: AssistantMessageStage, reader: jspb.BinaryReader): AssistantMessageStage; -} - -export namespace AssistantMessageStage { - export type AsObject = { - stage: string, - additionaldataMap: Array<[string, string]>, - timetaken: number, - lifecycleid: string, - starttimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, - endtimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class AssistantConversationMessage extends jspb.Message { - getId(): string; - setId(value: string): void; - - getMessageid(): string; - setMessageid(value: string): void; - - getAssistantconversationid(): string; - setAssistantconversationid(value: string): void; - - hasRequest(): boolean; - clearRequest(): void; - getRequest(): Message | undefined; - setRequest(value?: Message): void; - - hasResponse(): boolean; - clearResponse(): void; - getResponse(): Message | undefined; - setResponse(value?: Message): void; - - getSource(): string; - setSource(value: string): void; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: Metric, index?: number): Metric; - - getStatus(): string; - setStatus(value: string): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - clearSuggestedquestionsList(): void; - getSuggestedquestionsList(): Array; - setSuggestedquestionsList(value: Array): void; - addSuggestedquestions(value: string, index?: number): string; - - clearStagesList(): void; - getStagesList(): Array; - setStagesList(value: Array): void; - addStages(value?: AssistantMessageStage, index?: number): AssistantMessageStage; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getAssistantprovidermodelid(): string; - setAssistantprovidermodelid(value: string): void; - - clearMetadataList(): void; - getMetadataList(): Array; - setMetadataList(value: Array): void; - addMetadata(value?: Metadata, index?: number): Metadata; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversationMessage.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversationMessage): AssistantConversationMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversationMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversationMessage; - static deserializeBinaryFromReader(message: AssistantConversationMessage, reader: jspb.BinaryReader): AssistantConversationMessage; -} - -export namespace AssistantConversationMessage { - export type AsObject = { - id: string, - messageid: string, - assistantconversationid: string, - request?: Message.AsObject, - response?: Message.AsObject, - source: string, - metricsList: Array, - status: string, - createdby: string, - updatedby: string, - suggestedquestionsList: Array, - stagesList: Array, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - assistantid: string, - assistantprovidermodelid: string, - metadataList: Array, - } -} - -export class AssistantConversationContext extends jspb.Message { - getId(): string; - setId(value: string): void; - - hasMetadata(): boolean; - clearMetadata(): void; - getMetadata(): google_protobuf_struct_pb.Struct | undefined; - setMetadata(value?: google_protobuf_struct_pb.Struct): void; - - hasResult(): boolean; - clearResult(): void; - getResult(): google_protobuf_struct_pb.Struct | undefined; - setResult(value?: google_protobuf_struct_pb.Struct): void; - - hasQuery(): boolean; - clearQuery(): void; - getQuery(): google_protobuf_struct_pb.Struct | undefined; - setQuery(value?: google_protobuf_struct_pb.Struct): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversationContext.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversationContext): AssistantConversationContext.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversationContext, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversationContext; - static deserializeBinaryFromReader(message: AssistantConversationContext, reader: jspb.BinaryReader): AssistantConversationContext; -} - -export namespace AssistantConversationContext { - export type AsObject = { - id: string, - metadata?: google_protobuf_struct_pb.Struct.AsObject, - result?: google_protobuf_struct_pb.Struct.AsObject, - query?: google_protobuf_struct_pb.Struct.AsObject, - } -} - -export class AssistantConversation extends jspb.Message { - getId(): string; - setId(value: string): void; - - getUserid(): string; - setUserid(value: string): void; - - getAssistantid(): string; - setAssistantid(value: string): void; - - getName(): string; - setName(value: string): void; - - getProjectid(): string; - setProjectid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - getSource(): string; - setSource(value: string): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - hasUser(): boolean; - clearUser(): void; - getUser(): User | undefined; - setUser(value?: User): void; - - getAssistantprovidermodelid(): string; - setAssistantprovidermodelid(value: string): void; - - clearAssistantconversationmessageList(): void; - getAssistantconversationmessageList(): Array; - setAssistantconversationmessageList(value: Array): void; - addAssistantconversationmessage(value?: AssistantConversationMessage, index?: number): AssistantConversationMessage; - - getIdentifier(): string; - setIdentifier(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - clearContextsList(): void; - getContextsList(): Array; - setContextsList(value: Array): void; - addContexts(value?: AssistantConversationContext, index?: number): AssistantConversationContext; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: Metric, index?: number): Metric; - - clearMetadataList(): void; - getMetadataList(): Array; - setMetadataList(value: Array): void; - addMetadata(value?: Metadata, index?: number): Metadata; - - clearArgumentsList(): void; - getArgumentsList(): Array; - setArgumentsList(value: Array): void; - addArguments(value?: Argument, index?: number): Argument; - - clearOptionsList(): void; - getOptionsList(): Array; - setOptionsList(value: Array): void; - addOptions(value?: Metadata, index?: number): Metadata; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversation.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversation): AssistantConversation.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversation, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversation; - static deserializeBinaryFromReader(message: AssistantConversation, reader: jspb.BinaryReader): AssistantConversation; -} - -export namespace AssistantConversation { - export type AsObject = { - id: string, - userid: string, - assistantid: string, - name: string, - projectid: string, - organizationid: string, - source: string, - createdby: string, - updatedby: string, - user?: User.AsObject, - assistantprovidermodelid: string, - assistantconversationmessageList: Array, - identifier: string, - status: string, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - contextsList: Array, - metricsList: Array, - metadataList: Array, - argumentsList: Array, - optionsList: Array, - } -} - -export class GetAllAssistantConversationRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): Paginate | undefined; - setPaginate(value?: Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: Criteria, index?: number): Criteria; - - getSource(): SourceMap[keyof SourceMap]; - setSource(value: SourceMap[keyof SourceMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantConversationRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantConversationRequest): GetAllAssistantConversationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantConversationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantConversationRequest; - static deserializeBinaryFromReader(message: GetAllAssistantConversationRequest, reader: jspb.BinaryReader): GetAllAssistantConversationRequest; -} - -export namespace GetAllAssistantConversationRequest { - export type AsObject = { - assistantid: string, - paginate?: Paginate.AsObject, - criteriasList: Array, - source: SourceMap[keyof SourceMap], - } -} - -export class GetAllAssistantConversationResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: AssistantConversation, index?: number): AssistantConversation; - - hasError(): boolean; - clearError(): void; - getError(): Error | undefined; - setError(value?: Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): Paginated | undefined; - setPaginated(value?: Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllAssistantConversationResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllAssistantConversationResponse): GetAllAssistantConversationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllAssistantConversationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllAssistantConversationResponse; - static deserializeBinaryFromReader(message: GetAllAssistantConversationResponse, reader: jspb.BinaryReader): GetAllAssistantConversationResponse; -} - -export namespace GetAllAssistantConversationResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: Error.AsObject, - paginated?: Paginated.AsObject, - } -} - -export class GetAllConversationMessageRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - getAssistantconversationid(): string; - setAssistantconversationid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): Paginate | undefined; - setPaginate(value?: Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: Criteria, index?: number): Criteria; - - hasOrder(): boolean; - clearOrder(): void; - getOrder(): Ordering | undefined; - setOrder(value?: Ordering): void; - - getSource(): SourceMap[keyof SourceMap]; - setSource(value: SourceMap[keyof SourceMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllConversationMessageRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllConversationMessageRequest): GetAllConversationMessageRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllConversationMessageRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllConversationMessageRequest; - static deserializeBinaryFromReader(message: GetAllConversationMessageRequest, reader: jspb.BinaryReader): GetAllConversationMessageRequest; -} - -export namespace GetAllConversationMessageRequest { - export type AsObject = { - assistantid: string, - assistantconversationid: string, - paginate?: Paginate.AsObject, - criteriasList: Array, - order?: Ordering.AsObject, - source: SourceMap[keyof SourceMap], - } -} - -export class GetAllConversationMessageResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: AssistantConversationMessage, index?: number): AssistantConversationMessage; - - hasError(): boolean; - clearError(): void; - getError(): Error | undefined; - setError(value?: Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): Paginated | undefined; - setPaginated(value?: Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllConversationMessageResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllConversationMessageResponse): GetAllConversationMessageResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllConversationMessageResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllConversationMessageResponse; - static deserializeBinaryFromReader(message: GetAllConversationMessageResponse, reader: jspb.BinaryReader): GetAllConversationMessageResponse; -} - -export namespace GetAllConversationMessageResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: Error.AsObject, - paginated?: Paginated.AsObject, - } -} - -export interface SourceMap { - WEB_PLUGIN: 0; - DEBUGGER: 1; - SDK: 2; - PHONE_CALL: 3; - WHATSAPP: 4; -} - -export const Source: SourceMap; - diff --git a/src/clients/protos/common_pb.js b/src/clients/protos/common_pb.js index 52c5211..9840045 100644 --- a/src/clients/protos/common_pb.js +++ b/src/clients/protos/common_pb.js @@ -29,6 +29,7 @@ goog.exportSymbol('proto.Argument', null, global); goog.exportSymbol('proto.AssistantConversation', null, global); goog.exportSymbol('proto.AssistantConversationContext', null, global); goog.exportSymbol('proto.AssistantConversationMessage', null, global); +goog.exportSymbol('proto.AssistantConversationRecording', null, global); goog.exportSymbol('proto.AssistantMessageStage', null, global); goog.exportSymbol('proto.BaseResponse', null, global); goog.exportSymbol('proto.Content', null, global); @@ -581,6 +582,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.AssistantConversationContext.displayName = 'proto.AssistantConversationContext'; } +/** + * 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.AssistantConversationRecording = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.AssistantConversationRecording, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.AssistantConversationRecording.displayName = 'proto.AssistantConversationRecording'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -7461,12 +7483,142 @@ proto.AssistantConversationContext.prototype.hasQuery = function() { + + +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.AssistantConversationRecording.prototype.toObject = function(opt_includeInstance) { + return proto.AssistantConversationRecording.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.AssistantConversationRecording} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.AssistantConversationRecording.toObject = function(includeInstance, msg) { + var f, obj = { + recordingurl: 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.AssistantConversationRecording} + */ +proto.AssistantConversationRecording.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.AssistantConversationRecording} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.AssistantConversationRecording} + */ +proto.AssistantConversationRecording.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.setRecordingurl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.AssistantConversationRecording.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.AssistantConversationRecording.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.AssistantConversationRecording} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.AssistantConversationRecording.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecordingurl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string recordingUrl = 1; + * @return {string} + */ +proto.AssistantConversationRecording.prototype.getRecordingurl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.AssistantConversationRecording} returns this + */ +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.AssistantConversation.repeatedFields_ = [13,28,30,32,31,33]; +proto.AssistantConversation.repeatedFields_ = [13,28,30,32,31,33,35]; @@ -7525,7 +7677,10 @@ proto.AssistantConversation.toObject = function(includeInstance, msg) { argumentsList: jspb.Message.toObjectList(msg.getArgumentsList(), proto.Argument.toObject, includeInstance), optionsList: jspb.Message.toObjectList(msg.getOptionsList(), - proto.Metadata.toObject, includeInstance) + proto.Metadata.toObject, includeInstance), + direction: jspb.Message.getFieldWithDefault(msg, 34, ""), + recordingsList: jspb.Message.toObjectList(msg.getRecordingsList(), + proto.AssistantConversationRecording.toObject, includeInstance) }; if (includeInstance) { @@ -7655,6 +7810,15 @@ proto.AssistantConversation.deserializeBinaryFromReader = function(msg, reader) 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; default: reader.skipField(); break; @@ -7840,6 +8004,21 @@ proto.AssistantConversation.serializeBinaryToWriter = function(message, writer) 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 + ); + } }; @@ -8398,6 +8577,62 @@ proto.AssistantConversation.prototype.clearOptionsList = function() { }; +/** + * 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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setRecordingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 35, value); +}; + + +/** + * @param {!proto.AssistantConversationRecording=} opt_value + * @param {number=} opt_index + * @return {!proto.AssistantConversationRecording} + */ +proto.AssistantConversation.prototype.addRecordings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 35, opt_value, proto.AssistantConversationRecording, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversation} returns this + */ +proto.AssistantConversation.prototype.clearRecordingsList = function() { + return this.setRecordingsList([]); +}; + + /** * List of repeated fields within this message type. diff --git a/src/clients/protos/connect-api.ts b/src/clients/protos/connect-api.ts new file mode 100644 index 0000000..e9b2afc --- /dev/null +++ b/src/clients/protos/connect-api.ts @@ -0,0 +1,1305 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: connect-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/struct"; +import * as dependency_2 from "./common"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace connect_api { + export class KnowledgeConnectRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + state?: string; + code?: string; + scope?: string; + connect?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("state" in data && data.state != undefined) { + this.state = data.state; + } + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("scope" in data && data.scope != undefined) { + this.scope = data.scope; + } + if ("connect" in data && data.connect != undefined) { + this.connect = data.connect; + } + } + } + get state() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set state(value: string) { + pb_1.Message.setField(this, 1, value); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set code(value: string) { + pb_1.Message.setField(this, 2, value); + } + get scope() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set scope(value: string) { + pb_1.Message.setField(this, 3, value); + } + get connect() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set connect(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + state?: string; + code?: string; + scope?: string; + connect?: string; + }): KnowledgeConnectRequest { + const message = new KnowledgeConnectRequest({}); + if (data.state != null) { + message.state = data.state; + } + if (data.code != null) { + message.code = data.code; + } + if (data.scope != null) { + message.scope = data.scope; + } + if (data.connect != null) { + message.connect = data.connect; + } + return message; + } + toObject() { + const data: { + state?: string; + code?: string; + scope?: string; + connect?: string; + } = {}; + if (this.state != null) { + data.state = this.state; + } + if (this.code != null) { + data.code = this.code; + } + if (this.scope != null) { + data.scope = this.scope; + } + if (this.connect != null) { + data.connect = this.connect; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.state.length) + writer.writeString(1, this.state); + if (this.code.length) + writer.writeString(2, this.code); + if (this.scope.length) + writer.writeString(3, this.scope); + if (this.connect.length) + writer.writeString(4, this.connect); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): KnowledgeConnectRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new KnowledgeConnectRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.state = reader.readString(); + break; + case 2: + message.code = reader.readString(); + break; + case 3: + message.scope = reader.readString(); + break; + case 4: + message.connect = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): KnowledgeConnectRequest { + return KnowledgeConnectRequest.deserialize(bytes); + } + } + export class KnowledgeConnectResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + toolId?: string; + redirectTo?: string; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("toolId" in data && data.toolId != undefined) { + this.toolId = data.toolId; + } + if ("redirectTo" in data && data.redirectTo != undefined) { + this.redirectTo = data.redirectTo; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get toolId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set toolId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get redirectTo() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set redirectTo(value: string) { + pb_1.Message.setField(this, 4, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 5) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_error() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + toolId?: string; + redirectTo?: string; + error?: ReturnType; + }): KnowledgeConnectResponse { + const message = new KnowledgeConnectResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.toolId != null) { + message.toolId = data.toolId; + } + if (data.redirectTo != null) { + message.redirectTo = data.redirectTo; + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + toolId?: string; + redirectTo?: string; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.toolId != null) { + data.toolId = this.toolId; + } + if (this.redirectTo != null) { + data.redirectTo = this.redirectTo; + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.toolId != "0") + writer.writeUint64String(3, this.toolId); + if (this.redirectTo.length) + writer.writeString(4, this.redirectTo); + if (this.has_error) + writer.writeMessage(5, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): KnowledgeConnectResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new KnowledgeConnectResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + message.toolId = reader.readUint64String(); + break; + case 4: + message.redirectTo = reader.readString(); + break; + case 5: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): KnowledgeConnectResponse { + return KnowledgeConnectResponse.deserialize(bytes); + } + } + export class GeneralConnectRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + state?: string; + code?: string; + scope?: string; + connect?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("state" in data && data.state != undefined) { + this.state = data.state; + } + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("scope" in data && data.scope != undefined) { + this.scope = data.scope; + } + if ("connect" in data && data.connect != undefined) { + this.connect = data.connect; + } + } + } + get state() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set state(value: string) { + pb_1.Message.setField(this, 1, value); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set code(value: string) { + pb_1.Message.setField(this, 2, value); + } + get scope() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set scope(value: string) { + pb_1.Message.setField(this, 3, value); + } + get connect() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set connect(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + state?: string; + code?: string; + scope?: string; + connect?: string; + }): GeneralConnectRequest { + const message = new GeneralConnectRequest({}); + if (data.state != null) { + message.state = data.state; + } + if (data.code != null) { + message.code = data.code; + } + if (data.scope != null) { + message.scope = data.scope; + } + if (data.connect != null) { + message.connect = data.connect; + } + return message; + } + toObject() { + const data: { + state?: string; + code?: string; + scope?: string; + connect?: string; + } = {}; + if (this.state != null) { + data.state = this.state; + } + if (this.code != null) { + data.code = this.code; + } + if (this.scope != null) { + data.scope = this.scope; + } + if (this.connect != null) { + data.connect = this.connect; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.state.length) + writer.writeString(1, this.state); + if (this.code.length) + writer.writeString(2, this.code); + if (this.scope.length) + writer.writeString(3, this.scope); + if (this.connect.length) + writer.writeString(4, this.connect); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GeneralConnectRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GeneralConnectRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.state = reader.readString(); + break; + case 2: + message.code = reader.readString(); + break; + case 3: + message.scope = reader.readString(); + break; + case 4: + message.connect = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GeneralConnectRequest { + return GeneralConnectRequest.deserialize(bytes); + } + } + export class GeneralConnectResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + toolId?: string; + redirectTo?: string; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("toolId" in data && data.toolId != undefined) { + this.toolId = data.toolId; + } + if ("redirectTo" in data && data.redirectTo != undefined) { + this.redirectTo = data.redirectTo; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get toolId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set toolId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get redirectTo() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set redirectTo(value: string) { + pb_1.Message.setField(this, 4, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 5) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_error() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + toolId?: string; + redirectTo?: string; + error?: ReturnType; + }): GeneralConnectResponse { + const message = new GeneralConnectResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.toolId != null) { + message.toolId = data.toolId; + } + if (data.redirectTo != null) { + message.redirectTo = data.redirectTo; + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + toolId?: string; + redirectTo?: string; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.toolId != null) { + data.toolId = this.toolId; + } + if (this.redirectTo != null) { + data.redirectTo = this.redirectTo; + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.toolId != "0") + writer.writeUint64String(3, this.toolId); + if (this.redirectTo.length) + writer.writeString(4, this.redirectTo); + if (this.has_error) + writer.writeMessage(5, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GeneralConnectResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GeneralConnectResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + message.toolId = reader.readUint64String(); + break; + case 4: + message.redirectTo = reader.readString(); + break; + case 5: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GeneralConnectResponse { + return GeneralConnectResponse.deserialize(bytes); + } + } + export class ActionConnectRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + state?: string; + code?: string; + scope?: string; + connect?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("state" in data && data.state != undefined) { + this.state = data.state; + } + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("scope" in data && data.scope != undefined) { + this.scope = data.scope; + } + if ("connect" in data && data.connect != undefined) { + this.connect = data.connect; + } + } + } + get state() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set state(value: string) { + pb_1.Message.setField(this, 1, value); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set code(value: string) { + pb_1.Message.setField(this, 2, value); + } + get scope() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set scope(value: string) { + pb_1.Message.setField(this, 3, value); + } + get connect() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set connect(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + state?: string; + code?: string; + scope?: string; + connect?: string; + }): ActionConnectRequest { + const message = new ActionConnectRequest({}); + if (data.state != null) { + message.state = data.state; + } + if (data.code != null) { + message.code = data.code; + } + if (data.scope != null) { + message.scope = data.scope; + } + if (data.connect != null) { + message.connect = data.connect; + } + return message; + } + toObject() { + const data: { + state?: string; + code?: string; + scope?: string; + connect?: string; + } = {}; + if (this.state != null) { + data.state = this.state; + } + if (this.code != null) { + data.code = this.code; + } + if (this.scope != null) { + data.scope = this.scope; + } + if (this.connect != null) { + data.connect = this.connect; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.state.length) + writer.writeString(1, this.state); + if (this.code.length) + writer.writeString(2, this.code); + if (this.scope.length) + writer.writeString(3, this.scope); + if (this.connect.length) + writer.writeString(4, this.connect); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ActionConnectRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ActionConnectRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.state = reader.readString(); + break; + case 2: + message.code = reader.readString(); + break; + case 3: + message.scope = reader.readString(); + break; + case 4: + message.connect = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ActionConnectRequest { + return ActionConnectRequest.deserialize(bytes); + } + } + export class ActionConnectResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + toolId?: string; + redirectTo?: string; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("toolId" in data && data.toolId != undefined) { + this.toolId = data.toolId; + } + if ("redirectTo" in data && data.redirectTo != undefined) { + this.redirectTo = data.redirectTo; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get toolId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set toolId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get redirectTo() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set redirectTo(value: string) { + pb_1.Message.setField(this, 4, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 5) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_error() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + toolId?: string; + redirectTo?: string; + error?: ReturnType; + }): ActionConnectResponse { + const message = new ActionConnectResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.toolId != null) { + message.toolId = data.toolId; + } + if (data.redirectTo != null) { + message.redirectTo = data.redirectTo; + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + toolId?: string; + redirectTo?: string; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.toolId != null) { + data.toolId = this.toolId; + } + if (this.redirectTo != null) { + data.redirectTo = this.redirectTo; + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.toolId != "0") + writer.writeUint64String(3, this.toolId); + if (this.redirectTo.length) + writer.writeString(4, this.redirectTo); + if (this.has_error) + writer.writeMessage(5, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ActionConnectResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ActionConnectResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + message.toolId = reader.readUint64String(); + break; + case 4: + message.redirectTo = reader.readString(); + break; + case 5: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ActionConnectResponse { + return ActionConnectResponse.deserialize(bytes); + } + } + export class GetConnectorFilesRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + toolId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("toolId" in data && data.toolId != undefined) { + this.toolId = data.toolId; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get toolId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set toolId(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + toolId?: string; + }): GetConnectorFilesRequest { + const message = new GetConnectorFilesRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.toolId != null) { + message.toolId = data.toolId; + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + toolId?: string; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.toolId != null) { + data.toolId = this.toolId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.toolId != "0") + writer.writeUint64String(3, this.toolId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetConnectorFilesRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetConnectorFilesRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 3: + message.toolId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetConnectorFilesRequest { + return GetConnectorFilesRequest.deserialize(bytes); + } + } + export class GetConnectorFilesResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_1.google.protobuf.Struct[]; + paginated?: dependency_2.Paginated; + error?: dependency_2.Error; + args?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("args" in data && data.args != undefined) { + this.args = data.args; + } + } + if (!this.args) + this.args = new Map(); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Struct, 3) as dependency_1.google.protobuf.Struct[]; + } + set data(value: dependency_1.google.protobuf.Struct[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 4) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 4) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 5) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_error() { + return pb_1.Message.getField(this, 5) != null; + } + get args() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set args(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + paginated?: ReturnType; + error?: ReturnType; + args?: { + [key: string]: string; + }; + }): GetConnectorFilesResponse { + const message = new GetConnectorFilesResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_1.google.protobuf.Struct.fromObject(item)); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (typeof data.args == "object") { + message.args = new Map(Object.entries(data.args)); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + paginated?: ReturnType; + error?: ReturnType; + args?: { + [key: string]: string; + }; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_1.google.protobuf.Struct) => item.toObject()); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.args != null) { + data.args = (Object.fromEntries)(this.args); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_1.google.protobuf.Struct) => item.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(4, this.paginated, () => this.paginated.serialize(writer)); + if (this.has_error) + writer.writeMessage(5, this.error, () => this.error.serialize(writer)); + for (const [key, value] of this.args) { + writer.writeMessage(6, this.args, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetConnectorFilesResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetConnectorFilesResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_1.google.protobuf.Struct.deserialize(reader), dependency_1.google.protobuf.Struct)); + break; + case 4: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + case 5: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.args as any, reader, reader.readString, reader.readString)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetConnectorFilesResponse { + return GetConnectorFilesResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedConnectServiceService { + static definition = { + KnowledgeConnect: { + path: "/connect_api.ConnectService/KnowledgeConnect", + requestStream: false, + responseStream: false, + requestSerialize: (message: KnowledgeConnectRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => KnowledgeConnectRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: KnowledgeConnectResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => KnowledgeConnectResponse.deserialize(new Uint8Array(bytes)) + }, + GeneralConnect: { + path: "/connect_api.ConnectService/GeneralConnect", + requestStream: false, + responseStream: false, + requestSerialize: (message: GeneralConnectRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GeneralConnectRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GeneralConnectResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GeneralConnectResponse.deserialize(new Uint8Array(bytes)) + }, + ActionConnect: { + path: "/connect_api.ConnectService/ActionConnect", + requestStream: false, + responseStream: false, + requestSerialize: (message: ActionConnectRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ActionConnectRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ActionConnectResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ActionConnectResponse.deserialize(new Uint8Array(bytes)) + }, + GetConnectorFiles: { + path: "/connect_api.ConnectService/GetConnectorFiles", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetConnectorFilesRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetConnectorFilesRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetConnectorFilesResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetConnectorFilesResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract KnowledgeConnect(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GeneralConnect(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ActionConnect(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetConnectorFiles(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ConnectServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedConnectServiceService.definition, "ConnectService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + KnowledgeConnect: GrpcUnaryServiceInterface = (message: KnowledgeConnectRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.KnowledgeConnect(message, metadata, options, callback); + }; + GeneralConnect: GrpcUnaryServiceInterface = (message: GeneralConnectRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GeneralConnect(message, metadata, options, callback); + }; + ActionConnect: GrpcUnaryServiceInterface = (message: ActionConnectRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ActionConnect(message, metadata, options, callback); + }; + GetConnectorFiles: GrpcUnaryServiceInterface = (message: GetConnectorFilesRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetConnectorFiles(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/connect-api_grpc_pb.d.ts b/src/clients/protos/connect-api_grpc_pb.d.ts deleted file mode 100644 index ec1deb9..0000000 --- a/src/clients/protos/connect-api_grpc_pb.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: connect_api -// file: connect-api.proto - -import * as connect_api_pb from "./connect-api_pb"; -import * as grpc from "grpc"; - -interface IConnectServiceService extends grpc.ServiceDefinition { - knowledgeConnect: grpc.MethodDefinition; - generalConnect: grpc.MethodDefinition; - actionConnect: grpc.MethodDefinition; - getConnectorFiles: grpc.MethodDefinition; -} - -export const ConnectServiceService: IConnectServiceService; - -export interface IConnectServiceServer extends grpc.UntypedServiceImplementation { - knowledgeConnect: grpc.handleUnaryCall; - generalConnect: grpc.handleUnaryCall; - actionConnect: grpc.handleUnaryCall; - getConnectorFiles: grpc.handleUnaryCall; -} - -export class ConnectServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - knowledgeConnect(argument: connect_api_pb.KnowledgeConnectRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - knowledgeConnect(argument: connect_api_pb.KnowledgeConnectRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - knowledgeConnect(argument: connect_api_pb.KnowledgeConnectRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - generalConnect(argument: connect_api_pb.GeneralConnectRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - generalConnect(argument: connect_api_pb.GeneralConnectRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - generalConnect(argument: connect_api_pb.GeneralConnectRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - actionConnect(argument: connect_api_pb.ActionConnectRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - actionConnect(argument: connect_api_pb.ActionConnectRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - actionConnect(argument: connect_api_pb.ActionConnectRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getConnectorFiles(argument: connect_api_pb.GetConnectorFilesRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getConnectorFiles(argument: connect_api_pb.GetConnectorFilesRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getConnectorFiles(argument: connect_api_pb.GetConnectorFilesRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/connect-api_pb.d.ts b/src/clients/protos/connect-api_pb.d.ts deleted file mode 100644 index f000954..0000000 --- a/src/clients/protos/connect-api_pb.d.ts +++ /dev/null @@ -1,294 +0,0 @@ -// package: connect_api -// file: connect-api.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; -import * as common_pb from "./common_pb"; - -export class KnowledgeConnectRequest extends jspb.Message { - getState(): string; - setState(value: string): void; - - getCode(): string; - setCode(value: string): void; - - getScope(): string; - setScope(value: string): void; - - getConnect(): string; - setConnect(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KnowledgeConnectRequest.AsObject; - static toObject(includeInstance: boolean, msg: KnowledgeConnectRequest): KnowledgeConnectRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KnowledgeConnectRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KnowledgeConnectRequest; - static deserializeBinaryFromReader(message: KnowledgeConnectRequest, reader: jspb.BinaryReader): KnowledgeConnectRequest; -} - -export namespace KnowledgeConnectRequest { - export type AsObject = { - state: string, - code: string, - scope: string, - connect: string, - } -} - -export class KnowledgeConnectResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getToolid(): string; - setToolid(value: string): void; - - getRedirectto(): string; - setRedirectto(value: string): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KnowledgeConnectResponse.AsObject; - static toObject(includeInstance: boolean, msg: KnowledgeConnectResponse): KnowledgeConnectResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KnowledgeConnectResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KnowledgeConnectResponse; - static deserializeBinaryFromReader(message: KnowledgeConnectResponse, reader: jspb.BinaryReader): KnowledgeConnectResponse; -} - -export namespace KnowledgeConnectResponse { - export type AsObject = { - code: number, - success: boolean, - toolid: string, - redirectto: string, - error?: common_pb.Error.AsObject, - } -} - -export class GeneralConnectRequest extends jspb.Message { - getState(): string; - setState(value: string): void; - - getCode(): string; - setCode(value: string): void; - - getScope(): string; - setScope(value: string): void; - - getConnect(): string; - setConnect(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GeneralConnectRequest.AsObject; - static toObject(includeInstance: boolean, msg: GeneralConnectRequest): GeneralConnectRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GeneralConnectRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GeneralConnectRequest; - static deserializeBinaryFromReader(message: GeneralConnectRequest, reader: jspb.BinaryReader): GeneralConnectRequest; -} - -export namespace GeneralConnectRequest { - export type AsObject = { - state: string, - code: string, - scope: string, - connect: string, - } -} - -export class GeneralConnectResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getToolid(): string; - setToolid(value: string): void; - - getRedirectto(): string; - setRedirectto(value: string): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GeneralConnectResponse.AsObject; - static toObject(includeInstance: boolean, msg: GeneralConnectResponse): GeneralConnectResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GeneralConnectResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GeneralConnectResponse; - static deserializeBinaryFromReader(message: GeneralConnectResponse, reader: jspb.BinaryReader): GeneralConnectResponse; -} - -export namespace GeneralConnectResponse { - export type AsObject = { - code: number, - success: boolean, - toolid: string, - redirectto: string, - error?: common_pb.Error.AsObject, - } -} - -export class ActionConnectRequest extends jspb.Message { - getState(): string; - setState(value: string): void; - - getCode(): string; - setCode(value: string): void; - - getScope(): string; - setScope(value: string): void; - - getConnect(): string; - setConnect(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ActionConnectRequest.AsObject; - static toObject(includeInstance: boolean, msg: ActionConnectRequest): ActionConnectRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ActionConnectRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ActionConnectRequest; - static deserializeBinaryFromReader(message: ActionConnectRequest, reader: jspb.BinaryReader): ActionConnectRequest; -} - -export namespace ActionConnectRequest { - export type AsObject = { - state: string, - code: string, - scope: string, - connect: string, - } -} - -export class ActionConnectResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getToolid(): string; - setToolid(value: string): void; - - getRedirectto(): string; - setRedirectto(value: string): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ActionConnectResponse.AsObject; - static toObject(includeInstance: boolean, msg: ActionConnectResponse): ActionConnectResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ActionConnectResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ActionConnectResponse; - static deserializeBinaryFromReader(message: ActionConnectResponse, reader: jspb.BinaryReader): ActionConnectResponse; -} - -export namespace ActionConnectResponse { - export type AsObject = { - code: number, - success: boolean, - toolid: string, - redirectto: string, - error?: common_pb.Error.AsObject, - } -} - -export class GetConnectorFilesRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - getToolid(): string; - setToolid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetConnectorFilesRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetConnectorFilesRequest): GetConnectorFilesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetConnectorFilesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetConnectorFilesRequest; - static deserializeBinaryFromReader(message: GetConnectorFilesRequest, reader: jspb.BinaryReader): GetConnectorFilesRequest; -} - -export namespace GetConnectorFilesRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - toolid: string, - } -} - -export class GetConnectorFilesResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: google_protobuf_struct_pb.Struct, index?: number): google_protobuf_struct_pb.Struct; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - getArgsMap(): jspb.Map; - clearArgsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetConnectorFilesResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetConnectorFilesResponse): GetConnectorFilesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetConnectorFilesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetConnectorFilesResponse; - static deserializeBinaryFromReader(message: GetConnectorFilesResponse, reader: jspb.BinaryReader): GetConnectorFilesResponse; -} - -export namespace GetConnectorFilesResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - paginated?: common_pb.Paginated.AsObject, - error?: common_pb.Error.AsObject, - argsMap: Array<[string, string]>, - } -} - diff --git a/src/clients/protos/document-api.ts b/src/clients/protos/document-api.ts new file mode 100644 index 0000000..6ff6d06 --- /dev/null +++ b/src/clients/protos/document-api.ts @@ -0,0 +1,259 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: document-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace document_api { + export class IndexKnowledgeDocumentRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + knowledgeId?: string; + knowledgeDocumentId?: string[]; + indexType?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("knowledgeDocumentId" in data && data.knowledgeDocumentId != undefined) { + this.knowledgeDocumentId = data.knowledgeDocumentId; + } + if ("indexType" in data && data.indexType != undefined) { + this.indexType = data.indexType; + } + } + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get knowledgeDocumentId() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set knowledgeDocumentId(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + get indexType() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set indexType(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + knowledgeId?: string; + knowledgeDocumentId?: string[]; + indexType?: string; + }): IndexKnowledgeDocumentRequest { + const message = new IndexKnowledgeDocumentRequest({}); + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.knowledgeDocumentId != null) { + message.knowledgeDocumentId = data.knowledgeDocumentId; + } + if (data.indexType != null) { + message.indexType = data.indexType; + } + return message; + } + toObject() { + const data: { + knowledgeId?: string; + knowledgeDocumentId?: string[]; + indexType?: string; + } = {}; + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.knowledgeDocumentId != null) { + data.knowledgeDocumentId = this.knowledgeDocumentId; + } + if (this.indexType != null) { + data.indexType = this.indexType; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.knowledgeId != "0") + writer.writeUint64String(1, this.knowledgeId); + if (this.knowledgeDocumentId.length) + writer.writePackedUint64String(2, this.knowledgeDocumentId); + if (this.indexType.length) + writer.writeString(3, this.indexType); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IndexKnowledgeDocumentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IndexKnowledgeDocumentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.knowledgeId = reader.readUint64String(); + break; + case 2: + message.knowledgeDocumentId = reader.readPackedUint64String(); + break; + case 3: + message.indexType = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IndexKnowledgeDocumentRequest { + return IndexKnowledgeDocumentRequest.deserialize(bytes); + } + } + export class IndexKnowledgeDocumentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + code?: number; + success?: boolean; + }): IndexKnowledgeDocumentResponse { + const message = new IndexKnowledgeDocumentResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IndexKnowledgeDocumentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IndexKnowledgeDocumentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IndexKnowledgeDocumentResponse { + return IndexKnowledgeDocumentResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedDocumentServiceService { + static definition = { + IndexKnowledgeDocument: { + path: "/document_api.DocumentService/IndexKnowledgeDocument", + requestStream: false, + responseStream: false, + requestSerialize: (message: IndexKnowledgeDocumentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => IndexKnowledgeDocumentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: IndexKnowledgeDocumentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => IndexKnowledgeDocumentResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract IndexKnowledgeDocument(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class DocumentServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedDocumentServiceService.definition, "DocumentService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + IndexKnowledgeDocument: GrpcUnaryServiceInterface = (message: IndexKnowledgeDocumentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.IndexKnowledgeDocument(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/document-api_grpc_pb.d.ts b/src/clients/protos/document-api_grpc_pb.d.ts deleted file mode 100644 index 9422d41..0000000 --- a/src/clients/protos/document-api_grpc_pb.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: document_api -// file: document-api.proto - -import * as document_api_pb from "./document-api_pb"; -import * as grpc from "grpc"; - -interface IDocumentServiceService extends grpc.ServiceDefinition { - indexKnowledgeDocument: grpc.MethodDefinition; -} - -export const DocumentServiceService: IDocumentServiceService; - -export interface IDocumentServiceServer extends grpc.UntypedServiceImplementation { - indexKnowledgeDocument: grpc.handleUnaryCall; -} - -export class DocumentServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - indexKnowledgeDocument(argument: document_api_pb.IndexKnowledgeDocumentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - indexKnowledgeDocument(argument: document_api_pb.IndexKnowledgeDocumentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - indexKnowledgeDocument(argument: document_api_pb.IndexKnowledgeDocumentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/document-api_pb.d.ts b/src/clients/protos/document-api_pb.d.ts deleted file mode 100644 index eee0731..0000000 --- a/src/clients/protos/document-api_pb.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// package: document_api -// file: document-api.proto - -import * as jspb from "google-protobuf"; - -export class IndexKnowledgeDocumentRequest extends jspb.Message { - getKnowledgeid(): string; - setKnowledgeid(value: string): void; - - clearKnowledgedocumentidList(): void; - getKnowledgedocumentidList(): Array; - setKnowledgedocumentidList(value: Array): void; - addKnowledgedocumentid(value: string, index?: number): string; - - getIndextype(): string; - setIndextype(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): IndexKnowledgeDocumentRequest.AsObject; - static toObject(includeInstance: boolean, msg: IndexKnowledgeDocumentRequest): IndexKnowledgeDocumentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: IndexKnowledgeDocumentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): IndexKnowledgeDocumentRequest; - static deserializeBinaryFromReader(message: IndexKnowledgeDocumentRequest, reader: jspb.BinaryReader): IndexKnowledgeDocumentRequest; -} - -export namespace IndexKnowledgeDocumentRequest { - export type AsObject = { - knowledgeid: string, - knowledgedocumentidList: Array, - indextype: string, - } -} - -export class IndexKnowledgeDocumentResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): IndexKnowledgeDocumentResponse.AsObject; - static toObject(includeInstance: boolean, msg: IndexKnowledgeDocumentResponse): IndexKnowledgeDocumentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: IndexKnowledgeDocumentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): IndexKnowledgeDocumentResponse; - static deserializeBinaryFromReader(message: IndexKnowledgeDocumentResponse, reader: jspb.BinaryReader): IndexKnowledgeDocumentResponse; -} - -export namespace IndexKnowledgeDocumentResponse { - export type AsObject = { - code: number, - success: boolean, - } -} - diff --git a/src/clients/protos/endpoint-api.ts b/src/clients/protos/endpoint-api.ts new file mode 100644 index 0000000..86641d7 --- /dev/null +++ b/src/clients/protos/endpoint-api.ts @@ -0,0 +1,5372 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: endpoint-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./common"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace endpoint_api { + export class EndpointAttribute extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + source?: string; + sourceIdentifier?: string; + visibility?: string; + language?: string; + name?: string; + description?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("source" in data && data.source != undefined) { + this.source = data.source; + } + if ("sourceIdentifier" in data && data.sourceIdentifier != undefined) { + this.sourceIdentifier = data.sourceIdentifier; + } + if ("visibility" in data && data.visibility != undefined) { + this.visibility = data.visibility; + } + if ("language" in data && data.language != undefined) { + this.language = data.language; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + } + } + get source() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set source(value: string) { + pb_1.Message.setField(this, 1, value); + } + get sourceIdentifier() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set sourceIdentifier(value: string) { + pb_1.Message.setField(this, 2, value); + } + get visibility() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set visibility(value: string) { + pb_1.Message.setField(this, 4, value); + } + get language() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set language(value: string) { + pb_1.Message.setField(this, 6, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 7, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + source?: string; + sourceIdentifier?: string; + visibility?: string; + language?: string; + name?: string; + description?: string; + }): EndpointAttribute { + const message = new EndpointAttribute({}); + if (data.source != null) { + message.source = data.source; + } + if (data.sourceIdentifier != null) { + message.sourceIdentifier = data.sourceIdentifier; + } + if (data.visibility != null) { + message.visibility = data.visibility; + } + if (data.language != null) { + message.language = data.language; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + return message; + } + toObject() { + const data: { + source?: string; + sourceIdentifier?: string; + visibility?: string; + language?: string; + name?: string; + description?: string; + } = {}; + if (this.source != null) { + data.source = this.source; + } + if (this.sourceIdentifier != null) { + data.sourceIdentifier = this.sourceIdentifier; + } + if (this.visibility != null) { + data.visibility = this.visibility; + } + if (this.language != null) { + data.language = this.language; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.source.length) + writer.writeString(1, this.source); + if (this.sourceIdentifier != "0") + writer.writeUint64String(2, this.sourceIdentifier); + if (this.visibility.length) + writer.writeString(4, this.visibility); + if (this.language.length) + writer.writeString(6, this.language); + if (this.name.length) + writer.writeString(7, this.name); + if (this.description.length) + writer.writeString(8, this.description); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EndpointAttribute { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EndpointAttribute(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.source = reader.readString(); + break; + case 2: + message.sourceIdentifier = reader.readUint64String(); + break; + case 4: + message.visibility = reader.readString(); + break; + case 6: + message.language = reader.readString(); + break; + case 7: + message.name = reader.readString(); + break; + case 8: + message.description = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EndpointAttribute { + return EndpointAttribute.deserialize(bytes); + } + } + export class EndpointProviderModelAttribute extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + description?: string; + chatCompletePrompt?: dependency_2.TextChatCompletePrompt; + modelProviderId?: string; + modelProviderName?: string; + endpointModelOptions?: dependency_2.Metadata[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [8], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("chatCompletePrompt" in data && data.chatCompletePrompt != undefined) { + this.chatCompletePrompt = data.chatCompletePrompt; + } + if ("modelProviderId" in data && data.modelProviderId != undefined) { + this.modelProviderId = data.modelProviderId; + } + if ("modelProviderName" in data && data.modelProviderName != undefined) { + this.modelProviderName = data.modelProviderName; + } + if ("endpointModelOptions" in data && data.endpointModelOptions != undefined) { + this.endpointModelOptions = data.endpointModelOptions; + } + } + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 1, value); + } + get chatCompletePrompt() { + return pb_1.Message.getWrapperField(this, dependency_2.TextChatCompletePrompt, 2) as dependency_2.TextChatCompletePrompt; + } + set chatCompletePrompt(value: dependency_2.TextChatCompletePrompt) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_chatCompletePrompt() { + return pb_1.Message.getField(this, 2) != null; + } + get modelProviderId() { + return pb_1.Message.getFieldWithDefault(this, 6, "0") as string; + } + set modelProviderId(value: string) { + pb_1.Message.setField(this, 6, value); + } + get modelProviderName() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set modelProviderName(value: string) { + pb_1.Message.setField(this, 7, value); + } + get endpointModelOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 8) as dependency_2.Metadata[]; + } + set endpointModelOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 8, value); + } + static fromObject(data: { + description?: string; + chatCompletePrompt?: ReturnType; + modelProviderId?: string; + modelProviderName?: string; + endpointModelOptions?: ReturnType[]; + }): EndpointProviderModelAttribute { + const message = new EndpointProviderModelAttribute({}); + if (data.description != null) { + message.description = data.description; + } + if (data.chatCompletePrompt != null) { + message.chatCompletePrompt = dependency_2.TextChatCompletePrompt.fromObject(data.chatCompletePrompt); + } + if (data.modelProviderId != null) { + message.modelProviderId = data.modelProviderId; + } + if (data.modelProviderName != null) { + message.modelProviderName = data.modelProviderName; + } + if (data.endpointModelOptions != null) { + message.endpointModelOptions = data.endpointModelOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + return message; + } + toObject() { + const data: { + description?: string; + chatCompletePrompt?: ReturnType; + modelProviderId?: string; + modelProviderName?: string; + endpointModelOptions?: ReturnType[]; + } = {}; + if (this.description != null) { + data.description = this.description; + } + if (this.chatCompletePrompt != null) { + data.chatCompletePrompt = this.chatCompletePrompt.toObject(); + } + if (this.modelProviderId != null) { + data.modelProviderId = this.modelProviderId; + } + if (this.modelProviderName != null) { + data.modelProviderName = this.modelProviderName; + } + if (this.endpointModelOptions != null) { + data.endpointModelOptions = this.endpointModelOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.description.length) + writer.writeString(1, this.description); + if (this.has_chatCompletePrompt) + writer.writeMessage(2, this.chatCompletePrompt, () => this.chatCompletePrompt.serialize(writer)); + if (this.modelProviderId != "0") + writer.writeUint64String(6, this.modelProviderId); + if (this.modelProviderName.length) + writer.writeString(7, this.modelProviderName); + if (this.endpointModelOptions.length) + writer.writeRepeatedMessage(8, this.endpointModelOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EndpointProviderModelAttribute { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EndpointProviderModelAttribute(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.description = reader.readString(); + break; + case 2: + reader.readMessage(message.chatCompletePrompt, () => message.chatCompletePrompt = dependency_2.TextChatCompletePrompt.deserialize(reader)); + break; + case 6: + message.modelProviderId = reader.readUint64String(); + break; + case 7: + message.modelProviderName = reader.readString(); + break; + case 8: + reader.readMessage(message.endpointModelOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 8, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EndpointProviderModelAttribute { + return EndpointProviderModelAttribute.deserialize(bytes); + } + } + export class CreateEndpointRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpointProviderModelAttribute?: EndpointProviderModelAttribute; + endpointAttribute?: EndpointAttribute; + retryConfiguration?: EndpointRetryConfiguration; + cacheConfiguration?: EndpointCacheConfiguration; + tags?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpointProviderModelAttribute" in data && data.endpointProviderModelAttribute != undefined) { + this.endpointProviderModelAttribute = data.endpointProviderModelAttribute; + } + if ("endpointAttribute" in data && data.endpointAttribute != undefined) { + this.endpointAttribute = data.endpointAttribute; + } + if ("retryConfiguration" in data && data.retryConfiguration != undefined) { + this.retryConfiguration = data.retryConfiguration; + } + if ("cacheConfiguration" in data && data.cacheConfiguration != undefined) { + this.cacheConfiguration = data.cacheConfiguration; + } + if ("tags" in data && data.tags != undefined) { + this.tags = data.tags; + } + } + } + get endpointProviderModelAttribute() { + return pb_1.Message.getWrapperField(this, EndpointProviderModelAttribute, 1) as EndpointProviderModelAttribute; + } + set endpointProviderModelAttribute(value: EndpointProviderModelAttribute) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_endpointProviderModelAttribute() { + return pb_1.Message.getField(this, 1) != null; + } + get endpointAttribute() { + return pb_1.Message.getWrapperField(this, EndpointAttribute, 2) as EndpointAttribute; + } + set endpointAttribute(value: EndpointAttribute) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_endpointAttribute() { + return pb_1.Message.getField(this, 2) != null; + } + get retryConfiguration() { + return pb_1.Message.getWrapperField(this, EndpointRetryConfiguration, 3) as EndpointRetryConfiguration; + } + set retryConfiguration(value: EndpointRetryConfiguration) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_retryConfiguration() { + return pb_1.Message.getField(this, 3) != null; + } + get cacheConfiguration() { + return pb_1.Message.getWrapperField(this, EndpointCacheConfiguration, 4) as EndpointCacheConfiguration; + } + set cacheConfiguration(value: EndpointCacheConfiguration) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_cacheConfiguration() { + return pb_1.Message.getField(this, 4) != null; + } + get tags() { + return pb_1.Message.getFieldWithDefault(this, 5, []) as string[]; + } + set tags(value: string[]) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + endpointProviderModelAttribute?: ReturnType; + endpointAttribute?: ReturnType; + retryConfiguration?: ReturnType; + cacheConfiguration?: ReturnType; + tags?: string[]; + }): CreateEndpointRequest { + const message = new CreateEndpointRequest({}); + if (data.endpointProviderModelAttribute != null) { + message.endpointProviderModelAttribute = EndpointProviderModelAttribute.fromObject(data.endpointProviderModelAttribute); + } + if (data.endpointAttribute != null) { + message.endpointAttribute = EndpointAttribute.fromObject(data.endpointAttribute); + } + if (data.retryConfiguration != null) { + message.retryConfiguration = EndpointRetryConfiguration.fromObject(data.retryConfiguration); + } + if (data.cacheConfiguration != null) { + message.cacheConfiguration = EndpointCacheConfiguration.fromObject(data.cacheConfiguration); + } + if (data.tags != null) { + message.tags = data.tags; + } + return message; + } + toObject() { + const data: { + endpointProviderModelAttribute?: ReturnType; + endpointAttribute?: ReturnType; + retryConfiguration?: ReturnType; + cacheConfiguration?: ReturnType; + tags?: string[]; + } = {}; + if (this.endpointProviderModelAttribute != null) { + data.endpointProviderModelAttribute = this.endpointProviderModelAttribute.toObject(); + } + if (this.endpointAttribute != null) { + data.endpointAttribute = this.endpointAttribute.toObject(); + } + if (this.retryConfiguration != null) { + data.retryConfiguration = this.retryConfiguration.toObject(); + } + if (this.cacheConfiguration != null) { + data.cacheConfiguration = this.cacheConfiguration.toObject(); + } + if (this.tags != null) { + data.tags = this.tags; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_endpointProviderModelAttribute) + writer.writeMessage(1, this.endpointProviderModelAttribute, () => this.endpointProviderModelAttribute.serialize(writer)); + if (this.has_endpointAttribute) + writer.writeMessage(2, this.endpointAttribute, () => this.endpointAttribute.serialize(writer)); + if (this.has_retryConfiguration) + writer.writeMessage(3, this.retryConfiguration, () => this.retryConfiguration.serialize(writer)); + if (this.has_cacheConfiguration) + writer.writeMessage(4, this.cacheConfiguration, () => this.cacheConfiguration.serialize(writer)); + if (this.tags.length) + writer.writeRepeatedString(5, this.tags); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateEndpointRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateEndpointRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.endpointProviderModelAttribute, () => message.endpointProviderModelAttribute = EndpointProviderModelAttribute.deserialize(reader)); + break; + case 2: + reader.readMessage(message.endpointAttribute, () => message.endpointAttribute = EndpointAttribute.deserialize(reader)); + break; + case 3: + reader.readMessage(message.retryConfiguration, () => message.retryConfiguration = EndpointRetryConfiguration.deserialize(reader)); + break; + case 4: + reader.readMessage(message.cacheConfiguration, () => message.cacheConfiguration = EndpointCacheConfiguration.deserialize(reader)); + break; + case 5: + pb_1.Message.addToRepeatedField(message, 5, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateEndpointRequest { + return CreateEndpointRequest.deserialize(bytes); + } + } + export class CreateEndpointResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Endpoint; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, Endpoint, 3) as Endpoint; + } + set data(value: Endpoint) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): CreateEndpointResponse { + const message = new CreateEndpointResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = Endpoint.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateEndpointResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateEndpointResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = Endpoint.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateEndpointResponse { + return CreateEndpointResponse.deserialize(bytes); + } + } + export class EndpointProviderModel extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + chatCompletePrompt?: dependency_2.TextChatCompletePrompt; + modelProviderId?: string; + modelProviderName?: string; + endpointModelOptions?: dependency_2.Metadata[]; + status?: string; + createdBy?: string; + createdUser?: dependency_2.User; + updatedBy?: string; + updatedUser?: dependency_2.User; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + endpointId?: string; + description?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("chatCompletePrompt" in data && data.chatCompletePrompt != undefined) { + this.chatCompletePrompt = data.chatCompletePrompt; + } + if ("modelProviderId" in data && data.modelProviderId != undefined) { + this.modelProviderId = data.modelProviderId; + } + if ("modelProviderName" in data && data.modelProviderName != undefined) { + this.modelProviderName = data.modelProviderName; + } + if ("endpointModelOptions" in data && data.endpointModelOptions != undefined) { + this.endpointModelOptions = data.endpointModelOptions; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("createdUser" in data && data.createdUser != undefined) { + this.createdUser = data.createdUser; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("updatedUser" in data && data.updatedUser != undefined) { + this.updatedUser = data.updatedUser; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get chatCompletePrompt() { + return pb_1.Message.getWrapperField(this, dependency_2.TextChatCompletePrompt, 2) as dependency_2.TextChatCompletePrompt; + } + set chatCompletePrompt(value: dependency_2.TextChatCompletePrompt) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_chatCompletePrompt() { + return pb_1.Message.getField(this, 2) != null; + } + get modelProviderId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set modelProviderId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get modelProviderName() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set modelProviderName(value: string) { + pb_1.Message.setField(this, 4, value); + } + get endpointModelOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 5) as dependency_2.Metadata[]; + } + set endpointModelOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 12, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 13, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 13, value); + } + get createdUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 14) as dependency_2.User; + } + set createdUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_createdUser() { + return pb_1.Message.getField(this, 14) != null; + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 15, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 15, value); + } + get updatedUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 16) as dependency_2.User; + } + set updatedUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 16, value); + } + get has_updatedUser() { + return pb_1.Message.getField(this, 16) != null; + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 17) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 17, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 17) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 18) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 18, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 18) != null; + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 19, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 19, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 20, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 20, value); + } + static fromObject(data: { + id?: string; + chatCompletePrompt?: ReturnType; + modelProviderId?: string; + modelProviderName?: string; + endpointModelOptions?: ReturnType[]; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + endpointId?: string; + description?: string; + }): EndpointProviderModel { + const message = new EndpointProviderModel({}); + if (data.id != null) { + message.id = data.id; + } + if (data.chatCompletePrompt != null) { + message.chatCompletePrompt = dependency_2.TextChatCompletePrompt.fromObject(data.chatCompletePrompt); + } + if (data.modelProviderId != null) { + message.modelProviderId = data.modelProviderId; + } + if (data.modelProviderName != null) { + message.modelProviderName = data.modelProviderName; + } + if (data.endpointModelOptions != null) { + message.endpointModelOptions = data.endpointModelOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.createdUser != null) { + message.createdUser = dependency_2.User.fromObject(data.createdUser); + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.updatedUser != null) { + message.updatedUser = dependency_2.User.fromObject(data.updatedUser); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.description != null) { + message.description = data.description; + } + return message; + } + toObject() { + const data: { + id?: string; + chatCompletePrompt?: ReturnType; + modelProviderId?: string; + modelProviderName?: string; + endpointModelOptions?: ReturnType[]; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + endpointId?: string; + description?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.chatCompletePrompt != null) { + data.chatCompletePrompt = this.chatCompletePrompt.toObject(); + } + if (this.modelProviderId != null) { + data.modelProviderId = this.modelProviderId; + } + if (this.modelProviderName != null) { + data.modelProviderName = this.modelProviderName; + } + if (this.endpointModelOptions != null) { + data.endpointModelOptions = this.endpointModelOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.createdUser != null) { + data.createdUser = this.createdUser.toObject(); + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.updatedUser != null) { + data.updatedUser = this.updatedUser.toObject(); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.description != null) { + data.description = this.description; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.has_chatCompletePrompt) + writer.writeMessage(2, this.chatCompletePrompt, () => this.chatCompletePrompt.serialize(writer)); + if (this.modelProviderId != "0") + writer.writeUint64String(3, this.modelProviderId); + if (this.modelProviderName.length) + writer.writeString(4, this.modelProviderName); + if (this.endpointModelOptions.length) + writer.writeRepeatedMessage(5, this.endpointModelOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (this.status.length) + writer.writeString(12, this.status); + if (this.createdBy != "0") + writer.writeUint64String(13, this.createdBy); + if (this.has_createdUser) + writer.writeMessage(14, this.createdUser, () => this.createdUser.serialize(writer)); + if (this.updatedBy != "0") + writer.writeUint64String(15, this.updatedBy); + if (this.has_updatedUser) + writer.writeMessage(16, this.updatedUser, () => this.updatedUser.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(17, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(18, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.endpointId != "0") + writer.writeUint64String(19, this.endpointId); + if (this.description.length) + writer.writeString(20, this.description); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EndpointProviderModel { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EndpointProviderModel(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.chatCompletePrompt, () => message.chatCompletePrompt = dependency_2.TextChatCompletePrompt.deserialize(reader)); + break; + case 3: + message.modelProviderId = reader.readUint64String(); + break; + case 4: + message.modelProviderName = reader.readString(); + break; + case 5: + reader.readMessage(message.endpointModelOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + case 12: + message.status = reader.readString(); + break; + case 13: + message.createdBy = reader.readUint64String(); + break; + case 14: + reader.readMessage(message.createdUser, () => message.createdUser = dependency_2.User.deserialize(reader)); + break; + case 15: + message.updatedBy = reader.readUint64String(); + break; + case 16: + reader.readMessage(message.updatedUser, () => message.updatedUser = dependency_2.User.deserialize(reader)); + break; + case 17: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 18: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 19: + message.endpointId = reader.readUint64String(); + break; + case 20: + message.description = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EndpointProviderModel { + return EndpointProviderModel.deserialize(bytes); + } + } + export class AggregatedEndpointAnalytics extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + count?: string; + totalInputCost?: number; + totalOutputCost?: number; + totalToken?: string; + successCount?: string; + errorCount?: string; + p50Latency?: number; + p99Latency?: number; + lastActivity?: dependency_1.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("count" in data && data.count != undefined) { + this.count = data.count; + } + if ("totalInputCost" in data && data.totalInputCost != undefined) { + this.totalInputCost = data.totalInputCost; + } + if ("totalOutputCost" in data && data.totalOutputCost != undefined) { + this.totalOutputCost = data.totalOutputCost; + } + if ("totalToken" in data && data.totalToken != undefined) { + this.totalToken = data.totalToken; + } + if ("successCount" in data && data.successCount != undefined) { + this.successCount = data.successCount; + } + if ("errorCount" in data && data.errorCount != undefined) { + this.errorCount = data.errorCount; + } + if ("p50Latency" in data && data.p50Latency != undefined) { + this.p50Latency = data.p50Latency; + } + if ("p99Latency" in data && data.p99Latency != undefined) { + this.p99Latency = data.p99Latency; + } + if ("lastActivity" in data && data.lastActivity != undefined) { + this.lastActivity = data.lastActivity; + } + } + } + get count() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set count(value: string) { + pb_1.Message.setField(this, 1, value); + } + get totalInputCost() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set totalInputCost(value: number) { + pb_1.Message.setField(this, 2, value); + } + get totalOutputCost() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set totalOutputCost(value: number) { + pb_1.Message.setField(this, 3, value); + } + get totalToken() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set totalToken(value: string) { + pb_1.Message.setField(this, 4, value); + } + get successCount() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set successCount(value: string) { + pb_1.Message.setField(this, 5, value); + } + get errorCount() { + return pb_1.Message.getFieldWithDefault(this, 6, "0") as string; + } + set errorCount(value: string) { + pb_1.Message.setField(this, 6, value); + } + get p50Latency() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set p50Latency(value: number) { + pb_1.Message.setField(this, 7, value); + } + get p99Latency() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set p99Latency(value: number) { + pb_1.Message.setField(this, 8, value); + } + get lastActivity() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 9) as dependency_1.google.protobuf.Timestamp; + } + set lastActivity(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 9, value); + } + get has_lastActivity() { + return pb_1.Message.getField(this, 9) != null; + } + static fromObject(data: { + count?: string; + totalInputCost?: number; + totalOutputCost?: number; + totalToken?: string; + successCount?: string; + errorCount?: string; + p50Latency?: number; + p99Latency?: number; + lastActivity?: ReturnType; + }): AggregatedEndpointAnalytics { + const message = new AggregatedEndpointAnalytics({}); + if (data.count != null) { + message.count = data.count; + } + if (data.totalInputCost != null) { + message.totalInputCost = data.totalInputCost; + } + if (data.totalOutputCost != null) { + message.totalOutputCost = data.totalOutputCost; + } + if (data.totalToken != null) { + message.totalToken = data.totalToken; + } + if (data.successCount != null) { + message.successCount = data.successCount; + } + if (data.errorCount != null) { + message.errorCount = data.errorCount; + } + if (data.p50Latency != null) { + message.p50Latency = data.p50Latency; + } + if (data.p99Latency != null) { + message.p99Latency = data.p99Latency; + } + if (data.lastActivity != null) { + message.lastActivity = dependency_1.google.protobuf.Timestamp.fromObject(data.lastActivity); + } + return message; + } + toObject() { + const data: { + count?: string; + totalInputCost?: number; + totalOutputCost?: number; + totalToken?: string; + successCount?: string; + errorCount?: string; + p50Latency?: number; + p99Latency?: number; + lastActivity?: ReturnType; + } = {}; + if (this.count != null) { + data.count = this.count; + } + if (this.totalInputCost != null) { + data.totalInputCost = this.totalInputCost; + } + if (this.totalOutputCost != null) { + data.totalOutputCost = this.totalOutputCost; + } + if (this.totalToken != null) { + data.totalToken = this.totalToken; + } + if (this.successCount != null) { + data.successCount = this.successCount; + } + if (this.errorCount != null) { + data.errorCount = this.errorCount; + } + if (this.p50Latency != null) { + data.p50Latency = this.p50Latency; + } + if (this.p99Latency != null) { + data.p99Latency = this.p99Latency; + } + if (this.lastActivity != null) { + data.lastActivity = this.lastActivity.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.count != "0") + writer.writeUint64String(1, this.count); + if (this.totalInputCost != 0) + writer.writeFloat(2, this.totalInputCost); + if (this.totalOutputCost != 0) + writer.writeFloat(3, this.totalOutputCost); + if (this.totalToken != "0") + writer.writeUint64String(4, this.totalToken); + if (this.successCount != "0") + writer.writeUint64String(5, this.successCount); + if (this.errorCount != "0") + writer.writeUint64String(6, this.errorCount); + if (this.p50Latency != 0) + writer.writeFloat(7, this.p50Latency); + if (this.p99Latency != 0) + writer.writeFloat(8, this.p99Latency); + if (this.has_lastActivity) + writer.writeMessage(9, this.lastActivity, () => this.lastActivity.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AggregatedEndpointAnalytics { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AggregatedEndpointAnalytics(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.count = reader.readUint64String(); + break; + case 2: + message.totalInputCost = reader.readFloat(); + break; + case 3: + message.totalOutputCost = reader.readFloat(); + break; + case 4: + message.totalToken = reader.readUint64String(); + break; + case 5: + message.successCount = reader.readUint64String(); + break; + case 6: + message.errorCount = reader.readUint64String(); + break; + case 7: + message.p50Latency = reader.readFloat(); + break; + case 8: + message.p99Latency = reader.readFloat(); + break; + case 9: + reader.readMessage(message.lastActivity, () => message.lastActivity = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AggregatedEndpointAnalytics { + return AggregatedEndpointAnalytics.deserialize(bytes); + } + } + export class Endpoint extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + status?: string; + visibility?: string; + source?: string; + sourceIdentifier?: string; + projectId?: string; + organizationId?: string; + endpointProviderModelId?: string; + endpointProviderModel?: EndpointProviderModel; + endpointAnalytics?: AggregatedEndpointAnalytics; + endpointRetry?: EndpointRetryConfiguration; + endpointCaching?: EndpointCacheConfiguration; + endpointTag?: dependency_2.Tag; + language?: string; + organization?: dependency_2.Organization; + name?: string; + description?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + createdBy?: string; + createdUser?: dependency_2.User; + updatedBy?: string; + updatedUser?: dependency_2.User; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("visibility" in data && data.visibility != undefined) { + this.visibility = data.visibility; + } + if ("source" in data && data.source != undefined) { + this.source = data.source; + } + if ("sourceIdentifier" in data && data.sourceIdentifier != undefined) { + this.sourceIdentifier = data.sourceIdentifier; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("endpointProviderModelId" in data && data.endpointProviderModelId != undefined) { + this.endpointProviderModelId = data.endpointProviderModelId; + } + if ("endpointProviderModel" in data && data.endpointProviderModel != undefined) { + this.endpointProviderModel = data.endpointProviderModel; + } + if ("endpointAnalytics" in data && data.endpointAnalytics != undefined) { + this.endpointAnalytics = data.endpointAnalytics; + } + if ("endpointRetry" in data && data.endpointRetry != undefined) { + this.endpointRetry = data.endpointRetry; + } + if ("endpointCaching" in data && data.endpointCaching != undefined) { + this.endpointCaching = data.endpointCaching; + } + if ("endpointTag" in data && data.endpointTag != undefined) { + this.endpointTag = data.endpointTag; + } + if ("language" in data && data.language != undefined) { + this.language = data.language; + } + if ("organization" in data && data.organization != undefined) { + this.organization = data.organization; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("createdUser" in data && data.createdUser != undefined) { + this.createdUser = data.createdUser; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("updatedUser" in data && data.updatedUser != undefined) { + this.updatedUser = data.updatedUser; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 2, value); + } + get visibility() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set visibility(value: string) { + pb_1.Message.setField(this, 3, value); + } + get source() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set source(value: string) { + pb_1.Message.setField(this, 4, value); + } + get sourceIdentifier() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set sourceIdentifier(value: string) { + pb_1.Message.setField(this, 5, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 7, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 7, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 8, value); + } + get endpointProviderModelId() { + return pb_1.Message.getFieldWithDefault(this, 9, "0") as string; + } + set endpointProviderModelId(value: string) { + pb_1.Message.setField(this, 9, value); + } + get endpointProviderModel() { + return pb_1.Message.getWrapperField(this, EndpointProviderModel, 10) as EndpointProviderModel; + } + set endpointProviderModel(value: EndpointProviderModel) { + pb_1.Message.setWrapperField(this, 10, value); + } + get has_endpointProviderModel() { + return pb_1.Message.getField(this, 10) != null; + } + get endpointAnalytics() { + return pb_1.Message.getWrapperField(this, AggregatedEndpointAnalytics, 11) as AggregatedEndpointAnalytics; + } + set endpointAnalytics(value: AggregatedEndpointAnalytics) { + pb_1.Message.setWrapperField(this, 11, value); + } + get has_endpointAnalytics() { + return pb_1.Message.getField(this, 11) != null; + } + get endpointRetry() { + return pb_1.Message.getWrapperField(this, EndpointRetryConfiguration, 12) as EndpointRetryConfiguration; + } + set endpointRetry(value: EndpointRetryConfiguration) { + pb_1.Message.setWrapperField(this, 12, value); + } + get has_endpointRetry() { + return pb_1.Message.getField(this, 12) != null; + } + get endpointCaching() { + return pb_1.Message.getWrapperField(this, EndpointCacheConfiguration, 13) as EndpointCacheConfiguration; + } + set endpointCaching(value: EndpointCacheConfiguration) { + pb_1.Message.setWrapperField(this, 13, value); + } + get has_endpointCaching() { + return pb_1.Message.getField(this, 13) != null; + } + get endpointTag() { + return pb_1.Message.getWrapperField(this, dependency_2.Tag, 14) as dependency_2.Tag; + } + set endpointTag(value: dependency_2.Tag) { + pb_1.Message.setWrapperField(this, 14, value); + } + get has_endpointTag() { + return pb_1.Message.getField(this, 14) != null; + } + get language() { + return pb_1.Message.getFieldWithDefault(this, 16, "") as string; + } + set language(value: string) { + pb_1.Message.setField(this, 16, value); + } + get organization() { + return pb_1.Message.getWrapperField(this, dependency_2.Organization, 17) as dependency_2.Organization; + } + set organization(value: dependency_2.Organization) { + pb_1.Message.setWrapperField(this, 17, value); + } + get has_organization() { + return pb_1.Message.getField(this, 17) != null; + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 18, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 18, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 19, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 19, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 20) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 20, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 20) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 21) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 21, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 21) != null; + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 22, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 22, value); + } + get createdUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 23) as dependency_2.User; + } + set createdUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 23, value); + } + get has_createdUser() { + return pb_1.Message.getField(this, 23) != null; + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 24, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 24, value); + } + get updatedUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 25) as dependency_2.User; + } + set updatedUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 25, value); + } + get has_updatedUser() { + return pb_1.Message.getField(this, 25) != null; + } + static fromObject(data: { + id?: string; + status?: string; + visibility?: string; + source?: string; + sourceIdentifier?: string; + projectId?: string; + organizationId?: string; + endpointProviderModelId?: string; + endpointProviderModel?: ReturnType; + endpointAnalytics?: ReturnType; + endpointRetry?: ReturnType; + endpointCaching?: ReturnType; + endpointTag?: ReturnType; + language?: string; + organization?: ReturnType; + name?: string; + description?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + }): Endpoint { + const message = new Endpoint({}); + if (data.id != null) { + message.id = data.id; + } + if (data.status != null) { + message.status = data.status; + } + if (data.visibility != null) { + message.visibility = data.visibility; + } + if (data.source != null) { + message.source = data.source; + } + if (data.sourceIdentifier != null) { + message.sourceIdentifier = data.sourceIdentifier; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.endpointProviderModelId != null) { + message.endpointProviderModelId = data.endpointProviderModelId; + } + if (data.endpointProviderModel != null) { + message.endpointProviderModel = EndpointProviderModel.fromObject(data.endpointProviderModel); + } + if (data.endpointAnalytics != null) { + message.endpointAnalytics = AggregatedEndpointAnalytics.fromObject(data.endpointAnalytics); + } + if (data.endpointRetry != null) { + message.endpointRetry = EndpointRetryConfiguration.fromObject(data.endpointRetry); + } + if (data.endpointCaching != null) { + message.endpointCaching = EndpointCacheConfiguration.fromObject(data.endpointCaching); + } + if (data.endpointTag != null) { + message.endpointTag = dependency_2.Tag.fromObject(data.endpointTag); + } + if (data.language != null) { + message.language = data.language; + } + if (data.organization != null) { + message.organization = dependency_2.Organization.fromObject(data.organization); + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.createdUser != null) { + message.createdUser = dependency_2.User.fromObject(data.createdUser); + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.updatedUser != null) { + message.updatedUser = dependency_2.User.fromObject(data.updatedUser); + } + return message; + } + toObject() { + const data: { + id?: string; + status?: string; + visibility?: string; + source?: string; + sourceIdentifier?: string; + projectId?: string; + organizationId?: string; + endpointProviderModelId?: string; + endpointProviderModel?: ReturnType; + endpointAnalytics?: ReturnType; + endpointRetry?: ReturnType; + endpointCaching?: ReturnType; + endpointTag?: ReturnType; + language?: string; + organization?: ReturnType; + name?: string; + description?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.status != null) { + data.status = this.status; + } + if (this.visibility != null) { + data.visibility = this.visibility; + } + if (this.source != null) { + data.source = this.source; + } + if (this.sourceIdentifier != null) { + data.sourceIdentifier = this.sourceIdentifier; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.endpointProviderModelId != null) { + data.endpointProviderModelId = this.endpointProviderModelId; + } + if (this.endpointProviderModel != null) { + data.endpointProviderModel = this.endpointProviderModel.toObject(); + } + if (this.endpointAnalytics != null) { + data.endpointAnalytics = this.endpointAnalytics.toObject(); + } + if (this.endpointRetry != null) { + data.endpointRetry = this.endpointRetry.toObject(); + } + if (this.endpointCaching != null) { + data.endpointCaching = this.endpointCaching.toObject(); + } + if (this.endpointTag != null) { + data.endpointTag = this.endpointTag.toObject(); + } + if (this.language != null) { + data.language = this.language; + } + if (this.organization != null) { + data.organization = this.organization.toObject(); + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.createdUser != null) { + data.createdUser = this.createdUser.toObject(); + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.updatedUser != null) { + data.updatedUser = this.updatedUser.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.status.length) + writer.writeString(2, this.status); + if (this.visibility.length) + writer.writeString(3, this.visibility); + if (this.source.length) + writer.writeString(4, this.source); + if (this.sourceIdentifier != "0") + writer.writeUint64String(5, this.sourceIdentifier); + if (this.projectId != "0") + writer.writeUint64String(7, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(8, this.organizationId); + if (this.endpointProviderModelId != "0") + writer.writeUint64String(9, this.endpointProviderModelId); + if (this.has_endpointProviderModel) + writer.writeMessage(10, this.endpointProviderModel, () => this.endpointProviderModel.serialize(writer)); + if (this.has_endpointAnalytics) + writer.writeMessage(11, this.endpointAnalytics, () => this.endpointAnalytics.serialize(writer)); + if (this.has_endpointRetry) + writer.writeMessage(12, this.endpointRetry, () => this.endpointRetry.serialize(writer)); + if (this.has_endpointCaching) + writer.writeMessage(13, this.endpointCaching, () => this.endpointCaching.serialize(writer)); + if (this.has_endpointTag) + writer.writeMessage(14, this.endpointTag, () => this.endpointTag.serialize(writer)); + if (this.language.length) + writer.writeString(16, this.language); + if (this.has_organization) + writer.writeMessage(17, this.organization, () => this.organization.serialize(writer)); + if (this.name.length) + writer.writeString(18, this.name); + if (this.description.length) + writer.writeString(19, this.description); + if (this.has_createdDate) + writer.writeMessage(20, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(21, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.createdBy != "0") + writer.writeUint64String(22, this.createdBy); + if (this.has_createdUser) + writer.writeMessage(23, this.createdUser, () => this.createdUser.serialize(writer)); + if (this.updatedBy != "0") + writer.writeUint64String(24, this.updatedBy); + if (this.has_updatedUser) + writer.writeMessage(25, this.updatedUser, () => this.updatedUser.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Endpoint { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Endpoint(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.status = reader.readString(); + break; + case 3: + message.visibility = reader.readString(); + break; + case 4: + message.source = reader.readString(); + break; + case 5: + message.sourceIdentifier = reader.readUint64String(); + break; + case 7: + message.projectId = reader.readUint64String(); + break; + case 8: + message.organizationId = reader.readUint64String(); + break; + case 9: + message.endpointProviderModelId = reader.readUint64String(); + break; + case 10: + reader.readMessage(message.endpointProviderModel, () => message.endpointProviderModel = EndpointProviderModel.deserialize(reader)); + break; + case 11: + reader.readMessage(message.endpointAnalytics, () => message.endpointAnalytics = AggregatedEndpointAnalytics.deserialize(reader)); + break; + case 12: + reader.readMessage(message.endpointRetry, () => message.endpointRetry = EndpointRetryConfiguration.deserialize(reader)); + break; + case 13: + reader.readMessage(message.endpointCaching, () => message.endpointCaching = EndpointCacheConfiguration.deserialize(reader)); + break; + case 14: + reader.readMessage(message.endpointTag, () => message.endpointTag = dependency_2.Tag.deserialize(reader)); + break; + case 16: + message.language = reader.readString(); + break; + case 17: + reader.readMessage(message.organization, () => message.organization = dependency_2.Organization.deserialize(reader)); + break; + case 18: + message.name = reader.readString(); + break; + case 19: + message.description = reader.readString(); + break; + case 20: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 21: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 22: + message.createdBy = reader.readUint64String(); + break; + case 23: + reader.readMessage(message.createdUser, () => message.createdUser = dependency_2.User.deserialize(reader)); + break; + case 24: + message.updatedBy = reader.readUint64String(); + break; + case 25: + reader.readMessage(message.updatedUser, () => message.updatedUser = dependency_2.User.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Endpoint { + return Endpoint.deserialize(bytes); + } + } + export class CreateEndpointProviderModelRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpointId?: string; + endpointProviderModelAttribute?: EndpointProviderModelAttribute; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("endpointProviderModelAttribute" in data && data.endpointProviderModelAttribute != undefined) { + this.endpointProviderModelAttribute = data.endpointProviderModelAttribute; + } + } + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get endpointProviderModelAttribute() { + return pb_1.Message.getWrapperField(this, EndpointProviderModelAttribute, 2) as EndpointProviderModelAttribute; + } + set endpointProviderModelAttribute(value: EndpointProviderModelAttribute) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_endpointProviderModelAttribute() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + endpointId?: string; + endpointProviderModelAttribute?: ReturnType; + }): CreateEndpointProviderModelRequest { + const message = new CreateEndpointProviderModelRequest({}); + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.endpointProviderModelAttribute != null) { + message.endpointProviderModelAttribute = EndpointProviderModelAttribute.fromObject(data.endpointProviderModelAttribute); + } + return message; + } + toObject() { + const data: { + endpointId?: string; + endpointProviderModelAttribute?: ReturnType; + } = {}; + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.endpointProviderModelAttribute != null) { + data.endpointProviderModelAttribute = this.endpointProviderModelAttribute.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.endpointId != "0") + writer.writeUint64String(1, this.endpointId); + if (this.has_endpointProviderModelAttribute) + writer.writeMessage(2, this.endpointProviderModelAttribute, () => this.endpointProviderModelAttribute.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateEndpointProviderModelRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateEndpointProviderModelRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.endpointId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.endpointProviderModelAttribute, () => message.endpointProviderModelAttribute = EndpointProviderModelAttribute.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateEndpointProviderModelRequest { + return CreateEndpointProviderModelRequest.deserialize(bytes); + } + } + export class CreateEndpointProviderModelResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: EndpointProviderModel; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, EndpointProviderModel, 3) as EndpointProviderModel; + } + set data(value: EndpointProviderModel) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): CreateEndpointProviderModelResponse { + const message = new CreateEndpointProviderModelResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = EndpointProviderModel.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateEndpointProviderModelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateEndpointProviderModelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = EndpointProviderModel.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateEndpointProviderModelResponse { + return CreateEndpointProviderModelResponse.deserialize(bytes); + } + } + export class GetEndpointRequest extends pb_1.Message { + #one_of_decls: number[][] = [[4]]; + constructor(data?: any[] | ({ + id?: string; + } & (({ + endpointProviderModelId?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("endpointProviderModelId" in data && data.endpointProviderModelId != undefined) { + this.endpointProviderModelId = data.endpointProviderModelId; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get endpointProviderModelId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set endpointProviderModelId(value: string) { + pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value); + } + get has_endpointProviderModelId() { + return pb_1.Message.getField(this, 4) != null; + } + get _endpointProviderModelId() { + const cases: { + [index: number]: "none" | "endpointProviderModelId"; + } = { + 0: "none", + 4: "endpointProviderModelId" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + static fromObject(data: { + id?: string; + endpointProviderModelId?: string; + }): GetEndpointRequest { + const message = new GetEndpointRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.endpointProviderModelId != null) { + message.endpointProviderModelId = data.endpointProviderModelId; + } + return message; + } + toObject() { + const data: { + id?: string; + endpointProviderModelId?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.endpointProviderModelId != null) { + data.endpointProviderModelId = this.endpointProviderModelId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.has_endpointProviderModelId) + writer.writeUint64String(4, this.endpointProviderModelId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetEndpointRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetEndpointRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 4: + message.endpointProviderModelId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetEndpointRequest { + return GetEndpointRequest.deserialize(bytes); + } + } + export class GetEndpointResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Endpoint; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, Endpoint, 3) as Endpoint; + } + set data(value: Endpoint) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetEndpointResponse { + const message = new GetEndpointResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = Endpoint.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetEndpointResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetEndpointResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = Endpoint.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetEndpointResponse { + return GetEndpointResponse.deserialize(bytes); + } + } + export class GetAllEndpointRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllEndpointRequest { + const message = new GetAllEndpointRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllEndpointRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllEndpointRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllEndpointRequest { + return GetAllEndpointRequest.deserialize(bytes); + } + } + export class GetAllEndpointResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Endpoint[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, Endpoint, 3) as Endpoint[]; + } + set data(value: Endpoint[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllEndpointResponse { + const message = new GetAllEndpointResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => Endpoint.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: Endpoint) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: Endpoint) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllEndpointResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllEndpointResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Endpoint.deserialize(reader), Endpoint)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllEndpointResponse { + return GetAllEndpointResponse.deserialize(bytes); + } + } + export class GetAllEndpointProviderModelRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + endpointId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + endpointId?: string; + }): GetAllEndpointProviderModelRequest { + const message = new GetAllEndpointProviderModelRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + endpointId?: string; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.endpointId != "0") + writer.writeUint64String(5, this.endpointId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllEndpointProviderModelRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllEndpointProviderModelRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 5: + message.endpointId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllEndpointProviderModelRequest { + return GetAllEndpointProviderModelRequest.deserialize(bytes); + } + } + export class GetAllEndpointProviderModelResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: EndpointProviderModel[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, EndpointProviderModel, 3) as EndpointProviderModel[]; + } + set data(value: EndpointProviderModel[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllEndpointProviderModelResponse { + const message = new GetAllEndpointProviderModelResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => EndpointProviderModel.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: EndpointProviderModel) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: EndpointProviderModel) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllEndpointProviderModelResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllEndpointProviderModelResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, EndpointProviderModel.deserialize(reader), EndpointProviderModel)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllEndpointProviderModelResponse { + return GetAllEndpointProviderModelResponse.deserialize(bytes); + } + } + export class UpdateEndpointVersionRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpointId?: string; + endpointProviderModelId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("endpointProviderModelId" in data && data.endpointProviderModelId != undefined) { + this.endpointProviderModelId = data.endpointProviderModelId; + } + } + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get endpointProviderModelId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set endpointProviderModelId(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + endpointId?: string; + endpointProviderModelId?: string; + }): UpdateEndpointVersionRequest { + const message = new UpdateEndpointVersionRequest({}); + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.endpointProviderModelId != null) { + message.endpointProviderModelId = data.endpointProviderModelId; + } + return message; + } + toObject() { + const data: { + endpointId?: string; + endpointProviderModelId?: string; + } = {}; + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.endpointProviderModelId != null) { + data.endpointProviderModelId = this.endpointProviderModelId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.endpointId != "0") + writer.writeUint64String(1, this.endpointId); + if (this.endpointProviderModelId != "0") + writer.writeUint64String(2, this.endpointProviderModelId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateEndpointVersionRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateEndpointVersionRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.endpointId = reader.readUint64String(); + break; + case 2: + message.endpointProviderModelId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateEndpointVersionRequest { + return UpdateEndpointVersionRequest.deserialize(bytes); + } + } + export class UpdateEndpointVersionResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Endpoint; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, Endpoint, 3) as Endpoint; + } + set data(value: Endpoint) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): UpdateEndpointVersionResponse { + const message = new UpdateEndpointVersionResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = Endpoint.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateEndpointVersionResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateEndpointVersionResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = Endpoint.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateEndpointVersionResponse { + return UpdateEndpointVersionResponse.deserialize(bytes); + } + } + export class EndpointRetryConfiguration extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + retryType?: string; + maxAttempts?: string; + delaySeconds?: string; + exponentialBackoff?: boolean; + retryables?: string[]; + createdBy?: string; + updatedBy?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("retryType" in data && data.retryType != undefined) { + this.retryType = data.retryType; + } + if ("maxAttempts" in data && data.maxAttempts != undefined) { + this.maxAttempts = data.maxAttempts; + } + if ("delaySeconds" in data && data.delaySeconds != undefined) { + this.delaySeconds = data.delaySeconds; + } + if ("exponentialBackoff" in data && data.exponentialBackoff != undefined) { + this.exponentialBackoff = data.exponentialBackoff; + } + if ("retryables" in data && data.retryables != undefined) { + this.retryables = data.retryables; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + } + } + get retryType() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set retryType(value: string) { + pb_1.Message.setField(this, 2, value); + } + get maxAttempts() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set maxAttempts(value: string) { + pb_1.Message.setField(this, 3, value); + } + get delaySeconds() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set delaySeconds(value: string) { + pb_1.Message.setField(this, 4, value); + } + get exponentialBackoff() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + set exponentialBackoff(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + get retryables() { + return pb_1.Message.getFieldWithDefault(this, 6, []) as string[]; + } + set retryables(value: string[]) { + pb_1.Message.setField(this, 6, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 8, value); + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 9, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 9, value); + } + static fromObject(data: { + retryType?: string; + maxAttempts?: string; + delaySeconds?: string; + exponentialBackoff?: boolean; + retryables?: string[]; + createdBy?: string; + updatedBy?: string; + }): EndpointRetryConfiguration { + const message = new EndpointRetryConfiguration({}); + if (data.retryType != null) { + message.retryType = data.retryType; + } + if (data.maxAttempts != null) { + message.maxAttempts = data.maxAttempts; + } + if (data.delaySeconds != null) { + message.delaySeconds = data.delaySeconds; + } + if (data.exponentialBackoff != null) { + message.exponentialBackoff = data.exponentialBackoff; + } + if (data.retryables != null) { + message.retryables = data.retryables; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + return message; + } + toObject() { + const data: { + retryType?: string; + maxAttempts?: string; + delaySeconds?: string; + exponentialBackoff?: boolean; + retryables?: string[]; + createdBy?: string; + updatedBy?: string; + } = {}; + if (this.retryType != null) { + data.retryType = this.retryType; + } + if (this.maxAttempts != null) { + data.maxAttempts = this.maxAttempts; + } + if (this.delaySeconds != null) { + data.delaySeconds = this.delaySeconds; + } + if (this.exponentialBackoff != null) { + data.exponentialBackoff = this.exponentialBackoff; + } + if (this.retryables != null) { + data.retryables = this.retryables; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.retryType.length) + writer.writeString(2, this.retryType); + if (this.maxAttempts != "0") + writer.writeUint64String(3, this.maxAttempts); + if (this.delaySeconds != "0") + writer.writeUint64String(4, this.delaySeconds); + if (this.exponentialBackoff != false) + writer.writeBool(5, this.exponentialBackoff); + if (this.retryables.length) + writer.writeRepeatedString(6, this.retryables); + if (this.createdBy != "0") + writer.writeUint64String(8, this.createdBy); + if (this.updatedBy != "0") + writer.writeUint64String(9, this.updatedBy); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EndpointRetryConfiguration { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EndpointRetryConfiguration(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.retryType = reader.readString(); + break; + case 3: + message.maxAttempts = reader.readUint64String(); + break; + case 4: + message.delaySeconds = reader.readUint64String(); + break; + case 5: + message.exponentialBackoff = reader.readBool(); + break; + case 6: + pb_1.Message.addToRepeatedField(message, 6, reader.readString()); + break; + case 8: + message.createdBy = reader.readUint64String(); + break; + case 9: + message.updatedBy = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EndpointRetryConfiguration { + return EndpointRetryConfiguration.deserialize(bytes); + } + } + export class EndpointCacheConfiguration extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + cacheType?: string; + expiryInterval?: string; + matchThreshold?: number; + createdBy?: string; + updatedBy?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("cacheType" in data && data.cacheType != undefined) { + this.cacheType = data.cacheType; + } + if ("expiryInterval" in data && data.expiryInterval != undefined) { + this.expiryInterval = data.expiryInterval; + } + if ("matchThreshold" in data && data.matchThreshold != undefined) { + this.matchThreshold = data.matchThreshold; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + } + } + get cacheType() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set cacheType(value: string) { + pb_1.Message.setField(this, 2, value); + } + get expiryInterval() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set expiryInterval(value: string) { + pb_1.Message.setField(this, 3, value); + } + get matchThreshold() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set matchThreshold(value: number) { + pb_1.Message.setField(this, 4, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 5, value); + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 6, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + cacheType?: string; + expiryInterval?: string; + matchThreshold?: number; + createdBy?: string; + updatedBy?: string; + }): EndpointCacheConfiguration { + const message = new EndpointCacheConfiguration({}); + if (data.cacheType != null) { + message.cacheType = data.cacheType; + } + if (data.expiryInterval != null) { + message.expiryInterval = data.expiryInterval; + } + if (data.matchThreshold != null) { + message.matchThreshold = data.matchThreshold; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + return message; + } + toObject() { + const data: { + cacheType?: string; + expiryInterval?: string; + matchThreshold?: number; + createdBy?: string; + updatedBy?: string; + } = {}; + if (this.cacheType != null) { + data.cacheType = this.cacheType; + } + if (this.expiryInterval != null) { + data.expiryInterval = this.expiryInterval; + } + if (this.matchThreshold != null) { + data.matchThreshold = this.matchThreshold; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.cacheType.length) + writer.writeString(2, this.cacheType); + if (this.expiryInterval != "0") + writer.writeUint64String(3, this.expiryInterval); + if (this.matchThreshold != 0) + writer.writeFloat(4, this.matchThreshold); + if (this.createdBy != "0") + writer.writeUint64String(5, this.createdBy); + if (this.updatedBy != "0") + writer.writeUint64String(6, this.updatedBy); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EndpointCacheConfiguration { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EndpointCacheConfiguration(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.cacheType = reader.readString(); + break; + case 3: + message.expiryInterval = reader.readUint64String(); + break; + case 4: + message.matchThreshold = reader.readFloat(); + break; + case 5: + message.createdBy = reader.readUint64String(); + break; + case 6: + message.updatedBy = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EndpointCacheConfiguration { + return EndpointCacheConfiguration.deserialize(bytes); + } + } + export class CreateEndpointRetryConfigurationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpointId?: string; + data?: EndpointRetryConfiguration; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get data() { + return pb_1.Message.getWrapperField(this, EndpointRetryConfiguration, 2) as EndpointRetryConfiguration; + } + set data(value: EndpointRetryConfiguration) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_data() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + endpointId?: string; + data?: ReturnType; + }): CreateEndpointRetryConfigurationRequest { + const message = new CreateEndpointRetryConfigurationRequest({}); + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.data != null) { + message.data = EndpointRetryConfiguration.fromObject(data.data); + } + return message; + } + toObject() { + const data: { + endpointId?: string; + data?: ReturnType; + } = {}; + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.endpointId != "0") + writer.writeUint64String(1, this.endpointId); + if (this.has_data) + writer.writeMessage(2, this.data, () => this.data.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateEndpointRetryConfigurationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateEndpointRetryConfigurationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.endpointId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.data, () => message.data = EndpointRetryConfiguration.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateEndpointRetryConfigurationRequest { + return CreateEndpointRetryConfigurationRequest.deserialize(bytes); + } + } + export class CreateEndpointRetryConfigurationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: EndpointRetryConfiguration; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, EndpointRetryConfiguration, 3) as EndpointRetryConfiguration; + } + set data(value: EndpointRetryConfiguration) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): CreateEndpointRetryConfigurationResponse { + const message = new CreateEndpointRetryConfigurationResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = EndpointRetryConfiguration.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateEndpointRetryConfigurationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateEndpointRetryConfigurationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = EndpointRetryConfiguration.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateEndpointRetryConfigurationResponse { + return CreateEndpointRetryConfigurationResponse.deserialize(bytes); + } + } + export class CreateEndpointCacheConfigurationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpointId?: string; + data?: EndpointCacheConfiguration; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get data() { + return pb_1.Message.getWrapperField(this, EndpointCacheConfiguration, 2) as EndpointCacheConfiguration; + } + set data(value: EndpointCacheConfiguration) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_data() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + endpointId?: string; + data?: ReturnType; + }): CreateEndpointCacheConfigurationRequest { + const message = new CreateEndpointCacheConfigurationRequest({}); + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.data != null) { + message.data = EndpointCacheConfiguration.fromObject(data.data); + } + return message; + } + toObject() { + const data: { + endpointId?: string; + data?: ReturnType; + } = {}; + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.endpointId != "0") + writer.writeUint64String(1, this.endpointId); + if (this.has_data) + writer.writeMessage(2, this.data, () => this.data.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateEndpointCacheConfigurationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateEndpointCacheConfigurationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.endpointId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.data, () => message.data = EndpointCacheConfiguration.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateEndpointCacheConfigurationRequest { + return CreateEndpointCacheConfigurationRequest.deserialize(bytes); + } + } + export class CreateEndpointCacheConfigurationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: EndpointCacheConfiguration; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, EndpointCacheConfiguration, 3) as EndpointCacheConfiguration; + } + set data(value: EndpointCacheConfiguration) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): CreateEndpointCacheConfigurationResponse { + const message = new CreateEndpointCacheConfigurationResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = EndpointCacheConfiguration.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateEndpointCacheConfigurationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateEndpointCacheConfigurationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = EndpointCacheConfiguration.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateEndpointCacheConfigurationResponse { + return CreateEndpointCacheConfigurationResponse.deserialize(bytes); + } + } + export class CreateEndpointTagRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpointId?: string; + tags?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("tags" in data && data.tags != undefined) { + this.tags = data.tags; + } + } + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get tags() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set tags(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + endpointId?: string; + tags?: string[]; + }): CreateEndpointTagRequest { + const message = new CreateEndpointTagRequest({}); + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.tags != null) { + message.tags = data.tags; + } + return message; + } + toObject() { + const data: { + endpointId?: string; + tags?: string[]; + } = {}; + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.tags != null) { + data.tags = this.tags; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.endpointId != "0") + writer.writeUint64String(1, this.endpointId); + if (this.tags.length) + writer.writeRepeatedString(2, this.tags); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateEndpointTagRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateEndpointTagRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.endpointId = reader.readUint64String(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateEndpointTagRequest { + return CreateEndpointTagRequest.deserialize(bytes); + } + } + export class ForkEndpointRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpointId?: string; + endpointProviderId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("endpointProviderId" in data && data.endpointProviderId != undefined) { + this.endpointProviderId = data.endpointProviderId; + } + } + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get endpointProviderId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set endpointProviderId(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + endpointId?: string; + endpointProviderId?: string; + }): ForkEndpointRequest { + const message = new ForkEndpointRequest({}); + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.endpointProviderId != null) { + message.endpointProviderId = data.endpointProviderId; + } + return message; + } + toObject() { + const data: { + endpointId?: string; + endpointProviderId?: string; + } = {}; + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.endpointProviderId != null) { + data.endpointProviderId = this.endpointProviderId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.endpointId != "0") + writer.writeUint64String(1, this.endpointId); + if (this.endpointProviderId != "0") + writer.writeUint64String(3, this.endpointProviderId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ForkEndpointRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ForkEndpointRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.endpointId = reader.readUint64String(); + break; + case 3: + message.endpointProviderId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ForkEndpointRequest { + return ForkEndpointRequest.deserialize(bytes); + } + } + export class UpdateEndpointDetailRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpointId?: string; + name?: string; + description?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + } + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + endpointId?: string; + name?: string; + description?: string; + }): UpdateEndpointDetailRequest { + const message = new UpdateEndpointDetailRequest({}); + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + return message; + } + toObject() { + const data: { + endpointId?: string; + name?: string; + description?: string; + } = {}; + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.endpointId != "0") + writer.writeUint64String(1, this.endpointId); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateEndpointDetailRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateEndpointDetailRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.endpointId = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateEndpointDetailRequest { + return UpdateEndpointDetailRequest.deserialize(bytes); + } + } + export class EndpointLog extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + endpointId?: string; + source?: string; + status?: string; + projectId?: string; + organizationId?: string; + endpointProviderModelId?: string; + timeTaken?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + metrics?: dependency_2.Metric[]; + metadata?: dependency_2.Metadata[]; + arguments?: dependency_2.Argument[]; + options?: dependency_2.Metadata[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [30, 32, 31, 33], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("source" in data && data.source != undefined) { + this.source = data.source; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("endpointProviderModelId" in data && data.endpointProviderModelId != undefined) { + this.endpointProviderModelId = data.endpointProviderModelId; + } + if ("timeTaken" in data && data.timeTaken != undefined) { + this.timeTaken = data.timeTaken; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("arguments" in data && data.arguments != undefined) { + this.arguments = data.arguments; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get source() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set source(value: string) { + pb_1.Message.setField(this, 3, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 15, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 15, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 16, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 16, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 17, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 17, value); + } + get endpointProviderModelId() { + return pb_1.Message.getFieldWithDefault(this, 19, "0") as string; + } + set endpointProviderModelId(value: string) { + pb_1.Message.setField(this, 19, value); + } + get timeTaken() { + return pb_1.Message.getFieldWithDefault(this, 25, "0") as string; + } + set timeTaken(value: string) { + pb_1.Message.setField(this, 25, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metric, 30) as dependency_2.Metric[]; + } + set metrics(value: dependency_2.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 30, value); + } + get metadata() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 32) as dependency_2.Metadata[]; + } + set metadata(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 32, value); + } + get arguments() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Argument, 31) as dependency_2.Argument[]; + } + set arguments(value: dependency_2.Argument[]) { + pb_1.Message.setRepeatedWrapperField(this, 31, value); + } + get options() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 33) as dependency_2.Metadata[]; + } + set options(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 33, value); + } + static fromObject(data: { + id?: string; + endpointId?: string; + source?: string; + status?: string; + projectId?: string; + organizationId?: string; + endpointProviderModelId?: string; + timeTaken?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + metrics?: ReturnType[]; + metadata?: ReturnType[]; + arguments?: ReturnType[]; + options?: ReturnType[]; + }): EndpointLog { + const message = new EndpointLog({}); + if (data.id != null) { + message.id = data.id; + } + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.source != null) { + message.source = data.source; + } + if (data.status != null) { + message.status = data.status; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.endpointProviderModelId != null) { + message.endpointProviderModelId = data.endpointProviderModelId; + } + if (data.timeTaken != null) { + message.timeTaken = data.timeTaken; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => dependency_2.Metric.fromObject(item)); + } + if (data.metadata != null) { + message.metadata = data.metadata.map(item => dependency_2.Metadata.fromObject(item)); + } + if (data.arguments != null) { + message.arguments = data.arguments.map(item => dependency_2.Argument.fromObject(item)); + } + if (data.options != null) { + message.options = data.options.map(item => dependency_2.Metadata.fromObject(item)); + } + return message; + } + toObject() { + const data: { + id?: string; + endpointId?: string; + source?: string; + status?: string; + projectId?: string; + organizationId?: string; + endpointProviderModelId?: string; + timeTaken?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + metrics?: ReturnType[]; + metadata?: ReturnType[]; + arguments?: ReturnType[]; + options?: ReturnType[]; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.source != null) { + data.source = this.source; + } + if (this.status != null) { + data.status = this.status; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.endpointProviderModelId != null) { + data.endpointProviderModelId = this.endpointProviderModelId; + } + if (this.timeTaken != null) { + data.timeTaken = this.timeTaken; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: dependency_2.Metric) => item.toObject()); + } + if (this.metadata != null) { + data.metadata = this.metadata.map((item: dependency_2.Metadata) => item.toObject()); + } + if (this.arguments != null) { + data.arguments = this.arguments.map((item: dependency_2.Argument) => item.toObject()); + } + if (this.options != null) { + data.options = this.options.map((item: dependency_2.Metadata) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.endpointId != "0") + writer.writeUint64String(2, this.endpointId); + if (this.source.length) + writer.writeString(3, this.source); + if (this.status.length) + writer.writeString(15, this.status); + if (this.projectId != "0") + writer.writeUint64String(16, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(17, this.organizationId); + if (this.endpointProviderModelId != "0") + writer.writeUint64String(19, this.endpointProviderModelId); + if (this.timeTaken != "0") + writer.writeUint64String(25, this.timeTaken); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.metrics.length) + writer.writeRepeatedMessage(30, this.metrics, (item: dependency_2.Metric) => item.serialize(writer)); + if (this.metadata.length) + writer.writeRepeatedMessage(32, this.metadata, (item: dependency_2.Metadata) => item.serialize(writer)); + if (this.arguments.length) + writer.writeRepeatedMessage(31, this.arguments, (item: dependency_2.Argument) => item.serialize(writer)); + if (this.options.length) + writer.writeRepeatedMessage(33, this.options, (item: dependency_2.Metadata) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EndpointLog { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EndpointLog(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.endpointId = reader.readUint64String(); + break; + case 3: + message.source = reader.readString(); + break; + case 15: + message.status = reader.readString(); + break; + case 16: + message.projectId = reader.readUint64String(); + break; + case 17: + message.organizationId = reader.readUint64String(); + break; + case 19: + message.endpointProviderModelId = reader.readUint64String(); + break; + case 25: + message.timeTaken = reader.readUint64String(); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 30: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 30, dependency_2.Metric.deserialize(reader), dependency_2.Metric)); + break; + case 32: + reader.readMessage(message.metadata, () => pb_1.Message.addToRepeatedWrapperField(message, 32, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + case 31: + reader.readMessage(message.arguments, () => pb_1.Message.addToRepeatedWrapperField(message, 31, dependency_2.Argument.deserialize(reader), dependency_2.Argument)); + break; + case 33: + reader.readMessage(message.options, () => pb_1.Message.addToRepeatedWrapperField(message, 33, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EndpointLog { + return EndpointLog.deserialize(bytes); + } + } + export class GetAllEndpointLogRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + endpointId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + endpointId?: string; + }): GetAllEndpointLogRequest { + const message = new GetAllEndpointLogRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + endpointId?: string; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.endpointId != "0") + writer.writeUint64String(3, this.endpointId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllEndpointLogRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllEndpointLogRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 3: + message.endpointId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllEndpointLogRequest { + return GetAllEndpointLogRequest.deserialize(bytes); + } + } + export class GetAllEndpointLogResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: EndpointLog[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, EndpointLog, 3) as EndpointLog[]; + } + set data(value: EndpointLog[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllEndpointLogResponse { + const message = new GetAllEndpointLogResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => EndpointLog.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: EndpointLog) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: EndpointLog) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllEndpointLogResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllEndpointLogResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, EndpointLog.deserialize(reader), EndpointLog)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllEndpointLogResponse { + return GetAllEndpointLogResponse.deserialize(bytes); + } + } + export class GetEndpointLogRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpointId?: string; + id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + endpointId?: string; + id?: string; + }): GetEndpointLogRequest { + const message = new GetEndpointLogRequest({}); + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + endpointId?: string; + id?: string; + } = {}; + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.id != null) { + data.id = this.id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.endpointId != "0") + writer.writeUint64String(1, this.endpointId); + if (this.id != "0") + writer.writeUint64String(2, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetEndpointLogRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetEndpointLogRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.endpointId = reader.readUint64String(); + break; + case 2: + message.id = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetEndpointLogRequest { + return GetEndpointLogRequest.deserialize(bytes); + } + } + export class GetEndpointLogResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: EndpointLog; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, EndpointLog, 3) as EndpointLog; + } + set data(value: EndpointLog) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetEndpointLogResponse { + const message = new GetEndpointLogResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = EndpointLog.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetEndpointLogResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetEndpointLogResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = EndpointLog.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetEndpointLogResponse { + return GetEndpointLogResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedEndpointServiceService { + static definition = { + GetEndpoint: { + path: "/endpoint_api.EndpointService/GetEndpoint", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetEndpointRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetEndpointRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetEndpointResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetEndpointResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllEndpoint: { + path: "/endpoint_api.EndpointService/GetAllEndpoint", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllEndpointRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllEndpointRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllEndpointResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllEndpointResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllEndpointProviderModel: { + path: "/endpoint_api.EndpointService/GetAllEndpointProviderModel", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllEndpointProviderModelRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllEndpointProviderModelRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllEndpointProviderModelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllEndpointProviderModelResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateEndpointVersion: { + path: "/endpoint_api.EndpointService/UpdateEndpointVersion", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateEndpointVersionRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateEndpointVersionRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: UpdateEndpointVersionResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => UpdateEndpointVersionResponse.deserialize(new Uint8Array(bytes)) + }, + CreateEndpoint: { + path: "/endpoint_api.EndpointService/CreateEndpoint", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateEndpointRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateEndpointRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateEndpointResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateEndpointResponse.deserialize(new Uint8Array(bytes)) + }, + CreateEndpointProviderModel: { + path: "/endpoint_api.EndpointService/CreateEndpointProviderModel", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateEndpointProviderModelRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateEndpointProviderModelRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateEndpointProviderModelResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateEndpointProviderModelResponse.deserialize(new Uint8Array(bytes)) + }, + CreateEndpointCacheConfiguration: { + path: "/endpoint_api.EndpointService/CreateEndpointCacheConfiguration", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateEndpointCacheConfigurationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateEndpointCacheConfigurationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateEndpointCacheConfigurationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateEndpointCacheConfigurationResponse.deserialize(new Uint8Array(bytes)) + }, + CreateEndpointRetryConfiguration: { + path: "/endpoint_api.EndpointService/CreateEndpointRetryConfiguration", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateEndpointRetryConfigurationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateEndpointRetryConfigurationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateEndpointRetryConfigurationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateEndpointRetryConfigurationResponse.deserialize(new Uint8Array(bytes)) + }, + CreateEndpointTag: { + path: "/endpoint_api.EndpointService/CreateEndpointTag", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateEndpointTagRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateEndpointTagRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetEndpointResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetEndpointResponse.deserialize(new Uint8Array(bytes)) + }, + ForkEndpoint: { + path: "/endpoint_api.EndpointService/ForkEndpoint", + requestStream: false, + responseStream: false, + requestSerialize: (message: ForkEndpointRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ForkEndpointRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_2.BaseResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_2.BaseResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateEndpointDetail: { + path: "/endpoint_api.EndpointService/UpdateEndpointDetail", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateEndpointDetailRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateEndpointDetailRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetEndpointResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetEndpointResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllEndpointLog: { + path: "/endpoint_api.EndpointService/GetAllEndpointLog", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllEndpointLogRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllEndpointLogRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllEndpointLogResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllEndpointLogResponse.deserialize(new Uint8Array(bytes)) + }, + GetEndpointLog: { + path: "/endpoint_api.EndpointService/GetEndpointLog", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetEndpointLogRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetEndpointLogRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetEndpointLogResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetEndpointLogResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GetEndpoint(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllEndpoint(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllEndpointProviderModel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateEndpointVersion(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateEndpoint(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateEndpointProviderModel(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateEndpointCacheConfiguration(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateEndpointRetryConfiguration(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateEndpointTag(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ForkEndpoint(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateEndpointDetail(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllEndpointLog(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetEndpointLog(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class EndpointServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedEndpointServiceService.definition, "EndpointService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GetEndpoint: GrpcUnaryServiceInterface = (message: GetEndpointRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetEndpoint(message, metadata, options, callback); + }; + GetAllEndpoint: GrpcUnaryServiceInterface = (message: GetAllEndpointRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllEndpoint(message, metadata, options, callback); + }; + GetAllEndpointProviderModel: GrpcUnaryServiceInterface = (message: GetAllEndpointProviderModelRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllEndpointProviderModel(message, metadata, options, callback); + }; + UpdateEndpointVersion: GrpcUnaryServiceInterface = (message: UpdateEndpointVersionRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateEndpointVersion(message, metadata, options, callback); + }; + CreateEndpoint: GrpcUnaryServiceInterface = (message: CreateEndpointRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateEndpoint(message, metadata, options, callback); + }; + CreateEndpointProviderModel: GrpcUnaryServiceInterface = (message: CreateEndpointProviderModelRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateEndpointProviderModel(message, metadata, options, callback); + }; + CreateEndpointCacheConfiguration: GrpcUnaryServiceInterface = (message: CreateEndpointCacheConfigurationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateEndpointCacheConfiguration(message, metadata, options, callback); + }; + CreateEndpointRetryConfiguration: GrpcUnaryServiceInterface = (message: CreateEndpointRetryConfigurationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateEndpointRetryConfiguration(message, metadata, options, callback); + }; + CreateEndpointTag: GrpcUnaryServiceInterface = (message: CreateEndpointTagRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateEndpointTag(message, metadata, options, callback); + }; + ForkEndpoint: GrpcUnaryServiceInterface = (message: ForkEndpointRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ForkEndpoint(message, metadata, options, callback); + }; + UpdateEndpointDetail: GrpcUnaryServiceInterface = (message: UpdateEndpointDetailRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateEndpointDetail(message, metadata, options, callback); + }; + GetAllEndpointLog: GrpcUnaryServiceInterface = (message: GetAllEndpointLogRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllEndpointLog(message, metadata, options, callback); + }; + GetEndpointLog: GrpcUnaryServiceInterface = (message: GetEndpointLogRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetEndpointLog(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/endpoint-api_grpc_pb.d.ts b/src/clients/protos/endpoint-api_grpc_pb.d.ts deleted file mode 100644 index 7eb2caf..0000000 --- a/src/clients/protos/endpoint-api_grpc_pb.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: endpoint_api -// file: endpoint-api.proto - -import * as endpoint_api_pb from "./endpoint-api_pb"; -import * as common_pb from "./common_pb"; -import * as grpc from "grpc"; - -interface IEndpointServiceService extends grpc.ServiceDefinition { - getEndpoint: grpc.MethodDefinition; - getAllEndpoint: grpc.MethodDefinition; - getAllEndpointProviderModel: grpc.MethodDefinition; - updateEndpointVersion: grpc.MethodDefinition; - createEndpoint: grpc.MethodDefinition; - createEndpointProviderModel: grpc.MethodDefinition; - createEndpointCacheConfiguration: grpc.MethodDefinition; - createEndpointRetryConfiguration: grpc.MethodDefinition; - createEndpointTag: grpc.MethodDefinition; - forkEndpoint: grpc.MethodDefinition; - updateEndpointDetail: grpc.MethodDefinition; - getAllEndpointLog: grpc.MethodDefinition; - getEndpointLog: grpc.MethodDefinition; -} - -export const EndpointServiceService: IEndpointServiceService; - -export interface IEndpointServiceServer extends grpc.UntypedServiceImplementation { - getEndpoint: grpc.handleUnaryCall; - getAllEndpoint: grpc.handleUnaryCall; - getAllEndpointProviderModel: grpc.handleUnaryCall; - updateEndpointVersion: grpc.handleUnaryCall; - createEndpoint: grpc.handleUnaryCall; - createEndpointProviderModel: grpc.handleUnaryCall; - createEndpointCacheConfiguration: grpc.handleUnaryCall; - createEndpointRetryConfiguration: grpc.handleUnaryCall; - createEndpointTag: grpc.handleUnaryCall; - forkEndpoint: grpc.handleUnaryCall; - updateEndpointDetail: grpc.handleUnaryCall; - getAllEndpointLog: grpc.handleUnaryCall; - getEndpointLog: grpc.handleUnaryCall; -} - -export class EndpointServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - getEndpoint(argument: endpoint_api_pb.GetEndpointRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getEndpoint(argument: endpoint_api_pb.GetEndpointRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getEndpoint(argument: endpoint_api_pb.GetEndpointRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllEndpoint(argument: endpoint_api_pb.GetAllEndpointRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllEndpoint(argument: endpoint_api_pb.GetAllEndpointRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllEndpoint(argument: endpoint_api_pb.GetAllEndpointRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllEndpointProviderModel(argument: endpoint_api_pb.GetAllEndpointProviderModelRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllEndpointProviderModel(argument: endpoint_api_pb.GetAllEndpointProviderModelRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllEndpointProviderModel(argument: endpoint_api_pb.GetAllEndpointProviderModelRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateEndpointVersion(argument: endpoint_api_pb.UpdateEndpointVersionRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateEndpointVersion(argument: endpoint_api_pb.UpdateEndpointVersionRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateEndpointVersion(argument: endpoint_api_pb.UpdateEndpointVersionRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpoint(argument: endpoint_api_pb.CreateEndpointRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpoint(argument: endpoint_api_pb.CreateEndpointRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpoint(argument: endpoint_api_pb.CreateEndpointRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointProviderModel(argument: endpoint_api_pb.CreateEndpointProviderModelRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointProviderModel(argument: endpoint_api_pb.CreateEndpointProviderModelRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointProviderModel(argument: endpoint_api_pb.CreateEndpointProviderModelRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointCacheConfiguration(argument: endpoint_api_pb.CreateEndpointCacheConfigurationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointCacheConfiguration(argument: endpoint_api_pb.CreateEndpointCacheConfigurationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointCacheConfiguration(argument: endpoint_api_pb.CreateEndpointCacheConfigurationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointRetryConfiguration(argument: endpoint_api_pb.CreateEndpointRetryConfigurationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointRetryConfiguration(argument: endpoint_api_pb.CreateEndpointRetryConfigurationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointRetryConfiguration(argument: endpoint_api_pb.CreateEndpointRetryConfigurationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointTag(argument: endpoint_api_pb.CreateEndpointTagRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointTag(argument: endpoint_api_pb.CreateEndpointTagRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createEndpointTag(argument: endpoint_api_pb.CreateEndpointTagRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - forkEndpoint(argument: endpoint_api_pb.ForkEndpointRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - forkEndpoint(argument: endpoint_api_pb.ForkEndpointRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - forkEndpoint(argument: endpoint_api_pb.ForkEndpointRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateEndpointDetail(argument: endpoint_api_pb.UpdateEndpointDetailRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateEndpointDetail(argument: endpoint_api_pb.UpdateEndpointDetailRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateEndpointDetail(argument: endpoint_api_pb.UpdateEndpointDetailRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllEndpointLog(argument: endpoint_api_pb.GetAllEndpointLogRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllEndpointLog(argument: endpoint_api_pb.GetAllEndpointLogRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllEndpointLog(argument: endpoint_api_pb.GetAllEndpointLogRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getEndpointLog(argument: endpoint_api_pb.GetEndpointLogRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getEndpointLog(argument: endpoint_api_pb.GetEndpointLogRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getEndpointLog(argument: endpoint_api_pb.GetEndpointLogRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/endpoint-api_pb.d.ts b/src/clients/protos/endpoint-api_pb.d.ts deleted file mode 100644 index f959936..0000000 --- a/src/clients/protos/endpoint-api_pb.d.ts +++ /dev/null @@ -1,1265 +0,0 @@ -// package: endpoint_api -// file: endpoint-api.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as common_pb from "./common_pb"; - -export class EndpointAttribute extends jspb.Message { - getSource(): string; - setSource(value: string): void; - - getSourceidentifier(): string; - setSourceidentifier(value: string): void; - - getVisibility(): string; - setVisibility(value: string): void; - - getLanguage(): string; - setLanguage(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EndpointAttribute.AsObject; - static toObject(includeInstance: boolean, msg: EndpointAttribute): EndpointAttribute.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EndpointAttribute, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EndpointAttribute; - static deserializeBinaryFromReader(message: EndpointAttribute, reader: jspb.BinaryReader): EndpointAttribute; -} - -export namespace EndpointAttribute { - export type AsObject = { - source: string, - sourceidentifier: string, - visibility: string, - language: string, - name: string, - description: string, - } -} - -export class EndpointProviderModelAttribute extends jspb.Message { - getDescription(): string; - setDescription(value: string): void; - - hasChatcompleteprompt(): boolean; - clearChatcompleteprompt(): void; - getChatcompleteprompt(): common_pb.TextChatCompletePrompt | undefined; - setChatcompleteprompt(value?: common_pb.TextChatCompletePrompt): void; - - getModelproviderid(): string; - setModelproviderid(value: string): void; - - getModelprovidername(): string; - setModelprovidername(value: string): void; - - clearEndpointmodeloptionsList(): void; - getEndpointmodeloptionsList(): Array; - setEndpointmodeloptionsList(value: Array): void; - addEndpointmodeloptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EndpointProviderModelAttribute.AsObject; - static toObject(includeInstance: boolean, msg: EndpointProviderModelAttribute): EndpointProviderModelAttribute.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EndpointProviderModelAttribute, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EndpointProviderModelAttribute; - static deserializeBinaryFromReader(message: EndpointProviderModelAttribute, reader: jspb.BinaryReader): EndpointProviderModelAttribute; -} - -export namespace EndpointProviderModelAttribute { - export type AsObject = { - description: string, - chatcompleteprompt?: common_pb.TextChatCompletePrompt.AsObject, - modelproviderid: string, - modelprovidername: string, - endpointmodeloptionsList: Array, - } -} - -export class CreateEndpointRequest extends jspb.Message { - hasEndpointprovidermodelattribute(): boolean; - clearEndpointprovidermodelattribute(): void; - getEndpointprovidermodelattribute(): EndpointProviderModelAttribute | undefined; - setEndpointprovidermodelattribute(value?: EndpointProviderModelAttribute): void; - - hasEndpointattribute(): boolean; - clearEndpointattribute(): void; - getEndpointattribute(): EndpointAttribute | undefined; - setEndpointattribute(value?: EndpointAttribute): void; - - hasRetryconfiguration(): boolean; - clearRetryconfiguration(): void; - getRetryconfiguration(): EndpointRetryConfiguration | undefined; - setRetryconfiguration(value?: EndpointRetryConfiguration): void; - - hasCacheconfiguration(): boolean; - clearCacheconfiguration(): void; - getCacheconfiguration(): EndpointCacheConfiguration | undefined; - setCacheconfiguration(value?: EndpointCacheConfiguration): void; - - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEndpointRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateEndpointRequest): CreateEndpointRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateEndpointRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEndpointRequest; - static deserializeBinaryFromReader(message: CreateEndpointRequest, reader: jspb.BinaryReader): CreateEndpointRequest; -} - -export namespace CreateEndpointRequest { - export type AsObject = { - endpointprovidermodelattribute?: EndpointProviderModelAttribute.AsObject, - endpointattribute?: EndpointAttribute.AsObject, - retryconfiguration?: EndpointRetryConfiguration.AsObject, - cacheconfiguration?: EndpointCacheConfiguration.AsObject, - tagsList: Array, - } -} - -export class CreateEndpointResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): Endpoint | undefined; - setData(value?: Endpoint): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEndpointResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateEndpointResponse): CreateEndpointResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateEndpointResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEndpointResponse; - static deserializeBinaryFromReader(message: CreateEndpointResponse, reader: jspb.BinaryReader): CreateEndpointResponse; -} - -export namespace CreateEndpointResponse { - export type AsObject = { - code: number, - success: boolean, - data?: Endpoint.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class EndpointProviderModel extends jspb.Message { - getId(): string; - setId(value: string): void; - - hasChatcompleteprompt(): boolean; - clearChatcompleteprompt(): void; - getChatcompleteprompt(): common_pb.TextChatCompletePrompt | undefined; - setChatcompleteprompt(value?: common_pb.TextChatCompletePrompt): void; - - getModelproviderid(): string; - setModelproviderid(value: string): void; - - getModelprovidername(): string; - setModelprovidername(value: string): void; - - clearEndpointmodeloptionsList(): void; - getEndpointmodeloptionsList(): Array; - setEndpointmodeloptionsList(value: Array): void; - addEndpointmodeloptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - getStatus(): string; - setStatus(value: string): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - hasCreateduser(): boolean; - clearCreateduser(): void; - getCreateduser(): common_pb.User | undefined; - setCreateduser(value?: common_pb.User): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - hasUpdateduser(): boolean; - clearUpdateduser(): void; - getUpdateduser(): common_pb.User | undefined; - setUpdateduser(value?: common_pb.User): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getEndpointid(): string; - setEndpointid(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EndpointProviderModel.AsObject; - static toObject(includeInstance: boolean, msg: EndpointProviderModel): EndpointProviderModel.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EndpointProviderModel, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EndpointProviderModel; - static deserializeBinaryFromReader(message: EndpointProviderModel, reader: jspb.BinaryReader): EndpointProviderModel; -} - -export namespace EndpointProviderModel { - export type AsObject = { - id: string, - chatcompleteprompt?: common_pb.TextChatCompletePrompt.AsObject, - modelproviderid: string, - modelprovidername: string, - endpointmodeloptionsList: Array, - status: string, - createdby: string, - createduser?: common_pb.User.AsObject, - updatedby: string, - updateduser?: common_pb.User.AsObject, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - endpointid: string, - description: string, - } -} - -export class AggregatedEndpointAnalytics extends jspb.Message { - getCount(): string; - setCount(value: string): void; - - getTotalinputcost(): number; - setTotalinputcost(value: number): void; - - getTotaloutputcost(): number; - setTotaloutputcost(value: number): void; - - getTotaltoken(): string; - setTotaltoken(value: string): void; - - getSuccesscount(): string; - setSuccesscount(value: string): void; - - getErrorcount(): string; - setErrorcount(value: string): void; - - getP50latency(): number; - setP50latency(value: number): void; - - getP99latency(): number; - setP99latency(value: number): void; - - hasLastactivity(): boolean; - clearLastactivity(): void; - getLastactivity(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastactivity(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AggregatedEndpointAnalytics.AsObject; - static toObject(includeInstance: boolean, msg: AggregatedEndpointAnalytics): AggregatedEndpointAnalytics.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AggregatedEndpointAnalytics, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AggregatedEndpointAnalytics; - static deserializeBinaryFromReader(message: AggregatedEndpointAnalytics, reader: jspb.BinaryReader): AggregatedEndpointAnalytics; -} - -export namespace AggregatedEndpointAnalytics { - export type AsObject = { - count: string, - totalinputcost: number, - totaloutputcost: number, - totaltoken: string, - successcount: string, - errorcount: string, - p50latency: number, - p99latency: number, - lastactivity?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class Endpoint extends jspb.Message { - getId(): string; - setId(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - getVisibility(): string; - setVisibility(value: string): void; - - getSource(): string; - setSource(value: string): void; - - getSourceidentifier(): string; - setSourceidentifier(value: string): void; - - getProjectid(): string; - setProjectid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - getEndpointprovidermodelid(): string; - setEndpointprovidermodelid(value: string): void; - - hasEndpointprovidermodel(): boolean; - clearEndpointprovidermodel(): void; - getEndpointprovidermodel(): EndpointProviderModel | undefined; - setEndpointprovidermodel(value?: EndpointProviderModel): void; - - hasEndpointanalytics(): boolean; - clearEndpointanalytics(): void; - getEndpointanalytics(): AggregatedEndpointAnalytics | undefined; - setEndpointanalytics(value?: AggregatedEndpointAnalytics): void; - - hasEndpointretry(): boolean; - clearEndpointretry(): void; - getEndpointretry(): EndpointRetryConfiguration | undefined; - setEndpointretry(value?: EndpointRetryConfiguration): void; - - hasEndpointcaching(): boolean; - clearEndpointcaching(): void; - getEndpointcaching(): EndpointCacheConfiguration | undefined; - setEndpointcaching(value?: EndpointCacheConfiguration): void; - - hasEndpointtag(): boolean; - clearEndpointtag(): void; - getEndpointtag(): common_pb.Tag | undefined; - setEndpointtag(value?: common_pb.Tag): void; - - getLanguage(): string; - setLanguage(value: string): void; - - hasOrganization(): boolean; - clearOrganization(): void; - getOrganization(): common_pb.Organization | undefined; - setOrganization(value?: common_pb.Organization): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - hasCreateduser(): boolean; - clearCreateduser(): void; - getCreateduser(): common_pb.User | undefined; - setCreateduser(value?: common_pb.User): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - hasUpdateduser(): boolean; - clearUpdateduser(): void; - getUpdateduser(): common_pb.User | undefined; - setUpdateduser(value?: common_pb.User): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Endpoint.AsObject; - static toObject(includeInstance: boolean, msg: Endpoint): Endpoint.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Endpoint, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Endpoint; - static deserializeBinaryFromReader(message: Endpoint, reader: jspb.BinaryReader): Endpoint; -} - -export namespace Endpoint { - export type AsObject = { - id: string, - status: string, - visibility: string, - source: string, - sourceidentifier: string, - projectid: string, - organizationid: string, - endpointprovidermodelid: string, - endpointprovidermodel?: EndpointProviderModel.AsObject, - endpointanalytics?: AggregatedEndpointAnalytics.AsObject, - endpointretry?: EndpointRetryConfiguration.AsObject, - endpointcaching?: EndpointCacheConfiguration.AsObject, - endpointtag?: common_pb.Tag.AsObject, - language: string, - organization?: common_pb.Organization.AsObject, - name: string, - description: string, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - createdby: string, - createduser?: common_pb.User.AsObject, - updatedby: string, - updateduser?: common_pb.User.AsObject, - } -} - -export class CreateEndpointProviderModelRequest extends jspb.Message { - getEndpointid(): string; - setEndpointid(value: string): void; - - hasEndpointprovidermodelattribute(): boolean; - clearEndpointprovidermodelattribute(): void; - getEndpointprovidermodelattribute(): EndpointProviderModelAttribute | undefined; - setEndpointprovidermodelattribute(value?: EndpointProviderModelAttribute): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEndpointProviderModelRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateEndpointProviderModelRequest): CreateEndpointProviderModelRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateEndpointProviderModelRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEndpointProviderModelRequest; - static deserializeBinaryFromReader(message: CreateEndpointProviderModelRequest, reader: jspb.BinaryReader): CreateEndpointProviderModelRequest; -} - -export namespace CreateEndpointProviderModelRequest { - export type AsObject = { - endpointid: string, - endpointprovidermodelattribute?: EndpointProviderModelAttribute.AsObject, - } -} - -export class CreateEndpointProviderModelResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): EndpointProviderModel | undefined; - setData(value?: EndpointProviderModel): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEndpointProviderModelResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateEndpointProviderModelResponse): CreateEndpointProviderModelResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateEndpointProviderModelResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEndpointProviderModelResponse; - static deserializeBinaryFromReader(message: CreateEndpointProviderModelResponse, reader: jspb.BinaryReader): CreateEndpointProviderModelResponse; -} - -export namespace CreateEndpointProviderModelResponse { - export type AsObject = { - code: number, - success: boolean, - data?: EndpointProviderModel.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetEndpointRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - hasEndpointprovidermodelid(): boolean; - clearEndpointprovidermodelid(): void; - getEndpointprovidermodelid(): string; - setEndpointprovidermodelid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetEndpointRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetEndpointRequest): GetEndpointRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetEndpointRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetEndpointRequest; - static deserializeBinaryFromReader(message: GetEndpointRequest, reader: jspb.BinaryReader): GetEndpointRequest; -} - -export namespace GetEndpointRequest { - export type AsObject = { - id: string, - endpointprovidermodelid: string, - } -} - -export class GetEndpointResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): Endpoint | undefined; - setData(value?: Endpoint): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetEndpointResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetEndpointResponse): GetEndpointResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetEndpointResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetEndpointResponse; - static deserializeBinaryFromReader(message: GetEndpointResponse, reader: jspb.BinaryReader): GetEndpointResponse; -} - -export namespace GetEndpointResponse { - export type AsObject = { - code: number, - success: boolean, - data?: Endpoint.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAllEndpointRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllEndpointRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllEndpointRequest): GetAllEndpointRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllEndpointRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllEndpointRequest; - static deserializeBinaryFromReader(message: GetAllEndpointRequest, reader: jspb.BinaryReader): GetAllEndpointRequest; -} - -export namespace GetAllEndpointRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllEndpointResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: Endpoint, index?: number): Endpoint; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllEndpointResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllEndpointResponse): GetAllEndpointResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllEndpointResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllEndpointResponse; - static deserializeBinaryFromReader(message: GetAllEndpointResponse, reader: jspb.BinaryReader): GetAllEndpointResponse; -} - -export namespace GetAllEndpointResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class GetAllEndpointProviderModelRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - getEndpointid(): string; - setEndpointid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllEndpointProviderModelRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllEndpointProviderModelRequest): GetAllEndpointProviderModelRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllEndpointProviderModelRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllEndpointProviderModelRequest; - static deserializeBinaryFromReader(message: GetAllEndpointProviderModelRequest, reader: jspb.BinaryReader): GetAllEndpointProviderModelRequest; -} - -export namespace GetAllEndpointProviderModelRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - endpointid: string, - } -} - -export class GetAllEndpointProviderModelResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: EndpointProviderModel, index?: number): EndpointProviderModel; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllEndpointProviderModelResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllEndpointProviderModelResponse): GetAllEndpointProviderModelResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllEndpointProviderModelResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllEndpointProviderModelResponse; - static deserializeBinaryFromReader(message: GetAllEndpointProviderModelResponse, reader: jspb.BinaryReader): GetAllEndpointProviderModelResponse; -} - -export namespace GetAllEndpointProviderModelResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class UpdateEndpointVersionRequest extends jspb.Message { - getEndpointid(): string; - setEndpointid(value: string): void; - - getEndpointprovidermodelid(): string; - setEndpointprovidermodelid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateEndpointVersionRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateEndpointVersionRequest): UpdateEndpointVersionRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateEndpointVersionRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateEndpointVersionRequest; - static deserializeBinaryFromReader(message: UpdateEndpointVersionRequest, reader: jspb.BinaryReader): UpdateEndpointVersionRequest; -} - -export namespace UpdateEndpointVersionRequest { - export type AsObject = { - endpointid: string, - endpointprovidermodelid: string, - } -} - -export class UpdateEndpointVersionResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): Endpoint | undefined; - setData(value?: Endpoint): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateEndpointVersionResponse.AsObject; - static toObject(includeInstance: boolean, msg: UpdateEndpointVersionResponse): UpdateEndpointVersionResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateEndpointVersionResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateEndpointVersionResponse; - static deserializeBinaryFromReader(message: UpdateEndpointVersionResponse, reader: jspb.BinaryReader): UpdateEndpointVersionResponse; -} - -export namespace UpdateEndpointVersionResponse { - export type AsObject = { - code: number, - success: boolean, - data?: Endpoint.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class EndpointRetryConfiguration extends jspb.Message { - getRetrytype(): string; - setRetrytype(value: string): void; - - getMaxattempts(): string; - setMaxattempts(value: string): void; - - getDelayseconds(): string; - setDelayseconds(value: string): void; - - getExponentialbackoff(): boolean; - setExponentialbackoff(value: boolean): void; - - clearRetryablesList(): void; - getRetryablesList(): Array; - setRetryablesList(value: Array): void; - addRetryables(value: string, index?: number): string; - - getCreatedby(): string; - setCreatedby(value: string): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EndpointRetryConfiguration.AsObject; - static toObject(includeInstance: boolean, msg: EndpointRetryConfiguration): EndpointRetryConfiguration.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EndpointRetryConfiguration, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EndpointRetryConfiguration; - static deserializeBinaryFromReader(message: EndpointRetryConfiguration, reader: jspb.BinaryReader): EndpointRetryConfiguration; -} - -export namespace EndpointRetryConfiguration { - export type AsObject = { - retrytype: string, - maxattempts: string, - delayseconds: string, - exponentialbackoff: boolean, - retryablesList: Array, - createdby: string, - updatedby: string, - } -} - -export class EndpointCacheConfiguration extends jspb.Message { - getCachetype(): string; - setCachetype(value: string): void; - - getExpiryinterval(): string; - setExpiryinterval(value: string): void; - - getMatchthreshold(): number; - setMatchthreshold(value: number): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EndpointCacheConfiguration.AsObject; - static toObject(includeInstance: boolean, msg: EndpointCacheConfiguration): EndpointCacheConfiguration.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EndpointCacheConfiguration, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EndpointCacheConfiguration; - static deserializeBinaryFromReader(message: EndpointCacheConfiguration, reader: jspb.BinaryReader): EndpointCacheConfiguration; -} - -export namespace EndpointCacheConfiguration { - export type AsObject = { - cachetype: string, - expiryinterval: string, - matchthreshold: number, - createdby: string, - updatedby: string, - } -} - -export class CreateEndpointRetryConfigurationRequest extends jspb.Message { - getEndpointid(): string; - setEndpointid(value: string): void; - - hasData(): boolean; - clearData(): void; - getData(): EndpointRetryConfiguration | undefined; - setData(value?: EndpointRetryConfiguration): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEndpointRetryConfigurationRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateEndpointRetryConfigurationRequest): CreateEndpointRetryConfigurationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateEndpointRetryConfigurationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEndpointRetryConfigurationRequest; - static deserializeBinaryFromReader(message: CreateEndpointRetryConfigurationRequest, reader: jspb.BinaryReader): CreateEndpointRetryConfigurationRequest; -} - -export namespace CreateEndpointRetryConfigurationRequest { - export type AsObject = { - endpointid: string, - data?: EndpointRetryConfiguration.AsObject, - } -} - -export class CreateEndpointRetryConfigurationResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): EndpointRetryConfiguration | undefined; - setData(value?: EndpointRetryConfiguration): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEndpointRetryConfigurationResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateEndpointRetryConfigurationResponse): CreateEndpointRetryConfigurationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateEndpointRetryConfigurationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEndpointRetryConfigurationResponse; - static deserializeBinaryFromReader(message: CreateEndpointRetryConfigurationResponse, reader: jspb.BinaryReader): CreateEndpointRetryConfigurationResponse; -} - -export namespace CreateEndpointRetryConfigurationResponse { - export type AsObject = { - code: number, - success: boolean, - data?: EndpointRetryConfiguration.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class CreateEndpointCacheConfigurationRequest extends jspb.Message { - getEndpointid(): string; - setEndpointid(value: string): void; - - hasData(): boolean; - clearData(): void; - getData(): EndpointCacheConfiguration | undefined; - setData(value?: EndpointCacheConfiguration): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEndpointCacheConfigurationRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateEndpointCacheConfigurationRequest): CreateEndpointCacheConfigurationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateEndpointCacheConfigurationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEndpointCacheConfigurationRequest; - static deserializeBinaryFromReader(message: CreateEndpointCacheConfigurationRequest, reader: jspb.BinaryReader): CreateEndpointCacheConfigurationRequest; -} - -export namespace CreateEndpointCacheConfigurationRequest { - export type AsObject = { - endpointid: string, - data?: EndpointCacheConfiguration.AsObject, - } -} - -export class CreateEndpointCacheConfigurationResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): EndpointCacheConfiguration | undefined; - setData(value?: EndpointCacheConfiguration): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEndpointCacheConfigurationResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateEndpointCacheConfigurationResponse): CreateEndpointCacheConfigurationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateEndpointCacheConfigurationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEndpointCacheConfigurationResponse; - static deserializeBinaryFromReader(message: CreateEndpointCacheConfigurationResponse, reader: jspb.BinaryReader): CreateEndpointCacheConfigurationResponse; -} - -export namespace CreateEndpointCacheConfigurationResponse { - export type AsObject = { - code: number, - success: boolean, - data?: EndpointCacheConfiguration.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class CreateEndpointTagRequest extends jspb.Message { - getEndpointid(): string; - setEndpointid(value: string): void; - - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEndpointTagRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateEndpointTagRequest): CreateEndpointTagRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateEndpointTagRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEndpointTagRequest; - static deserializeBinaryFromReader(message: CreateEndpointTagRequest, reader: jspb.BinaryReader): CreateEndpointTagRequest; -} - -export namespace CreateEndpointTagRequest { - export type AsObject = { - endpointid: string, - tagsList: Array, - } -} - -export class ForkEndpointRequest extends jspb.Message { - getEndpointid(): string; - setEndpointid(value: string): void; - - getEndpointproviderid(): string; - setEndpointproviderid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForkEndpointRequest.AsObject; - static toObject(includeInstance: boolean, msg: ForkEndpointRequest): ForkEndpointRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForkEndpointRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForkEndpointRequest; - static deserializeBinaryFromReader(message: ForkEndpointRequest, reader: jspb.BinaryReader): ForkEndpointRequest; -} - -export namespace ForkEndpointRequest { - export type AsObject = { - endpointid: string, - endpointproviderid: string, - } -} - -export class UpdateEndpointDetailRequest extends jspb.Message { - getEndpointid(): string; - setEndpointid(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateEndpointDetailRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateEndpointDetailRequest): UpdateEndpointDetailRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateEndpointDetailRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateEndpointDetailRequest; - static deserializeBinaryFromReader(message: UpdateEndpointDetailRequest, reader: jspb.BinaryReader): UpdateEndpointDetailRequest; -} - -export namespace UpdateEndpointDetailRequest { - export type AsObject = { - endpointid: string, - name: string, - description: string, - } -} - -export class EndpointLog extends jspb.Message { - getId(): string; - setId(value: string): void; - - getEndpointid(): string; - setEndpointid(value: string): void; - - getSource(): string; - setSource(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - getProjectid(): string; - setProjectid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - getEndpointprovidermodelid(): string; - setEndpointprovidermodelid(value: string): void; - - getTimetaken(): string; - setTimetaken(value: string): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: common_pb.Metric, index?: number): common_pb.Metric; - - clearMetadataList(): void; - getMetadataList(): Array; - setMetadataList(value: Array): void; - addMetadata(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - clearArgumentsList(): void; - getArgumentsList(): Array; - setArgumentsList(value: Array): void; - addArguments(value?: common_pb.Argument, index?: number): common_pb.Argument; - - clearOptionsList(): void; - getOptionsList(): Array; - setOptionsList(value: Array): void; - addOptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EndpointLog.AsObject; - static toObject(includeInstance: boolean, msg: EndpointLog): EndpointLog.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EndpointLog, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EndpointLog; - static deserializeBinaryFromReader(message: EndpointLog, reader: jspb.BinaryReader): EndpointLog; -} - -export namespace EndpointLog { - export type AsObject = { - id: string, - endpointid: string, - source: string, - status: string, - projectid: string, - organizationid: string, - endpointprovidermodelid: string, - timetaken: string, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - metricsList: Array, - metadataList: Array, - argumentsList: Array, - optionsList: Array, - } -} - -export class GetAllEndpointLogRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - getEndpointid(): string; - setEndpointid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllEndpointLogRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllEndpointLogRequest): GetAllEndpointLogRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllEndpointLogRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllEndpointLogRequest; - static deserializeBinaryFromReader(message: GetAllEndpointLogRequest, reader: jspb.BinaryReader): GetAllEndpointLogRequest; -} - -export namespace GetAllEndpointLogRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - endpointid: string, - } -} - -export class GetAllEndpointLogResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: EndpointLog, index?: number): EndpointLog; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllEndpointLogResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllEndpointLogResponse): GetAllEndpointLogResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllEndpointLogResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllEndpointLogResponse; - static deserializeBinaryFromReader(message: GetAllEndpointLogResponse, reader: jspb.BinaryReader): GetAllEndpointLogResponse; -} - -export namespace GetAllEndpointLogResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class GetEndpointLogRequest extends jspb.Message { - getEndpointid(): string; - setEndpointid(value: string): void; - - getId(): string; - setId(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetEndpointLogRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetEndpointLogRequest): GetEndpointLogRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetEndpointLogRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetEndpointLogRequest; - static deserializeBinaryFromReader(message: GetEndpointLogRequest, reader: jspb.BinaryReader): GetEndpointLogRequest; -} - -export namespace GetEndpointLogRequest { - export type AsObject = { - endpointid: string, - id: string, - } -} - -export class GetEndpointLogResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): EndpointLog | undefined; - setData(value?: EndpointLog): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetEndpointLogResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetEndpointLogResponse): GetEndpointLogResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetEndpointLogResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetEndpointLogResponse; - static deserializeBinaryFromReader(message: GetEndpointLogResponse, reader: jspb.BinaryReader): GetEndpointLogResponse; -} - -export namespace GetEndpointLogResponse { - export type AsObject = { - code: number, - success: boolean, - data?: EndpointLog.AsObject, - error?: common_pb.Error.AsObject, - } -} - diff --git a/src/clients/protos/google/protobuf/any.ts b/src/clients/protos/google/protobuf/any.ts new file mode 100644 index 0000000..d3816d4 --- /dev/null +++ b/src/clients/protos/google/protobuf/any.ts @@ -0,0 +1,98 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: google/protobuf/any.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace google.protobuf { + export class Any extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type_url?: string; + value?: Uint8Array; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("type_url" in data && data.type_url != undefined) { + this.type_url = data.type_url; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get type_url() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set type_url(value: string) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; + } + set value(value: Uint8Array) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + type_url?: string; + value?: Uint8Array; + }): Any { + const message = new Any({}); + if (data.type_url != null) { + message.type_url = data.type_url; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + type_url?: string; + value?: Uint8Array; + } = {}; + if (this.type_url != null) { + data.type_url = this.type_url; + } + if (this.value != null) { + data.value = this.value; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.type_url.length) + writer.writeString(1, this.type_url); + if (this.value.length) + writer.writeBytes(2, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Any { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Any(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type_url = reader.readString(); + break; + case 2: + message.value = reader.readBytes(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Any { + return Any.deserialize(bytes); + } + } +} diff --git a/src/clients/protos/google/protobuf/struct.ts b/src/clients/protos/google/protobuf/struct.ts new file mode 100644 index 0000000..15163c4 --- /dev/null +++ b/src/clients/protos/google/protobuf/struct.ts @@ -0,0 +1,408 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: google/protobuf/struct.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace google.protobuf { + export enum NullValue { + NULL_VALUE = 0 + } + export class Struct extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + fields?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("fields" in data && data.fields != undefined) { + this.fields = data.fields; + } + } + if (!this.fields) + this.fields = new Map(); + } + get fields() { + return pb_1.Message.getField(this, 1) as any as Map; + } + set fields(value: Map) { + pb_1.Message.setField(this, 1, value as any); + } + static fromObject(data: { + fields?: { + [key: string]: ReturnType; + }; + }): Struct { + const message = new Struct({}); + if (typeof data.fields == "object") { + message.fields = new Map(Object.entries(data.fields).map(([key, value]) => [key, Value.fromObject(value)])); + } + return message; + } + toObject() { + const data: { + fields?: { + [key: string]: ReturnType; + }; + } = {}; + if (this.fields != null) { + data.fields = (Object.fromEntries)((Array.from)(this.fields).map(([key, value]) => [key, value.toObject()])); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + for (const [key, value] of this.fields) { + writer.writeMessage(1, this.fields, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Struct { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Struct(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.fields as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = Value.deserialize(reader)); + return value; + })); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Struct { + return Struct.deserialize(bytes); + } + } + export class Value extends pb_1.Message { + #one_of_decls: number[][] = [[1, 2, 3, 4, 5, 6]]; + constructor(data?: any[] | ({} & (({ + null_value?: NullValue; + number_value?: never; + string_value?: never; + bool_value?: never; + struct_value?: never; + list_value?: never; + } | { + null_value?: never; + number_value?: number; + string_value?: never; + bool_value?: never; + struct_value?: never; + list_value?: never; + } | { + null_value?: never; + number_value?: never; + string_value?: string; + bool_value?: never; + struct_value?: never; + list_value?: never; + } | { + null_value?: never; + number_value?: never; + string_value?: never; + bool_value?: boolean; + struct_value?: never; + list_value?: never; + } | { + null_value?: never; + number_value?: never; + string_value?: never; + bool_value?: never; + struct_value?: Struct; + list_value?: never; + } | { + null_value?: never; + number_value?: never; + string_value?: never; + bool_value?: never; + struct_value?: never; + list_value?: ListValue; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("null_value" in data && data.null_value != undefined) { + this.null_value = data.null_value; + } + if ("number_value" in data && data.number_value != undefined) { + this.number_value = data.number_value; + } + if ("string_value" in data && data.string_value != undefined) { + this.string_value = data.string_value; + } + if ("bool_value" in data && data.bool_value != undefined) { + this.bool_value = data.bool_value; + } + if ("struct_value" in data && data.struct_value != undefined) { + this.struct_value = data.struct_value; + } + if ("list_value" in data && data.list_value != undefined) { + this.list_value = data.list_value; + } + } + } + get null_value() { + return pb_1.Message.getFieldWithDefault(this, 1, NullValue.NULL_VALUE) as NullValue; + } + set null_value(value: NullValue) { + pb_1.Message.setOneofField(this, 1, this.#one_of_decls[0], value); + } + get has_null_value() { + return pb_1.Message.getField(this, 1) != null; + } + get number_value() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set number_value(value: number) { + pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value); + } + get has_number_value() { + return pb_1.Message.getField(this, 2) != null; + } + get string_value() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set string_value(value: string) { + pb_1.Message.setOneofField(this, 3, this.#one_of_decls[0], value); + } + get has_string_value() { + return pb_1.Message.getField(this, 3) != null; + } + get bool_value() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set bool_value(value: boolean) { + pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value); + } + get has_bool_value() { + return pb_1.Message.getField(this, 4) != null; + } + get struct_value() { + return pb_1.Message.getWrapperField(this, Struct, 5) as Struct; + } + set struct_value(value: Struct) { + pb_1.Message.setOneofWrapperField(this, 5, this.#one_of_decls[0], value); + } + get has_struct_value() { + return pb_1.Message.getField(this, 5) != null; + } + get list_value() { + return pb_1.Message.getWrapperField(this, ListValue, 6) as ListValue; + } + set list_value(value: ListValue) { + pb_1.Message.setOneofWrapperField(this, 6, this.#one_of_decls[0], value); + } + get has_list_value() { + return pb_1.Message.getField(this, 6) != null; + } + get kind() { + const cases: { + [index: number]: "none" | "null_value" | "number_value" | "string_value" | "bool_value" | "struct_value" | "list_value"; + } = { + 0: "none", + 1: "null_value", + 2: "number_value", + 3: "string_value", + 4: "bool_value", + 5: "struct_value", + 6: "list_value" + }; + return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 4, 5, 6])]; + } + static fromObject(data: { + null_value?: NullValue; + number_value?: number; + string_value?: string; + bool_value?: boolean; + struct_value?: ReturnType; + list_value?: ReturnType; + }): Value { + const message = new Value({}); + if (data.null_value != null) { + message.null_value = data.null_value; + } + if (data.number_value != null) { + message.number_value = data.number_value; + } + if (data.string_value != null) { + message.string_value = data.string_value; + } + if (data.bool_value != null) { + message.bool_value = data.bool_value; + } + if (data.struct_value != null) { + message.struct_value = Struct.fromObject(data.struct_value); + } + if (data.list_value != null) { + message.list_value = ListValue.fromObject(data.list_value); + } + return message; + } + toObject() { + const data: { + null_value?: NullValue; + number_value?: number; + string_value?: string; + bool_value?: boolean; + struct_value?: ReturnType; + list_value?: ReturnType; + } = {}; + if (this.null_value != null) { + data.null_value = this.null_value; + } + if (this.number_value != null) { + data.number_value = this.number_value; + } + if (this.string_value != null) { + data.string_value = this.string_value; + } + if (this.bool_value != null) { + data.bool_value = this.bool_value; + } + if (this.struct_value != null) { + data.struct_value = this.struct_value.toObject(); + } + if (this.list_value != null) { + data.list_value = this.list_value.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_null_value) + writer.writeEnum(1, this.null_value); + if (this.has_number_value) + writer.writeDouble(2, this.number_value); + if (this.has_string_value) + writer.writeString(3, this.string_value); + if (this.has_bool_value) + writer.writeBool(4, this.bool_value); + if (this.has_struct_value) + writer.writeMessage(5, this.struct_value, () => this.struct_value.serialize(writer)); + if (this.has_list_value) + writer.writeMessage(6, this.list_value, () => this.list_value.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Value { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Value(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.null_value = reader.readEnum(); + break; + case 2: + message.number_value = reader.readDouble(); + break; + case 3: + message.string_value = reader.readString(); + break; + case 4: + message.bool_value = reader.readBool(); + break; + case 5: + reader.readMessage(message.struct_value, () => message.struct_value = Struct.deserialize(reader)); + break; + case 6: + reader.readMessage(message.list_value, () => message.list_value = ListValue.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Value { + return Value.deserialize(bytes); + } + } + export class ListValue extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + values?: Value[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("values" in data && data.values != undefined) { + this.values = data.values; + } + } + } + get values() { + return pb_1.Message.getRepeatedWrapperField(this, Value, 1) as Value[]; + } + set values(value: Value[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + values?: ReturnType[]; + }): ListValue { + const message = new ListValue({}); + if (data.values != null) { + message.values = data.values.map(item => Value.fromObject(item)); + } + return message; + } + toObject() { + const data: { + values?: ReturnType[]; + } = {}; + if (this.values != null) { + data.values = this.values.map((item: Value) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.values.length) + writer.writeRepeatedMessage(1, this.values, (item: Value) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListValue { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListValue(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.values, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Value.deserialize(reader), Value)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ListValue { + return ListValue.deserialize(bytes); + } + } +} diff --git a/src/clients/protos/google/protobuf/timestamp.ts b/src/clients/protos/google/protobuf/timestamp.ts new file mode 100644 index 0000000..1f155a3 --- /dev/null +++ b/src/clients/protos/google/protobuf/timestamp.ts @@ -0,0 +1,98 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: google/protobuf/timestamp.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace google.protobuf { + export class Timestamp extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + seconds?: number; + nanos?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("seconds" in data && data.seconds != undefined) { + this.seconds = data.seconds; + } + if ("nanos" in data && data.nanos != undefined) { + this.nanos = data.nanos; + } + } + } + get seconds() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set seconds(value: number) { + pb_1.Message.setField(this, 1, value); + } + get nanos() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set nanos(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + seconds?: number; + nanos?: number; + }): Timestamp { + const message = new Timestamp({}); + if (data.seconds != null) { + message.seconds = data.seconds; + } + if (data.nanos != null) { + message.nanos = data.nanos; + } + return message; + } + toObject() { + const data: { + seconds?: number; + nanos?: number; + } = {}; + if (this.seconds != null) { + data.seconds = this.seconds; + } + if (this.nanos != null) { + data.nanos = this.nanos; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.seconds != 0) + writer.writeInt64(1, this.seconds); + if (this.nanos != 0) + writer.writeInt32(2, this.nanos); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Timestamp { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Timestamp(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.seconds = reader.readInt64(); + break; + case 2: + message.nanos = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Timestamp { + return Timestamp.deserialize(bytes); + } + } +} diff --git a/src/clients/protos/integration-api.ts b/src/clients/protos/integration-api.ts new file mode 100644 index 0000000..5a9e8e7 --- /dev/null +++ b/src/clients/protos/integration-api.ts @@ -0,0 +1,3392 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: integration-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./common"; +import * as dependency_2 from "./google/protobuf/struct"; +import * as dependency_3 from "./google/protobuf/any"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace integration_api { + export class Credential extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + value?: dependency_2.google.protobuf.Struct; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Struct, 2) as dependency_2.google.protobuf.Struct; + } + set value(value: dependency_2.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_value() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + id?: string; + value?: ReturnType; + }): Credential { + const message = new Credential({}); + if (data.id != null) { + message.id = data.id; + } + if (data.value != null) { + message.value = dependency_2.google.protobuf.Struct.fromObject(data.value); + } + return message; + } + toObject() { + const data: { + id?: string; + value?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.value != null) { + data.value = this.value.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.has_value) + writer.writeMessage(2, this.value, () => this.value.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Credential { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Credential(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.value, () => message.value = dependency_2.google.protobuf.Struct.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Credential { + return Credential.deserialize(bytes); + } + } + export class ToolDefinition extends pb_1.Message { + #one_of_decls: number[][] = [[2]]; + constructor(data?: any[] | ({ + type?: string; + } & (({ + functionDefinition?: FunctionDefinition; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("functionDefinition" in data && data.functionDefinition != undefined) { + this.functionDefinition = data.functionDefinition; + } + } + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set type(value: string) { + pb_1.Message.setField(this, 1, value); + } + get functionDefinition() { + return pb_1.Message.getWrapperField(this, FunctionDefinition, 2) as FunctionDefinition; + } + set functionDefinition(value: FunctionDefinition) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_functionDefinition() { + return pb_1.Message.getField(this, 2) != null; + } + get _functionDefinition() { + const cases: { + [index: number]: "none" | "functionDefinition"; + } = { + 0: "none", + 2: "functionDefinition" + }; + return cases[pb_1.Message.computeOneofCase(this, [2])]; + } + static fromObject(data: { + type?: string; + functionDefinition?: ReturnType; + }): ToolDefinition { + const message = new ToolDefinition({}); + if (data.type != null) { + message.type = data.type; + } + if (data.functionDefinition != null) { + message.functionDefinition = FunctionDefinition.fromObject(data.functionDefinition); + } + return message; + } + toObject() { + const data: { + type?: string; + functionDefinition?: ReturnType; + } = {}; + if (this.type != null) { + data.type = this.type; + } + if (this.functionDefinition != null) { + data.functionDefinition = this.functionDefinition.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.type.length) + writer.writeString(1, this.type); + if (this.has_functionDefinition) + writer.writeMessage(2, this.functionDefinition, () => this.functionDefinition.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ToolDefinition { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ToolDefinition(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type = reader.readString(); + break; + case 2: + reader.readMessage(message.functionDefinition, () => message.functionDefinition = FunctionDefinition.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ToolDefinition { + return ToolDefinition.deserialize(bytes); + } + } + export class FunctionDefinition extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + description?: string; + parameters?: FunctionParameter; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("parameters" in data && data.parameters != undefined) { + this.parameters = data.parameters; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get parameters() { + return pb_1.Message.getWrapperField(this, FunctionParameter, 3) as FunctionParameter; + } + set parameters(value: FunctionParameter) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_parameters() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + name?: string; + description?: string; + parameters?: ReturnType; + }): FunctionDefinition { + const message = new FunctionDefinition({}); + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.parameters != null) { + message.parameters = FunctionParameter.fromObject(data.parameters); + } + return message; + } + toObject() { + const data: { + name?: string; + description?: string; + parameters?: ReturnType; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.parameters != null) { + data.parameters = this.parameters.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.name.length) + writer.writeString(1, this.name); + if (this.description.length) + writer.writeString(2, this.description); + if (this.has_parameters) + writer.writeMessage(3, this.parameters, () => this.parameters.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FunctionDefinition { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FunctionDefinition(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + reader.readMessage(message.parameters, () => message.parameters = FunctionParameter.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FunctionDefinition { + return FunctionDefinition.deserialize(bytes); + } + } + export class FunctionParameter extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + required?: string[]; + type?: string; + properties?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("required" in data && data.required != undefined) { + this.required = data.required; + } + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("properties" in data && data.properties != undefined) { + this.properties = data.properties; + } + } + if (!this.properties) + this.properties = new Map(); + } + get required() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set required(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set type(value: string) { + pb_1.Message.setField(this, 2, value); + } + get properties() { + return pb_1.Message.getField(this, 3) as any as Map; + } + set properties(value: Map) { + pb_1.Message.setField(this, 3, value as any); + } + static fromObject(data: { + required?: string[]; + type?: string; + properties?: { + [key: string]: ReturnType; + }; + }): FunctionParameter { + const message = new FunctionParameter({}); + if (data.required != null) { + message.required = data.required; + } + if (data.type != null) { + message.type = data.type; + } + if (typeof data.properties == "object") { + message.properties = new Map(Object.entries(data.properties).map(([key, value]) => [key, FunctionParameterProperty.fromObject(value)])); + } + return message; + } + toObject() { + const data: { + required?: string[]; + type?: string; + properties?: { + [key: string]: ReturnType; + }; + } = {}; + if (this.required != null) { + data.required = this.required; + } + if (this.type != null) { + data.type = this.type; + } + if (this.properties != null) { + data.properties = (Object.fromEntries)((Array.from)(this.properties).map(([key, value]) => [key, value.toObject()])); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.required.length) + writer.writeRepeatedString(1, this.required); + if (this.type.length) + writer.writeString(2, this.type); + for (const [key, value] of this.properties) { + writer.writeMessage(3, this.properties, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FunctionParameter { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FunctionParameter(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + message.type = reader.readString(); + break; + case 3: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.properties as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = FunctionParameterProperty.deserialize(reader)); + return value; + })); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FunctionParameter { + return FunctionParameter.deserialize(bytes); + } + } + export class FunctionParameterProperty extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + type?: string; + description?: string; + enum?: string[]; + items?: FunctionParameter; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("enum" in data && data.enum != undefined) { + this.enum = data.enum; + } + if ("items" in data && data.items != undefined) { + this.items = data.items; + } + } + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set type(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get enum() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set enum(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + get items() { + return pb_1.Message.getWrapperField(this, FunctionParameter, 4) as FunctionParameter; + } + set items(value: FunctionParameter) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_items() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + type?: string; + description?: string; + enum?: string[]; + items?: ReturnType; + }): FunctionParameterProperty { + const message = new FunctionParameterProperty({}); + if (data.type != null) { + message.type = data.type; + } + if (data.description != null) { + message.description = data.description; + } + if (data.enum != null) { + message.enum = data.enum; + } + if (data.items != null) { + message.items = FunctionParameter.fromObject(data.items); + } + return message; + } + toObject() { + const data: { + type?: string; + description?: string; + enum?: string[]; + items?: ReturnType; + } = {}; + if (this.type != null) { + data.type = this.type; + } + if (this.description != null) { + data.description = this.description; + } + if (this.enum != null) { + data.enum = this.enum; + } + if (this.items != null) { + data.items = this.items.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.type.length) + writer.writeString(1, this.type); + if (this.description.length) + writer.writeString(2, this.description); + if (this.enum.length) + writer.writeRepeatedString(3, this.enum); + if (this.has_items) + writer.writeMessage(4, this.items, () => this.items.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FunctionParameterProperty { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FunctionParameterProperty(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.type = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + case 4: + reader.readMessage(message.items, () => message.items = FunctionParameter.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FunctionParameterProperty { + return FunctionParameterProperty.deserialize(bytes); + } + } + export class Embedding extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + index?: number; + embedding?: number[]; + base64?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("embedding" in data && data.embedding != undefined) { + this.embedding = data.embedding; + } + if ("base64" in data && data.base64 != undefined) { + this.base64 = data.base64; + } + } + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 1, value); + } + get embedding() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as number[]; + } + set embedding(value: number[]) { + pb_1.Message.setField(this, 2, value); + } + get base64() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set base64(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + index?: number; + embedding?: number[]; + base64?: string; + }): Embedding { + const message = new Embedding({}); + if (data.index != null) { + message.index = data.index; + } + if (data.embedding != null) { + message.embedding = data.embedding; + } + if (data.base64 != null) { + message.base64 = data.base64; + } + return message; + } + toObject() { + const data: { + index?: number; + embedding?: number[]; + base64?: string; + } = {}; + if (this.index != null) { + data.index = this.index; + } + if (this.embedding != null) { + data.embedding = this.embedding; + } + if (this.base64 != null) { + data.base64 = this.base64; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.index != 0) + writer.writeInt32(1, this.index); + if (this.embedding.length) + writer.writePackedDouble(2, this.embedding); + if (this.base64.length) + writer.writeString(3, this.base64); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Embedding { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Embedding(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.index = reader.readInt32(); + break; + case 2: + message.embedding = reader.readPackedDouble(); + break; + case 3: + message.base64 = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Embedding { + return Embedding.deserialize(bytes); + } + } + export class EmbeddingRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + credential?: Credential; + content?: Map; + modelParameters?: Map; + additionalData?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("credential" in data && data.credential != undefined) { + this.credential = data.credential; + } + if ("content" in data && data.content != undefined) { + this.content = data.content; + } + if ("modelParameters" in data && data.modelParameters != undefined) { + this.modelParameters = data.modelParameters; + } + if ("additionalData" in data && data.additionalData != undefined) { + this.additionalData = data.additionalData; + } + } + if (!this.content) + this.content = new Map(); + if (!this.modelParameters) + this.modelParameters = new Map(); + if (!this.additionalData) + this.additionalData = new Map(); + } + get credential() { + return pb_1.Message.getWrapperField(this, Credential, 1) as Credential; + } + set credential(value: Credential) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_credential() { + return pb_1.Message.getField(this, 1) != null; + } + get content() { + return pb_1.Message.getField(this, 4) as any as Map; + } + set content(value: Map) { + pb_1.Message.setField(this, 4, value as any); + } + get modelParameters() { + return pb_1.Message.getField(this, 5) as any as Map; + } + set modelParameters(value: Map) { + pb_1.Message.setField(this, 5, value as any); + } + get additionalData() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set additionalData(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + static fromObject(data: { + credential?: ReturnType; + content?: { + [key: number]: string; + }; + modelParameters?: { + [key: string]: ReturnType; + }; + additionalData?: { + [key: string]: string; + }; + }): EmbeddingRequest { + const message = new EmbeddingRequest({}); + if (data.credential != null) { + message.credential = Credential.fromObject(data.credential); + } + if (typeof data.content == "object") { + message.content = new Map(Object.entries(data.content).map(([key, value]) => [Number(key), value])); + } + if (typeof data.modelParameters == "object") { + message.modelParameters = new Map(Object.entries(data.modelParameters).map(([key, value]) => [key, dependency_3.google.protobuf.Any.fromObject(value)])); + } + if (typeof data.additionalData == "object") { + message.additionalData = new Map(Object.entries(data.additionalData)); + } + return message; + } + toObject() { + const data: { + credential?: ReturnType; + content?: { + [key: number]: string; + }; + modelParameters?: { + [key: string]: ReturnType; + }; + additionalData?: { + [key: string]: string; + }; + } = {}; + if (this.credential != null) { + data.credential = this.credential.toObject(); + } + if (this.content != null) { + data.content = (Object.fromEntries)(this.content); + } + if (this.modelParameters != null) { + data.modelParameters = (Object.fromEntries)((Array.from)(this.modelParameters).map(([key, value]) => [key, value.toObject()])); + } + if (this.additionalData != null) { + data.additionalData = (Object.fromEntries)(this.additionalData); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_credential) + writer.writeMessage(1, this.credential, () => this.credential.serialize(writer)); + for (const [key, value] of this.content) { + writer.writeMessage(4, this.content, () => { + writer.writeInt32(1, key); + writer.writeString(2, value); + }); + } + for (const [key, value] of this.modelParameters) { + writer.writeMessage(5, this.modelParameters, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + for (const [key, value] of this.additionalData) { + writer.writeMessage(6, this.additionalData, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EmbeddingRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EmbeddingRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.credential, () => message.credential = Credential.deserialize(reader)); + break; + case 4: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.content as any, reader, reader.readInt32, reader.readString)); + break; + case 5: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.modelParameters as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_3.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.additionalData as any, reader, reader.readString, reader.readString)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EmbeddingRequest { + return EmbeddingRequest.deserialize(bytes); + } + } + export class EmbeddingResponse extends pb_1.Message { + #one_of_decls: number[][] = [[5]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + requestId?: number; + data?: Embedding[]; + metrics?: dependency_1.Metric[]; + } & (({ + error?: dependency_1.Error; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("requestId" in data && data.requestId != undefined) { + this.requestId = data.requestId; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get requestId() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set requestId(value: number) { + pb_1.Message.setField(this, 3, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, Embedding, 4) as Embedding[]; + } + set data(value: Embedding[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_1.Error, 5) as dependency_1.Error; + } + set error(value: dependency_1.Error) { + pb_1.Message.setOneofWrapperField(this, 5, this.#one_of_decls[0], value); + } + get has_error() { + return pb_1.Message.getField(this, 5) != null; + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.Metric, 6) as dependency_1.Metric[]; + } + set metrics(value: dependency_1.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get _error() { + const cases: { + [index: number]: "none" | "error"; + } = { + 0: "none", + 5: "error" + }; + return cases[pb_1.Message.computeOneofCase(this, [5])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + requestId?: number; + data?: ReturnType[]; + error?: ReturnType; + metrics?: ReturnType[]; + }): EmbeddingResponse { + const message = new EmbeddingResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.requestId != null) { + message.requestId = data.requestId; + } + if (data.data != null) { + message.data = data.data.map(item => Embedding.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_1.Error.fromObject(data.error); + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => dependency_1.Metric.fromObject(item)); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + requestId?: number; + data?: ReturnType[]; + error?: ReturnType; + metrics?: ReturnType[]; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.requestId != null) { + data.requestId = this.requestId; + } + if (this.data != null) { + data.data = this.data.map((item: Embedding) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: dependency_1.Metric) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.requestId != 0) + writer.writeUint64(3, this.requestId); + if (this.data.length) + writer.writeRepeatedMessage(4, this.data, (item: Embedding) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(5, this.error, () => this.error.serialize(writer)); + if (this.metrics.length) + writer.writeRepeatedMessage(6, this.metrics, (item: dependency_1.Metric) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EmbeddingResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EmbeddingResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + message.requestId = reader.readUint64(); + break; + case 4: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 4, Embedding.deserialize(reader), Embedding)); + break; + case 5: + reader.readMessage(message.error, () => message.error = dependency_1.Error.deserialize(reader)); + break; + case 6: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_1.Metric.deserialize(reader), dependency_1.Metric)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EmbeddingResponse { + return EmbeddingResponse.deserialize(bytes); + } + } + export class Reranking extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + index?: number; + content?: dependency_1.Content; + RelevanceScore?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("content" in data && data.content != undefined) { + this.content = data.content; + } + if ("RelevanceScore" in data && data.RelevanceScore != undefined) { + this.RelevanceScore = data.RelevanceScore; + } + } + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 1, value); + } + get content() { + return pb_1.Message.getWrapperField(this, dependency_1.Content, 2) as dependency_1.Content; + } + set content(value: dependency_1.Content) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_content() { + return pb_1.Message.getField(this, 2) != null; + } + get RelevanceScore() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set RelevanceScore(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + index?: number; + content?: ReturnType; + RelevanceScore?: number; + }): Reranking { + const message = new Reranking({}); + if (data.index != null) { + message.index = data.index; + } + if (data.content != null) { + message.content = dependency_1.Content.fromObject(data.content); + } + if (data.RelevanceScore != null) { + message.RelevanceScore = data.RelevanceScore; + } + return message; + } + toObject() { + const data: { + index?: number; + content?: ReturnType; + RelevanceScore?: number; + } = {}; + if (this.index != null) { + data.index = this.index; + } + if (this.content != null) { + data.content = this.content.toObject(); + } + if (this.RelevanceScore != null) { + data.RelevanceScore = this.RelevanceScore; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.index != 0) + writer.writeInt32(1, this.index); + if (this.has_content) + writer.writeMessage(2, this.content, () => this.content.serialize(writer)); + if (this.RelevanceScore != 0) + writer.writeDouble(3, this.RelevanceScore); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Reranking { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Reranking(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.index = reader.readInt32(); + break; + case 2: + reader.readMessage(message.content, () => message.content = dependency_1.Content.deserialize(reader)); + break; + case 3: + message.RelevanceScore = reader.readDouble(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Reranking { + return Reranking.deserialize(bytes); + } + } + export class RerankingRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + credential?: Credential; + query?: string; + content?: Map; + modelParameters?: Map; + additionalData?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("credential" in data && data.credential != undefined) { + this.credential = data.credential; + } + if ("query" in data && data.query != undefined) { + this.query = data.query; + } + if ("content" in data && data.content != undefined) { + this.content = data.content; + } + if ("modelParameters" in data && data.modelParameters != undefined) { + this.modelParameters = data.modelParameters; + } + if ("additionalData" in data && data.additionalData != undefined) { + this.additionalData = data.additionalData; + } + } + if (!this.content) + this.content = new Map(); + if (!this.modelParameters) + this.modelParameters = new Map(); + if (!this.additionalData) + this.additionalData = new Map(); + } + get credential() { + return pb_1.Message.getWrapperField(this, Credential, 1) as Credential; + } + set credential(value: Credential) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_credential() { + return pb_1.Message.getField(this, 1) != null; + } + get query() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set query(value: string) { + pb_1.Message.setField(this, 4, value); + } + get content() { + return pb_1.Message.getField(this, 5) as any as Map; + } + set content(value: Map) { + pb_1.Message.setField(this, 5, value as any); + } + get modelParameters() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set modelParameters(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + get additionalData() { + return pb_1.Message.getField(this, 7) as any as Map; + } + set additionalData(value: Map) { + pb_1.Message.setField(this, 7, value as any); + } + static fromObject(data: { + credential?: ReturnType; + query?: string; + content?: { + [key: number]: ReturnType; + }; + modelParameters?: { + [key: string]: ReturnType; + }; + additionalData?: { + [key: string]: string; + }; + }): RerankingRequest { + const message = new RerankingRequest({}); + if (data.credential != null) { + message.credential = Credential.fromObject(data.credential); + } + if (data.query != null) { + message.query = data.query; + } + if (typeof data.content == "object") { + message.content = new Map(Object.entries(data.content).map(([key, value]) => [Number(key), dependency_1.Content.fromObject(value)])); + } + if (typeof data.modelParameters == "object") { + message.modelParameters = new Map(Object.entries(data.modelParameters).map(([key, value]) => [key, dependency_3.google.protobuf.Any.fromObject(value)])); + } + if (typeof data.additionalData == "object") { + message.additionalData = new Map(Object.entries(data.additionalData)); + } + return message; + } + toObject() { + const data: { + credential?: ReturnType; + query?: string; + content?: { + [key: number]: ReturnType; + }; + modelParameters?: { + [key: string]: ReturnType; + }; + additionalData?: { + [key: string]: string; + }; + } = {}; + if (this.credential != null) { + data.credential = this.credential.toObject(); + } + if (this.query != null) { + data.query = this.query; + } + if (this.content != null) { + data.content = (Object.fromEntries)((Array.from)(this.content).map(([key, value]) => [key, value.toObject()])); + } + if (this.modelParameters != null) { + data.modelParameters = (Object.fromEntries)((Array.from)(this.modelParameters).map(([key, value]) => [key, value.toObject()])); + } + if (this.additionalData != null) { + data.additionalData = (Object.fromEntries)(this.additionalData); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_credential) + writer.writeMessage(1, this.credential, () => this.credential.serialize(writer)); + if (this.query.length) + writer.writeString(4, this.query); + for (const [key, value] of this.content) { + writer.writeMessage(5, this.content, () => { + writer.writeInt32(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + for (const [key, value] of this.modelParameters) { + writer.writeMessage(6, this.modelParameters, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + for (const [key, value] of this.additionalData) { + writer.writeMessage(7, this.additionalData, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RerankingRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RerankingRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.credential, () => message.credential = Credential.deserialize(reader)); + break; + case 4: + message.query = reader.readString(); + break; + case 5: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.content as any, reader, reader.readInt32, () => { + let value; + reader.readMessage(message, () => value = dependency_1.Content.deserialize(reader)); + return value; + })); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.modelParameters as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_3.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + case 7: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.additionalData as any, reader, reader.readString, reader.readString)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RerankingRequest { + return RerankingRequest.deserialize(bytes); + } + } + export class RerankingResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + requestId?: number; + data?: Reranking[]; + error?: dependency_1.Error; + metrics?: dependency_1.Metric[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("requestId" in data && data.requestId != undefined) { + this.requestId = data.requestId; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get requestId() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set requestId(value: number) { + pb_1.Message.setField(this, 3, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, Reranking, 4) as Reranking[]; + } + set data(value: Reranking[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_1.Error, 5) as dependency_1.Error; + } + set error(value: dependency_1.Error) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_error() { + return pb_1.Message.getField(this, 5) != null; + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.Metric, 6) as dependency_1.Metric[]; + } + set metrics(value: dependency_1.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + static fromObject(data: { + code?: number; + success?: boolean; + requestId?: number; + data?: ReturnType[]; + error?: ReturnType; + metrics?: ReturnType[]; + }): RerankingResponse { + const message = new RerankingResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.requestId != null) { + message.requestId = data.requestId; + } + if (data.data != null) { + message.data = data.data.map(item => Reranking.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_1.Error.fromObject(data.error); + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => dependency_1.Metric.fromObject(item)); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + requestId?: number; + data?: ReturnType[]; + error?: ReturnType; + metrics?: ReturnType[]; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.requestId != null) { + data.requestId = this.requestId; + } + if (this.data != null) { + data.data = this.data.map((item: Reranking) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: dependency_1.Metric) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.requestId != 0) + writer.writeUint64(3, this.requestId); + if (this.data.length) + writer.writeRepeatedMessage(4, this.data, (item: Reranking) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(5, this.error, () => this.error.serialize(writer)); + if (this.metrics.length) + writer.writeRepeatedMessage(6, this.metrics, (item: dependency_1.Metric) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RerankingResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RerankingResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + message.requestId = reader.readUint64(); + break; + case 4: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 4, Reranking.deserialize(reader), Reranking)); + break; + case 5: + reader.readMessage(message.error, () => message.error = dependency_1.Error.deserialize(reader)); + break; + case 6: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_1.Metric.deserialize(reader), dependency_1.Metric)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RerankingResponse { + return RerankingResponse.deserialize(bytes); + } + } + export class ChatResponse extends pb_1.Message { + #one_of_decls: number[][] = [[4], [6]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + requestId?: number; + metrics?: dependency_1.Metric[]; + finishReason?: string; + } & (({ + data?: dependency_1.Message; + }) | ({ + error?: dependency_1.Error; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("requestId" in data && data.requestId != undefined) { + this.requestId = data.requestId; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + if ("finishReason" in data && data.finishReason != undefined) { + this.finishReason = data.finishReason; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get requestId() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set requestId(value: number) { + pb_1.Message.setField(this, 3, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_1.Message, 4) as dependency_1.Message; + } + set data(value: dependency_1.Message) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value); + } + get has_data() { + return pb_1.Message.getField(this, 4) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_1.Error, 6) as dependency_1.Error; + } + set error(value: dependency_1.Error) { + pb_1.Message.setOneofWrapperField(this, 6, this.#one_of_decls[1], value); + } + get has_error() { + return pb_1.Message.getField(this, 6) != null; + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.Metric, 7) as dependency_1.Metric[]; + } + set metrics(value: dependency_1.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get finishReason() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set finishReason(value: string) { + pb_1.Message.setField(this, 8, value); + } + get _data() { + const cases: { + [index: number]: "none" | "data"; + } = { + 0: "none", + 4: "data" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + get _error() { + const cases: { + [index: number]: "none" | "error"; + } = { + 0: "none", + 6: "error" + }; + return cases[pb_1.Message.computeOneofCase(this, [6])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + requestId?: number; + data?: ReturnType; + error?: ReturnType; + metrics?: ReturnType[]; + finishReason?: string; + }): ChatResponse { + const message = new ChatResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.requestId != null) { + message.requestId = data.requestId; + } + if (data.data != null) { + message.data = dependency_1.Message.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_1.Error.fromObject(data.error); + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => dependency_1.Metric.fromObject(item)); + } + if (data.finishReason != null) { + message.finishReason = data.finishReason; + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + requestId?: number; + data?: ReturnType; + error?: ReturnType; + metrics?: ReturnType[]; + finishReason?: string; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.requestId != null) { + data.requestId = this.requestId; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: dependency_1.Metric) => item.toObject()); + } + if (this.finishReason != null) { + data.finishReason = this.finishReason; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.requestId != 0) + writer.writeUint64(3, this.requestId); + if (this.has_data) + writer.writeMessage(4, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(6, this.error, () => this.error.serialize(writer)); + if (this.metrics.length) + writer.writeRepeatedMessage(7, this.metrics, (item: dependency_1.Metric) => item.serialize(writer)); + if (this.finishReason.length) + writer.writeString(8, this.finishReason); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ChatResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ChatResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + message.requestId = reader.readUint64(); + break; + case 4: + reader.readMessage(message.data, () => message.data = dependency_1.Message.deserialize(reader)); + break; + case 6: + reader.readMessage(message.error, () => message.error = dependency_1.Error.deserialize(reader)); + break; + case 7: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_1.Metric.deserialize(reader), dependency_1.Metric)); + break; + case 8: + message.finishReason = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ChatResponse { + return ChatResponse.deserialize(bytes); + } + } + export class ChatRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + credential?: Credential; + conversations?: dependency_1.Message[]; + additionalData?: Map; + modelParameters?: Map; + toolDefinitions?: ToolDefinition[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("credential" in data && data.credential != undefined) { + this.credential = data.credential; + } + if ("conversations" in data && data.conversations != undefined) { + this.conversations = data.conversations; + } + if ("additionalData" in data && data.additionalData != undefined) { + this.additionalData = data.additionalData; + } + if ("modelParameters" in data && data.modelParameters != undefined) { + this.modelParameters = data.modelParameters; + } + if ("toolDefinitions" in data && data.toolDefinitions != undefined) { + this.toolDefinitions = data.toolDefinitions; + } + } + if (!this.additionalData) + this.additionalData = new Map(); + if (!this.modelParameters) + this.modelParameters = new Map(); + } + get credential() { + return pb_1.Message.getWrapperField(this, Credential, 1) as Credential; + } + set credential(value: Credential) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_credential() { + return pb_1.Message.getField(this, 1) != null; + } + get conversations() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.Message, 4) as dependency_1.Message[]; + } + set conversations(value: dependency_1.Message[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get additionalData() { + return pb_1.Message.getField(this, 5) as any as Map; + } + set additionalData(value: Map) { + pb_1.Message.setField(this, 5, value as any); + } + get modelParameters() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set modelParameters(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + get toolDefinitions() { + return pb_1.Message.getRepeatedWrapperField(this, ToolDefinition, 7) as ToolDefinition[]; + } + set toolDefinitions(value: ToolDefinition[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + static fromObject(data: { + credential?: ReturnType; + conversations?: ReturnType[]; + additionalData?: { + [key: string]: string; + }; + modelParameters?: { + [key: string]: ReturnType; + }; + toolDefinitions?: ReturnType[]; + }): ChatRequest { + const message = new ChatRequest({}); + if (data.credential != null) { + message.credential = Credential.fromObject(data.credential); + } + if (data.conversations != null) { + message.conversations = data.conversations.map(item => dependency_1.Message.fromObject(item)); + } + if (typeof data.additionalData == "object") { + message.additionalData = new Map(Object.entries(data.additionalData)); + } + if (typeof data.modelParameters == "object") { + message.modelParameters = new Map(Object.entries(data.modelParameters).map(([key, value]) => [key, dependency_3.google.protobuf.Any.fromObject(value)])); + } + if (data.toolDefinitions != null) { + message.toolDefinitions = data.toolDefinitions.map(item => ToolDefinition.fromObject(item)); + } + return message; + } + toObject() { + const data: { + credential?: ReturnType; + conversations?: ReturnType[]; + additionalData?: { + [key: string]: string; + }; + modelParameters?: { + [key: string]: ReturnType; + }; + toolDefinitions?: ReturnType[]; + } = {}; + if (this.credential != null) { + data.credential = this.credential.toObject(); + } + if (this.conversations != null) { + data.conversations = this.conversations.map((item: dependency_1.Message) => item.toObject()); + } + if (this.additionalData != null) { + data.additionalData = (Object.fromEntries)(this.additionalData); + } + if (this.modelParameters != null) { + data.modelParameters = (Object.fromEntries)((Array.from)(this.modelParameters).map(([key, value]) => [key, value.toObject()])); + } + if (this.toolDefinitions != null) { + data.toolDefinitions = this.toolDefinitions.map((item: ToolDefinition) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_credential) + writer.writeMessage(1, this.credential, () => this.credential.serialize(writer)); + if (this.conversations.length) + writer.writeRepeatedMessage(4, this.conversations, (item: dependency_1.Message) => item.serialize(writer)); + for (const [key, value] of this.additionalData) { + writer.writeMessage(5, this.additionalData, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + for (const [key, value] of this.modelParameters) { + writer.writeMessage(6, this.modelParameters, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + if (this.toolDefinitions.length) + writer.writeRepeatedMessage(7, this.toolDefinitions, (item: ToolDefinition) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ChatRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ChatRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.credential, () => message.credential = Credential.deserialize(reader)); + break; + case 4: + reader.readMessage(message.conversations, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_1.Message.deserialize(reader), dependency_1.Message)); + break; + case 5: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.additionalData as any, reader, reader.readString, reader.readString)); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.modelParameters as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_3.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + case 7: + reader.readMessage(message.toolDefinitions, () => pb_1.Message.addToRepeatedWrapperField(message, 7, ToolDefinition.deserialize(reader), ToolDefinition)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ChatRequest { + return ChatRequest.deserialize(bytes); + } + } + export class VerifyCredentialRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + credential?: Credential; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("credential" in data && data.credential != undefined) { + this.credential = data.credential; + } + } + } + get credential() { + return pb_1.Message.getWrapperField(this, Credential, 1) as Credential; + } + set credential(value: Credential) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_credential() { + return pb_1.Message.getField(this, 1) != null; + } + static fromObject(data: { + credential?: ReturnType; + }): VerifyCredentialRequest { + const message = new VerifyCredentialRequest({}); + if (data.credential != null) { + message.credential = Credential.fromObject(data.credential); + } + return message; + } + toObject() { + const data: { + credential?: ReturnType; + } = {}; + if (this.credential != null) { + data.credential = this.credential.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_credential) + writer.writeMessage(1, this.credential, () => this.credential.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VerifyCredentialRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VerifyCredentialRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.credential, () => message.credential = Credential.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VerifyCredentialRequest { + return VerifyCredentialRequest.deserialize(bytes); + } + } + export class VerifyCredentialResponse extends pb_1.Message { + #one_of_decls: number[][] = [[4]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + requestId?: number; + errorMessage?: string; + } & (({ + response?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("requestId" in data && data.requestId != undefined) { + this.requestId = data.requestId; + } + if ("response" in data && data.response != undefined) { + this.response = data.response; + } + if ("errorMessage" in data && data.errorMessage != undefined) { + this.errorMessage = data.errorMessage; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get requestId() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set requestId(value: number) { + pb_1.Message.setField(this, 3, value); + } + get response() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set response(value: string) { + pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value); + } + get has_response() { + return pb_1.Message.getField(this, 4) != null; + } + get errorMessage() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set errorMessage(value: string) { + pb_1.Message.setField(this, 5, value); + } + get _response() { + const cases: { + [index: number]: "none" | "response"; + } = { + 0: "none", + 4: "response" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + requestId?: number; + response?: string; + errorMessage?: string; + }): VerifyCredentialResponse { + const message = new VerifyCredentialResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.requestId != null) { + message.requestId = data.requestId; + } + if (data.response != null) { + message.response = data.response; + } + if (data.errorMessage != null) { + message.errorMessage = data.errorMessage; + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + requestId?: number; + response?: string; + errorMessage?: string; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.requestId != null) { + data.requestId = this.requestId; + } + if (this.response != null) { + data.response = this.response; + } + if (this.errorMessage != null) { + data.errorMessage = this.errorMessage; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.requestId != 0) + writer.writeUint64(3, this.requestId); + if (this.has_response) + writer.writeString(4, this.response); + if (this.errorMessage.length) + writer.writeString(5, this.errorMessage); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VerifyCredentialResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VerifyCredentialResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + message.requestId = reader.readUint64(); + break; + case 4: + message.response = reader.readString(); + break; + case 5: + message.errorMessage = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VerifyCredentialResponse { + return VerifyCredentialResponse.deserialize(bytes); + } + } + export class Moderation extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + value?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get value() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set value(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + name?: string; + value?: string; + }): Moderation { + const message = new Moderation({}); + if (data.name != null) { + message.name = data.name; + } + if (data.value != null) { + message.value = data.value; + } + return message; + } + toObject() { + const data: { + name?: string; + value?: string; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.value != null) { + data.value = this.value; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.name.length) + writer.writeString(1, this.name); + if (this.value.length) + writer.writeString(2, this.value); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Moderation { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Moderation(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.value = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Moderation { + return Moderation.deserialize(bytes); + } + } + export class GetModerationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + credential?: Credential; + model?: string; + version?: string; + content?: dependency_1.Content; + additionalData?: Map; + modelParameters?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("credential" in data && data.credential != undefined) { + this.credential = data.credential; + } + if ("model" in data && data.model != undefined) { + this.model = data.model; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + if ("content" in data && data.content != undefined) { + this.content = data.content; + } + if ("additionalData" in data && data.additionalData != undefined) { + this.additionalData = data.additionalData; + } + if ("modelParameters" in data && data.modelParameters != undefined) { + this.modelParameters = data.modelParameters; + } + } + if (!this.additionalData) + this.additionalData = new Map(); + if (!this.modelParameters) + this.modelParameters = new Map(); + } + get credential() { + return pb_1.Message.getWrapperField(this, Credential, 1) as Credential; + } + set credential(value: Credential) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_credential() { + return pb_1.Message.getField(this, 1) != null; + } + get model() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set model(value: string) { + pb_1.Message.setField(this, 2, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 3, value); + } + get content() { + return pb_1.Message.getWrapperField(this, dependency_1.Content, 4) as dependency_1.Content; + } + set content(value: dependency_1.Content) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_content() { + return pb_1.Message.getField(this, 4) != null; + } + get additionalData() { + return pb_1.Message.getField(this, 5) as any as Map; + } + set additionalData(value: Map) { + pb_1.Message.setField(this, 5, value as any); + } + get modelParameters() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set modelParameters(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + static fromObject(data: { + credential?: ReturnType; + model?: string; + version?: string; + content?: ReturnType; + additionalData?: { + [key: string]: string; + }; + modelParameters?: { + [key: string]: ReturnType; + }; + }): GetModerationRequest { + const message = new GetModerationRequest({}); + if (data.credential != null) { + message.credential = Credential.fromObject(data.credential); + } + if (data.model != null) { + message.model = data.model; + } + if (data.version != null) { + message.version = data.version; + } + if (data.content != null) { + message.content = dependency_1.Content.fromObject(data.content); + } + if (typeof data.additionalData == "object") { + message.additionalData = new Map(Object.entries(data.additionalData)); + } + if (typeof data.modelParameters == "object") { + message.modelParameters = new Map(Object.entries(data.modelParameters).map(([key, value]) => [key, dependency_3.google.protobuf.Any.fromObject(value)])); + } + return message; + } + toObject() { + const data: { + credential?: ReturnType; + model?: string; + version?: string; + content?: ReturnType; + additionalData?: { + [key: string]: string; + }; + modelParameters?: { + [key: string]: ReturnType; + }; + } = {}; + if (this.credential != null) { + data.credential = this.credential.toObject(); + } + if (this.model != null) { + data.model = this.model; + } + if (this.version != null) { + data.version = this.version; + } + if (this.content != null) { + data.content = this.content.toObject(); + } + if (this.additionalData != null) { + data.additionalData = (Object.fromEntries)(this.additionalData); + } + if (this.modelParameters != null) { + data.modelParameters = (Object.fromEntries)((Array.from)(this.modelParameters).map(([key, value]) => [key, value.toObject()])); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_credential) + writer.writeMessage(1, this.credential, () => this.credential.serialize(writer)); + if (this.model.length) + writer.writeString(2, this.model); + if (this.version.length) + writer.writeString(3, this.version); + if (this.has_content) + writer.writeMessage(4, this.content, () => this.content.serialize(writer)); + for (const [key, value] of this.additionalData) { + writer.writeMessage(5, this.additionalData, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + for (const [key, value] of this.modelParameters) { + writer.writeMessage(6, this.modelParameters, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetModerationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetModerationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.credential, () => message.credential = Credential.deserialize(reader)); + break; + case 2: + message.model = reader.readString(); + break; + case 3: + message.version = reader.readString(); + break; + case 4: + reader.readMessage(message.content, () => message.content = dependency_1.Content.deserialize(reader)); + break; + case 5: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.additionalData as any, reader, reader.readString, reader.readString)); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.modelParameters as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_3.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetModerationRequest { + return GetModerationRequest.deserialize(bytes); + } + } + export class GetModerationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + requestId?: number; + data?: Moderation[]; + error?: dependency_1.Error; + metrics?: dependency_1.Metric[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("requestId" in data && data.requestId != undefined) { + this.requestId = data.requestId; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get requestId() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set requestId(value: number) { + pb_1.Message.setField(this, 3, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, Moderation, 4) as Moderation[]; + } + set data(value: Moderation[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_1.Error, 5) as dependency_1.Error; + } + set error(value: dependency_1.Error) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_error() { + return pb_1.Message.getField(this, 5) != null; + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.Metric, 6) as dependency_1.Metric[]; + } + set metrics(value: dependency_1.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + static fromObject(data: { + code?: number; + success?: boolean; + requestId?: number; + data?: ReturnType[]; + error?: ReturnType; + metrics?: ReturnType[]; + }): GetModerationResponse { + const message = new GetModerationResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.requestId != null) { + message.requestId = data.requestId; + } + if (data.data != null) { + message.data = data.data.map(item => Moderation.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_1.Error.fromObject(data.error); + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => dependency_1.Metric.fromObject(item)); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + requestId?: number; + data?: ReturnType[]; + error?: ReturnType; + metrics?: ReturnType[]; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.requestId != null) { + data.requestId = this.requestId; + } + if (this.data != null) { + data.data = this.data.map((item: Moderation) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: dependency_1.Metric) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.requestId != 0) + writer.writeUint64(3, this.requestId); + if (this.data.length) + writer.writeRepeatedMessage(4, this.data, (item: Moderation) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(5, this.error, () => this.error.serialize(writer)); + if (this.metrics.length) + writer.writeRepeatedMessage(6, this.metrics, (item: dependency_1.Metric) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetModerationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetModerationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + message.requestId = reader.readUint64(); + break; + case 4: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 4, Moderation.deserialize(reader), Moderation)); + break; + case 5: + reader.readMessage(message.error, () => message.error = dependency_1.Error.deserialize(reader)); + break; + case 6: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_1.Metric.deserialize(reader), dependency_1.Metric)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetModerationResponse { + return GetModerationResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedBedrockServiceService { + static definition = { + Embedding: { + path: "/integration_api.BedrockService/Embedding", + requestStream: false, + responseStream: false, + requestSerialize: (message: EmbeddingRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => EmbeddingRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: EmbeddingResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => EmbeddingResponse.deserialize(new Uint8Array(bytes)) + }, + Chat: { + path: "/integration_api.BedrockService/Chat", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.BedrockService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Embedding(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Chat(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class BedrockServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedBedrockServiceService.definition, "BedrockService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Embedding: GrpcUnaryServiceInterface = (message: EmbeddingRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Embedding(message, metadata, options, callback); + }; + Chat: GrpcUnaryServiceInterface = (message: ChatRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Chat(message, metadata, options, callback); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } + export abstract class UnimplementedOpenAiServiceService { + static definition = { + Embedding: { + path: "/integration_api.OpenAiService/Embedding", + requestStream: false, + responseStream: false, + requestSerialize: (message: EmbeddingRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => EmbeddingRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: EmbeddingResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => EmbeddingResponse.deserialize(new Uint8Array(bytes)) + }, + Chat: { + path: "/integration_api.OpenAiService/Chat", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + StreamChat: { + path: "/integration_api.OpenAiService/StreamChat", + requestStream: false, + responseStream: true, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.OpenAiService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + }, + GetModeration: { + path: "/integration_api.OpenAiService/GetModeration", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetModerationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetModerationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetModerationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetModerationResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Embedding(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Chat(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract StreamChat(call: grpc_1.ServerWritableStream): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetModeration(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class OpenAiServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedOpenAiServiceService.definition, "OpenAiService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Embedding: GrpcUnaryServiceInterface = (message: EmbeddingRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Embedding(message, metadata, options, callback); + }; + Chat: GrpcUnaryServiceInterface = (message: ChatRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Chat(message, metadata, options, callback); + }; + StreamChat: GrpcStreamServiceInterface = (message: ChatRequest, metadata?: grpc_1.Metadata | grpc_1.CallOptions, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream => { + return super.StreamChat(message, metadata, options); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + GetModeration: GrpcUnaryServiceInterface = (message: GetModerationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetModeration(message, metadata, options, callback); + }; + } + export abstract class UnimplementedAzureServiceService { + static definition = { + Embedding: { + path: "/integration_api.AzureService/Embedding", + requestStream: false, + responseStream: false, + requestSerialize: (message: EmbeddingRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => EmbeddingRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: EmbeddingResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => EmbeddingResponse.deserialize(new Uint8Array(bytes)) + }, + Chat: { + path: "/integration_api.AzureService/Chat", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + StreamChat: { + path: "/integration_api.AzureService/StreamChat", + requestStream: false, + responseStream: true, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.AzureService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + }, + GetModeration: { + path: "/integration_api.AzureService/GetModeration", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetModerationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetModerationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetModerationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetModerationResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Embedding(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Chat(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract StreamChat(call: grpc_1.ServerWritableStream): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetModeration(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class AzureServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedAzureServiceService.definition, "AzureService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Embedding: GrpcUnaryServiceInterface = (message: EmbeddingRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Embedding(message, metadata, options, callback); + }; + Chat: GrpcUnaryServiceInterface = (message: ChatRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Chat(message, metadata, options, callback); + }; + StreamChat: GrpcStreamServiceInterface = (message: ChatRequest, metadata?: grpc_1.Metadata | grpc_1.CallOptions, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream => { + return super.StreamChat(message, metadata, options); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + GetModeration: GrpcUnaryServiceInterface = (message: GetModerationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetModeration(message, metadata, options, callback); + }; + } + export abstract class UnimplementedGoogleServiceService { + static definition = { + Embedding: { + path: "/integration_api.GoogleService/Embedding", + requestStream: false, + responseStream: false, + requestSerialize: (message: EmbeddingRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => EmbeddingRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: EmbeddingResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => EmbeddingResponse.deserialize(new Uint8Array(bytes)) + }, + Chat: { + path: "/integration_api.GoogleService/Chat", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + StreamChat: { + path: "/integration_api.GoogleService/StreamChat", + requestStream: false, + responseStream: true, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.GoogleService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Embedding(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Chat(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract StreamChat(call: grpc_1.ServerWritableStream): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class GoogleServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedGoogleServiceService.definition, "GoogleService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Embedding: GrpcUnaryServiceInterface = (message: EmbeddingRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Embedding(message, metadata, options, callback); + }; + Chat: GrpcUnaryServiceInterface = (message: ChatRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Chat(message, metadata, options, callback); + }; + StreamChat: GrpcStreamServiceInterface = (message: ChatRequest, metadata?: grpc_1.Metadata | grpc_1.CallOptions, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream => { + return super.StreamChat(message, metadata, options); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } + export abstract class UnimplementedReplicateServiceService { + static definition = { + Chat: { + path: "/integration_api.ReplicateService/Chat", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + StreamChat: { + path: "/integration_api.ReplicateService/StreamChat", + requestStream: false, + responseStream: true, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.ReplicateService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Chat(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract StreamChat(call: grpc_1.ServerWritableStream): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ReplicateServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedReplicateServiceService.definition, "ReplicateService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Chat: GrpcUnaryServiceInterface = (message: ChatRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Chat(message, metadata, options, callback); + }; + StreamChat: GrpcStreamServiceInterface = (message: ChatRequest, metadata?: grpc_1.Metadata | grpc_1.CallOptions, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream => { + return super.StreamChat(message, metadata, options); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } + export abstract class UnimplementedAnthropicServiceService { + static definition = { + Chat: { + path: "/integration_api.AnthropicService/Chat", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + StreamChat: { + path: "/integration_api.AnthropicService/StreamChat", + requestStream: false, + responseStream: true, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.AnthropicService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Chat(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract StreamChat(call: grpc_1.ServerWritableStream): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class AnthropicServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedAnthropicServiceService.definition, "AnthropicService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Chat: GrpcUnaryServiceInterface = (message: ChatRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Chat(message, metadata, options, callback); + }; + StreamChat: GrpcStreamServiceInterface = (message: ChatRequest, metadata?: grpc_1.Metadata | grpc_1.CallOptions, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream => { + return super.StreamChat(message, metadata, options); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } + export abstract class UnimplementedCohereServiceService { + static definition = { + Embedding: { + path: "/integration_api.CohereService/Embedding", + requestStream: false, + responseStream: false, + requestSerialize: (message: EmbeddingRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => EmbeddingRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: EmbeddingResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => EmbeddingResponse.deserialize(new Uint8Array(bytes)) + }, + Reranking: { + path: "/integration_api.CohereService/Reranking", + requestStream: false, + responseStream: false, + requestSerialize: (message: RerankingRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RerankingRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: RerankingResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => RerankingResponse.deserialize(new Uint8Array(bytes)) + }, + Chat: { + path: "/integration_api.CohereService/Chat", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + StreamChat: { + path: "/integration_api.CohereService/StreamChat", + requestStream: false, + responseStream: true, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.CohereService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Embedding(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Reranking(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Chat(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract StreamChat(call: grpc_1.ServerWritableStream): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class CohereServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedCohereServiceService.definition, "CohereService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Embedding: GrpcUnaryServiceInterface = (message: EmbeddingRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Embedding(message, metadata, options, callback); + }; + Reranking: GrpcUnaryServiceInterface = (message: RerankingRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Reranking(message, metadata, options, callback); + }; + Chat: GrpcUnaryServiceInterface = (message: ChatRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Chat(message, metadata, options, callback); + }; + StreamChat: GrpcStreamServiceInterface = (message: ChatRequest, metadata?: grpc_1.Metadata | grpc_1.CallOptions, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream => { + return super.StreamChat(message, metadata, options); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } + export abstract class UnimplementedHuggingfaceServiceService { + static definition = { + Chat: { + path: "/integration_api.HuggingfaceService/Chat", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.HuggingfaceService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Chat(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class HuggingfaceServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedHuggingfaceServiceService.definition, "HuggingfaceService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Chat: GrpcUnaryServiceInterface = (message: ChatRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Chat(message, metadata, options, callback); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } + export abstract class UnimplementedMistralServiceService { + static definition = { + Chat: { + path: "/integration_api.MistralService/Chat", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + StreamChat: { + path: "/integration_api.MistralService/StreamChat", + requestStream: false, + responseStream: true, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.MistralService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Chat(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract StreamChat(call: grpc_1.ServerWritableStream): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MistralServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedMistralServiceService.definition, "MistralService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Chat: GrpcUnaryServiceInterface = (message: ChatRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Chat(message, metadata, options, callback); + }; + StreamChat: GrpcStreamServiceInterface = (message: ChatRequest, metadata?: grpc_1.Metadata | grpc_1.CallOptions, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream => { + return super.StreamChat(message, metadata, options); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } + export abstract class UnimplementedStabilityAiServiceService { + static definition = { + VerifyCredential: { + path: "/integration_api.StabilityAiService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class StabilityAiServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedStabilityAiServiceService.definition, "StabilityAiService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } + export abstract class UnimplementedTogetherAiServiceService { + static definition = { + Chat: { + path: "/integration_api.TogetherAiService/Chat", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChatRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChatRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ChatResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ChatResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.TogetherAiService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Chat(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class TogetherAiServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedTogetherAiServiceService.definition, "TogetherAiService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Chat: GrpcUnaryServiceInterface = (message: ChatRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Chat(message, metadata, options, callback); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } + export abstract class UnimplementedDeepInfraServiceService { + static definition = { + VerifyCredential: { + path: "/integration_api.DeepInfraService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class DeepInfraServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedDeepInfraServiceService.definition, "DeepInfraService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } + export abstract class UnimplementedVoyageAiServiceService { + static definition = { + Embedding: { + path: "/integration_api.VoyageAiService/Embedding", + requestStream: false, + responseStream: false, + requestSerialize: (message: EmbeddingRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => EmbeddingRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: EmbeddingResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => EmbeddingResponse.deserialize(new Uint8Array(bytes)) + }, + Reranking: { + path: "/integration_api.VoyageAiService/Reranking", + requestStream: false, + responseStream: false, + requestSerialize: (message: RerankingRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RerankingRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: RerankingResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => RerankingResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyCredential: { + path: "/integration_api.VoyageAiService/VerifyCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Embedding(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Reranking(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VerifyCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class VoyageAiServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedVoyageAiServiceService.definition, "VoyageAiService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Embedding: GrpcUnaryServiceInterface = (message: EmbeddingRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Embedding(message, metadata, options, callback); + }; + Reranking: GrpcUnaryServiceInterface = (message: RerankingRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Reranking(message, metadata, options, callback); + }; + VerifyCredential: GrpcUnaryServiceInterface = (message: VerifyCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyCredential(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/integration-api_grpc_pb.d.ts b/src/clients/protos/integration-api_grpc_pb.d.ts deleted file mode 100644 index f4cea3f..0000000 --- a/src/clients/protos/integration-api_grpc_pb.d.ts +++ /dev/null @@ -1,356 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: integration_api -// file: integration-api.proto - -import * as integration_api_pb from "./integration-api_pb"; -import * as grpc from "grpc"; - -interface IBedrockServiceService extends grpc.ServiceDefinition { - embedding: grpc.MethodDefinition; - chat: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; -} - -export const BedrockServiceService: IBedrockServiceService; - -export interface IBedrockServiceServer extends grpc.UntypedServiceImplementation { - embedding: grpc.handleUnaryCall; - chat: grpc.handleUnaryCall; - verifyCredential: grpc.handleUnaryCall; -} - -export class BedrockServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - embedding(argument: integration_api_pb.EmbeddingRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IOpenAiServiceService extends grpc.ServiceDefinition { - embedding: grpc.MethodDefinition; - chat: grpc.MethodDefinition; - streamChat: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; - getModeration: grpc.MethodDefinition; -} - -export const OpenAiServiceService: IOpenAiServiceService; - -export interface IOpenAiServiceServer extends grpc.UntypedServiceImplementation { - embedding: grpc.handleUnaryCall; - chat: grpc.handleUnaryCall; - streamChat: grpc.handleServerStreamingCall; - verifyCredential: grpc.handleUnaryCall; - getModeration: grpc.handleUnaryCall; -} - -export class OpenAiServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - embedding(argument: integration_api_pb.EmbeddingRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - streamChat(argument: integration_api_pb.ChatRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - streamChat(argument: integration_api_pb.ChatRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getModeration(argument: integration_api_pb.GetModerationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getModeration(argument: integration_api_pb.GetModerationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getModeration(argument: integration_api_pb.GetModerationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IAzureServiceService extends grpc.ServiceDefinition { - embedding: grpc.MethodDefinition; - chat: grpc.MethodDefinition; - streamChat: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; - getModeration: grpc.MethodDefinition; -} - -export const AzureServiceService: IAzureServiceService; - -export interface IAzureServiceServer extends grpc.UntypedServiceImplementation { - embedding: grpc.handleUnaryCall; - chat: grpc.handleUnaryCall; - streamChat: grpc.handleServerStreamingCall; - verifyCredential: grpc.handleUnaryCall; - getModeration: grpc.handleUnaryCall; -} - -export class AzureServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - embedding(argument: integration_api_pb.EmbeddingRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - streamChat(argument: integration_api_pb.ChatRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - streamChat(argument: integration_api_pb.ChatRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getModeration(argument: integration_api_pb.GetModerationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getModeration(argument: integration_api_pb.GetModerationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getModeration(argument: integration_api_pb.GetModerationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IGoogleServiceService extends grpc.ServiceDefinition { - embedding: grpc.MethodDefinition; - chat: grpc.MethodDefinition; - streamChat: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; -} - -export const GoogleServiceService: IGoogleServiceService; - -export interface IGoogleServiceServer extends grpc.UntypedServiceImplementation { - embedding: grpc.handleUnaryCall; - chat: grpc.handleUnaryCall; - streamChat: grpc.handleServerStreamingCall; - verifyCredential: grpc.handleUnaryCall; -} - -export class GoogleServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - embedding(argument: integration_api_pb.EmbeddingRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - streamChat(argument: integration_api_pb.ChatRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - streamChat(argument: integration_api_pb.ChatRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IReplicateServiceService extends grpc.ServiceDefinition { - chat: grpc.MethodDefinition; - streamChat: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; -} - -export const ReplicateServiceService: IReplicateServiceService; - -export interface IReplicateServiceServer extends grpc.UntypedServiceImplementation { - chat: grpc.handleUnaryCall; - streamChat: grpc.handleServerStreamingCall; - verifyCredential: grpc.handleUnaryCall; -} - -export class ReplicateServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - chat(argument: integration_api_pb.ChatRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - streamChat(argument: integration_api_pb.ChatRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - streamChat(argument: integration_api_pb.ChatRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IAnthropicServiceService extends grpc.ServiceDefinition { - chat: grpc.MethodDefinition; - streamChat: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; -} - -export const AnthropicServiceService: IAnthropicServiceService; - -export interface IAnthropicServiceServer extends grpc.UntypedServiceImplementation { - chat: grpc.handleUnaryCall; - streamChat: grpc.handleServerStreamingCall; - verifyCredential: grpc.handleUnaryCall; -} - -export class AnthropicServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - chat(argument: integration_api_pb.ChatRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - streamChat(argument: integration_api_pb.ChatRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - streamChat(argument: integration_api_pb.ChatRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface ICohereServiceService extends grpc.ServiceDefinition { - embedding: grpc.MethodDefinition; - reranking: grpc.MethodDefinition; - chat: grpc.MethodDefinition; - streamChat: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; -} - -export const CohereServiceService: ICohereServiceService; - -export interface ICohereServiceServer extends grpc.UntypedServiceImplementation { - embedding: grpc.handleUnaryCall; - reranking: grpc.handleUnaryCall; - chat: grpc.handleUnaryCall; - streamChat: grpc.handleServerStreamingCall; - verifyCredential: grpc.handleUnaryCall; -} - -export class CohereServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - embedding(argument: integration_api_pb.EmbeddingRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - reranking(argument: integration_api_pb.RerankingRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - reranking(argument: integration_api_pb.RerankingRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - reranking(argument: integration_api_pb.RerankingRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - streamChat(argument: integration_api_pb.ChatRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - streamChat(argument: integration_api_pb.ChatRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IHuggingfaceServiceService extends grpc.ServiceDefinition { - chat: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; -} - -export const HuggingfaceServiceService: IHuggingfaceServiceService; - -export interface IHuggingfaceServiceServer extends grpc.UntypedServiceImplementation { - chat: grpc.handleUnaryCall; - verifyCredential: grpc.handleUnaryCall; -} - -export class HuggingfaceServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - chat(argument: integration_api_pb.ChatRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IMistralServiceService extends grpc.ServiceDefinition { - chat: grpc.MethodDefinition; - streamChat: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; -} - -export const MistralServiceService: IMistralServiceService; - -export interface IMistralServiceServer extends grpc.UntypedServiceImplementation { - chat: grpc.handleUnaryCall; - streamChat: grpc.handleServerStreamingCall; - verifyCredential: grpc.handleUnaryCall; -} - -export class MistralServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - chat(argument: integration_api_pb.ChatRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - streamChat(argument: integration_api_pb.ChatRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - streamChat(argument: integration_api_pb.ChatRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IStabilityAiServiceService extends grpc.ServiceDefinition { - verifyCredential: grpc.MethodDefinition; -} - -export const StabilityAiServiceService: IStabilityAiServiceService; - -export interface IStabilityAiServiceServer extends grpc.UntypedServiceImplementation { - verifyCredential: grpc.handleUnaryCall; -} - -export class StabilityAiServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface ITogetherAiServiceService extends grpc.ServiceDefinition { - chat: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; -} - -export const TogetherAiServiceService: ITogetherAiServiceService; - -export interface ITogetherAiServiceServer extends grpc.UntypedServiceImplementation { - chat: grpc.handleUnaryCall; - verifyCredential: grpc.handleUnaryCall; -} - -export class TogetherAiServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - chat(argument: integration_api_pb.ChatRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - chat(argument: integration_api_pb.ChatRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IDeepInfraServiceService extends grpc.ServiceDefinition { - verifyCredential: grpc.MethodDefinition; -} - -export const DeepInfraServiceService: IDeepInfraServiceService; - -export interface IDeepInfraServiceServer extends grpc.UntypedServiceImplementation { - verifyCredential: grpc.handleUnaryCall; -} - -export class DeepInfraServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IVoyageAiServiceService extends grpc.ServiceDefinition { - embedding: grpc.MethodDefinition; - reranking: grpc.MethodDefinition; - verifyCredential: grpc.MethodDefinition; -} - -export const VoyageAiServiceService: IVoyageAiServiceService; - -export interface IVoyageAiServiceServer extends grpc.UntypedServiceImplementation { - embedding: grpc.handleUnaryCall; - reranking: grpc.handleUnaryCall; - verifyCredential: grpc.handleUnaryCall; -} - -export class VoyageAiServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - embedding(argument: integration_api_pb.EmbeddingRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - embedding(argument: integration_api_pb.EmbeddingRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - reranking(argument: integration_api_pb.RerankingRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - reranking(argument: integration_api_pb.RerankingRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - reranking(argument: integration_api_pb.RerankingRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyCredential(argument: integration_api_pb.VerifyCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/integration-api_pb.d.ts b/src/clients/protos/integration-api_pb.d.ts deleted file mode 100644 index d55f1eb..0000000 --- a/src/clients/protos/integration-api_pb.d.ts +++ /dev/null @@ -1,635 +0,0 @@ -// package: integration_api -// file: integration-api.proto - -import * as jspb from "google-protobuf"; -import * as common_pb from "./common_pb"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; -import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; - -export class Credential extends jspb.Message { - getId(): string; - setId(value: string): void; - - hasValue(): boolean; - clearValue(): void; - getValue(): google_protobuf_struct_pb.Struct | undefined; - setValue(value?: google_protobuf_struct_pb.Struct): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Credential.AsObject; - static toObject(includeInstance: boolean, msg: Credential): Credential.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Credential, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Credential; - static deserializeBinaryFromReader(message: Credential, reader: jspb.BinaryReader): Credential; -} - -export namespace Credential { - export type AsObject = { - id: string, - value?: google_protobuf_struct_pb.Struct.AsObject, - } -} - -export class ToolDefinition extends jspb.Message { - getType(): string; - setType(value: string): void; - - hasFunctiondefinition(): boolean; - clearFunctiondefinition(): void; - getFunctiondefinition(): FunctionDefinition | undefined; - setFunctiondefinition(value?: FunctionDefinition): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ToolDefinition.AsObject; - static toObject(includeInstance: boolean, msg: ToolDefinition): ToolDefinition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ToolDefinition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ToolDefinition; - static deserializeBinaryFromReader(message: ToolDefinition, reader: jspb.BinaryReader): ToolDefinition; -} - -export namespace ToolDefinition { - export type AsObject = { - type: string, - functiondefinition?: FunctionDefinition.AsObject, - } -} - -export class FunctionDefinition extends jspb.Message { - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - hasParameters(): boolean; - clearParameters(): void; - getParameters(): FunctionParameter | undefined; - setParameters(value?: FunctionParameter): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FunctionDefinition.AsObject; - static toObject(includeInstance: boolean, msg: FunctionDefinition): FunctionDefinition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FunctionDefinition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FunctionDefinition; - static deserializeBinaryFromReader(message: FunctionDefinition, reader: jspb.BinaryReader): FunctionDefinition; -} - -export namespace FunctionDefinition { - export type AsObject = { - name: string, - description: string, - parameters?: FunctionParameter.AsObject, - } -} - -export class FunctionParameter extends jspb.Message { - clearRequiredList(): void; - getRequiredList(): Array; - setRequiredList(value: Array): void; - addRequired(value: string, index?: number): string; - - getType(): string; - setType(value: string): void; - - getPropertiesMap(): jspb.Map; - clearPropertiesMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FunctionParameter.AsObject; - static toObject(includeInstance: boolean, msg: FunctionParameter): FunctionParameter.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FunctionParameter, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FunctionParameter; - static deserializeBinaryFromReader(message: FunctionParameter, reader: jspb.BinaryReader): FunctionParameter; -} - -export namespace FunctionParameter { - export type AsObject = { - requiredList: Array, - type: string, - propertiesMap: Array<[string, FunctionParameterProperty.AsObject]>, - } -} - -export class FunctionParameterProperty extends jspb.Message { - getType(): string; - setType(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - clearEnumList(): void; - getEnumList(): Array; - setEnumList(value: Array): void; - addEnum(value: string, index?: number): string; - - hasItems(): boolean; - clearItems(): void; - getItems(): FunctionParameter | undefined; - setItems(value?: FunctionParameter): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FunctionParameterProperty.AsObject; - static toObject(includeInstance: boolean, msg: FunctionParameterProperty): FunctionParameterProperty.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FunctionParameterProperty, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FunctionParameterProperty; - static deserializeBinaryFromReader(message: FunctionParameterProperty, reader: jspb.BinaryReader): FunctionParameterProperty; -} - -export namespace FunctionParameterProperty { - export type AsObject = { - type: string, - description: string, - enumList: Array, - items?: FunctionParameter.AsObject, - } -} - -export class Embedding extends jspb.Message { - getIndex(): number; - setIndex(value: number): void; - - clearEmbeddingList(): void; - getEmbeddingList(): Array; - setEmbeddingList(value: Array): void; - addEmbedding(value: number, index?: number): number; - - getBase64(): string; - setBase64(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Embedding.AsObject; - static toObject(includeInstance: boolean, msg: Embedding): Embedding.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Embedding, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Embedding; - static deserializeBinaryFromReader(message: Embedding, reader: jspb.BinaryReader): Embedding; -} - -export namespace Embedding { - export type AsObject = { - index: number, - embeddingList: Array, - base64: string, - } -} - -export class EmbeddingRequest extends jspb.Message { - hasCredential(): boolean; - clearCredential(): void; - getCredential(): Credential | undefined; - setCredential(value?: Credential): void; - - getContentMap(): jspb.Map; - clearContentMap(): void; - getModelparametersMap(): jspb.Map; - clearModelparametersMap(): void; - getAdditionaldataMap(): jspb.Map; - clearAdditionaldataMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EmbeddingRequest.AsObject; - static toObject(includeInstance: boolean, msg: EmbeddingRequest): EmbeddingRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EmbeddingRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EmbeddingRequest; - static deserializeBinaryFromReader(message: EmbeddingRequest, reader: jspb.BinaryReader): EmbeddingRequest; -} - -export namespace EmbeddingRequest { - export type AsObject = { - credential?: Credential.AsObject, - contentMap: Array<[number, string]>, - modelparametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - additionaldataMap: Array<[string, string]>, - } -} - -export class EmbeddingResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getRequestid(): number; - setRequestid(value: number): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: Embedding, index?: number): Embedding; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: common_pb.Metric, index?: number): common_pb.Metric; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EmbeddingResponse.AsObject; - static toObject(includeInstance: boolean, msg: EmbeddingResponse): EmbeddingResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EmbeddingResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EmbeddingResponse; - static deserializeBinaryFromReader(message: EmbeddingResponse, reader: jspb.BinaryReader): EmbeddingResponse; -} - -export namespace EmbeddingResponse { - export type AsObject = { - code: number, - success: boolean, - requestid: number, - dataList: Array, - error?: common_pb.Error.AsObject, - metricsList: Array, - } -} - -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; - - getRelevancescore(): number; - setRelevancescore(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Reranking.AsObject; - static toObject(includeInstance: boolean, msg: Reranking): Reranking.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Reranking, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Reranking; - static deserializeBinaryFromReader(message: Reranking, reader: jspb.BinaryReader): Reranking; -} - -export namespace Reranking { - export type AsObject = { - index: number, - content?: common_pb.Content.AsObject, - relevancescore: number, - } -} - -export class RerankingRequest extends jspb.Message { - hasCredential(): boolean; - clearCredential(): void; - getCredential(): Credential | undefined; - setCredential(value?: Credential): void; - - getQuery(): string; - setQuery(value: string): void; - - getContentMap(): jspb.Map; - clearContentMap(): void; - getModelparametersMap(): jspb.Map; - clearModelparametersMap(): void; - getAdditionaldataMap(): jspb.Map; - clearAdditionaldataMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RerankingRequest.AsObject; - static toObject(includeInstance: boolean, msg: RerankingRequest): RerankingRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RerankingRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RerankingRequest; - static deserializeBinaryFromReader(message: RerankingRequest, reader: jspb.BinaryReader): RerankingRequest; -} - -export namespace RerankingRequest { - export type AsObject = { - credential?: Credential.AsObject, - query: string, - contentMap: Array<[number, common_pb.Content.AsObject]>, - modelparametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - additionaldataMap: Array<[string, string]>, - } -} - -export class RerankingResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getRequestid(): number; - setRequestid(value: number): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: Reranking, index?: number): Reranking; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: common_pb.Metric, index?: number): common_pb.Metric; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RerankingResponse.AsObject; - static toObject(includeInstance: boolean, msg: RerankingResponse): RerankingResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RerankingResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RerankingResponse; - static deserializeBinaryFromReader(message: RerankingResponse, reader: jspb.BinaryReader): RerankingResponse; -} - -export namespace RerankingResponse { - export type AsObject = { - code: number, - success: boolean, - requestid: number, - dataList: Array, - error?: common_pb.Error.AsObject, - metricsList: Array, - } -} - -export class ChatResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getRequestid(): number; - setRequestid(value: number): void; - - hasData(): boolean; - clearData(): void; - getData(): common_pb.Message | undefined; - setData(value?: common_pb.Message): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: common_pb.Metric, index?: number): common_pb.Metric; - - getFinishreason(): string; - setFinishreason(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChatResponse.AsObject; - static toObject(includeInstance: boolean, msg: ChatResponse): ChatResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChatResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChatResponse; - static deserializeBinaryFromReader(message: ChatResponse, reader: jspb.BinaryReader): ChatResponse; -} - -export namespace ChatResponse { - export type AsObject = { - code: number, - success: boolean, - requestid: number, - data?: common_pb.Message.AsObject, - error?: common_pb.Error.AsObject, - metricsList: Array, - finishreason: string, - } -} - -export class ChatRequest extends jspb.Message { - hasCredential(): boolean; - clearCredential(): void; - getCredential(): Credential | undefined; - setCredential(value?: Credential): void; - - clearConversationsList(): void; - getConversationsList(): Array; - setConversationsList(value: Array): void; - addConversations(value?: common_pb.Message, index?: number): common_pb.Message; - - getAdditionaldataMap(): jspb.Map; - clearAdditionaldataMap(): void; - getModelparametersMap(): jspb.Map; - clearModelparametersMap(): void; - clearTooldefinitionsList(): void; - getTooldefinitionsList(): Array; - setTooldefinitionsList(value: Array): void; - addTooldefinitions(value?: ToolDefinition, index?: number): ToolDefinition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChatRequest.AsObject; - static toObject(includeInstance: boolean, msg: ChatRequest): ChatRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChatRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChatRequest; - static deserializeBinaryFromReader(message: ChatRequest, reader: jspb.BinaryReader): ChatRequest; -} - -export namespace ChatRequest { - export type AsObject = { - credential?: Credential.AsObject, - conversationsList: Array, - additionaldataMap: Array<[string, string]>, - modelparametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - tooldefinitionsList: Array, - } -} - -export class VerifyCredentialRequest extends jspb.Message { - hasCredential(): boolean; - clearCredential(): void; - getCredential(): Credential | undefined; - setCredential(value?: Credential): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyCredentialRequest.AsObject; - static toObject(includeInstance: boolean, msg: VerifyCredentialRequest): VerifyCredentialRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyCredentialRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyCredentialRequest; - static deserializeBinaryFromReader(message: VerifyCredentialRequest, reader: jspb.BinaryReader): VerifyCredentialRequest; -} - -export namespace VerifyCredentialRequest { - export type AsObject = { - credential?: Credential.AsObject, - } -} - -export class VerifyCredentialResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getRequestid(): number; - setRequestid(value: number): void; - - hasResponse(): boolean; - clearResponse(): void; - getResponse(): string; - setResponse(value: string): void; - - getErrormessage(): string; - setErrormessage(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyCredentialResponse.AsObject; - static toObject(includeInstance: boolean, msg: VerifyCredentialResponse): VerifyCredentialResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyCredentialResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyCredentialResponse; - static deserializeBinaryFromReader(message: VerifyCredentialResponse, reader: jspb.BinaryReader): VerifyCredentialResponse; -} - -export namespace VerifyCredentialResponse { - export type AsObject = { - code: number, - success: boolean, - requestid: number, - response: string, - errormessage: string, - } -} - -export class Moderation extends jspb.Message { - getName(): string; - setName(value: string): void; - - getValue(): string; - setValue(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Moderation.AsObject; - static toObject(includeInstance: boolean, msg: Moderation): Moderation.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Moderation, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Moderation; - static deserializeBinaryFromReader(message: Moderation, reader: jspb.BinaryReader): Moderation; -} - -export namespace Moderation { - export type AsObject = { - name: string, - value: string, - } -} - -export class GetModerationRequest extends jspb.Message { - hasCredential(): boolean; - clearCredential(): void; - getCredential(): Credential | undefined; - setCredential(value?: Credential): void; - - getModel(): string; - setModel(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - hasContent(): boolean; - clearContent(): void; - getContent(): common_pb.Content | undefined; - setContent(value?: common_pb.Content): void; - - getAdditionaldataMap(): jspb.Map; - clearAdditionaldataMap(): void; - getModelparametersMap(): jspb.Map; - clearModelparametersMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetModerationRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetModerationRequest): GetModerationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetModerationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetModerationRequest; - static deserializeBinaryFromReader(message: GetModerationRequest, reader: jspb.BinaryReader): GetModerationRequest; -} - -export namespace GetModerationRequest { - export type AsObject = { - credential?: Credential.AsObject, - model: string, - version: string, - content?: common_pb.Content.AsObject, - additionaldataMap: Array<[string, string]>, - modelparametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - } -} - -export class GetModerationResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getRequestid(): number; - setRequestid(value: number): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: Moderation, index?: number): Moderation; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: common_pb.Metric, index?: number): common_pb.Metric; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetModerationResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetModerationResponse): GetModerationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetModerationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetModerationResponse; - static deserializeBinaryFromReader(message: GetModerationResponse, reader: jspb.BinaryReader): GetModerationResponse; -} - -export namespace GetModerationResponse { - export type AsObject = { - code: number, - success: boolean, - requestid: number, - dataList: Array, - error?: common_pb.Error.AsObject, - metricsList: Array, - } -} - diff --git a/src/clients/protos/invoker-api.ts b/src/clients/protos/invoker-api.ts new file mode 100644 index 0000000..e33615c --- /dev/null +++ b/src/clients/protos/invoker-api.ts @@ -0,0 +1,1038 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: invoker-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/struct"; +import * as dependency_2 from "./google/protobuf/any"; +import * as dependency_3 from "./common"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace endpoint_api { + export class EndpointDefinition extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpointId?: string; + version?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpointId" in data && data.endpointId != undefined) { + this.endpointId = data.endpointId; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + } + } + get endpointId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set endpointId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + endpointId?: string; + version?: string; + }): EndpointDefinition { + const message = new EndpointDefinition({}); + if (data.endpointId != null) { + message.endpointId = data.endpointId; + } + if (data.version != null) { + message.version = data.version; + } + return message; + } + toObject() { + const data: { + endpointId?: string; + version?: string; + } = {}; + if (this.endpointId != null) { + data.endpointId = this.endpointId; + } + if (this.version != null) { + data.version = this.version; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.endpointId != "0") + writer.writeUint64String(1, this.endpointId); + if (this.version.length) + writer.writeString(2, this.version); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EndpointDefinition { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EndpointDefinition(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.endpointId = reader.readUint64String(); + break; + case 2: + message.version = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): EndpointDefinition { + return EndpointDefinition.deserialize(bytes); + } + } + export class InvokeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + endpoint?: EndpointDefinition; + args?: Map; + metadata?: Map; + options?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("endpoint" in data && data.endpoint != undefined) { + this.endpoint = data.endpoint; + } + if ("args" in data && data.args != undefined) { + this.args = data.args; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + } + if (!this.args) + this.args = new Map(); + if (!this.metadata) + this.metadata = new Map(); + if (!this.options) + this.options = new Map(); + } + get endpoint() { + return pb_1.Message.getWrapperField(this, EndpointDefinition, 1) as EndpointDefinition; + } + set endpoint(value: EndpointDefinition) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_endpoint() { + return pb_1.Message.getField(this, 1) != null; + } + get args() { + return pb_1.Message.getField(this, 5) as any as Map; + } + set args(value: Map) { + pb_1.Message.setField(this, 5, value as any); + } + get metadata() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set metadata(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + get options() { + return pb_1.Message.getField(this, 7) as any as Map; + } + set options(value: Map) { + pb_1.Message.setField(this, 7, value as any); + } + static fromObject(data: { + endpoint?: ReturnType; + args?: { + [key: string]: ReturnType; + }; + metadata?: { + [key: string]: ReturnType; + }; + options?: { + [key: string]: ReturnType; + }; + }): InvokeRequest { + const message = new InvokeRequest({}); + if (data.endpoint != null) { + message.endpoint = EndpointDefinition.fromObject(data.endpoint); + } + if (typeof data.args == "object") { + message.args = new Map(Object.entries(data.args).map(([key, value]) => [key, dependency_2.google.protobuf.Any.fromObject(value)])); + } + if (typeof data.metadata == "object") { + message.metadata = new Map(Object.entries(data.metadata).map(([key, value]) => [key, dependency_2.google.protobuf.Any.fromObject(value)])); + } + if (typeof data.options == "object") { + message.options = new Map(Object.entries(data.options).map(([key, value]) => [key, dependency_2.google.protobuf.Any.fromObject(value)])); + } + return message; + } + toObject() { + const data: { + endpoint?: ReturnType; + args?: { + [key: string]: ReturnType; + }; + metadata?: { + [key: string]: ReturnType; + }; + options?: { + [key: string]: ReturnType; + }; + } = {}; + if (this.endpoint != null) { + data.endpoint = this.endpoint.toObject(); + } + if (this.args != null) { + data.args = (Object.fromEntries)((Array.from)(this.args).map(([key, value]) => [key, value.toObject()])); + } + if (this.metadata != null) { + data.metadata = (Object.fromEntries)((Array.from)(this.metadata).map(([key, value]) => [key, value.toObject()])); + } + if (this.options != null) { + data.options = (Object.fromEntries)((Array.from)(this.options).map(([key, value]) => [key, value.toObject()])); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_endpoint) + writer.writeMessage(1, this.endpoint, () => this.endpoint.serialize(writer)); + for (const [key, value] of this.args) { + writer.writeMessage(5, this.args, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + for (const [key, value] of this.metadata) { + writer.writeMessage(6, this.metadata, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + for (const [key, value] of this.options) { + writer.writeMessage(7, this.options, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InvokeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InvokeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.endpoint, () => message.endpoint = EndpointDefinition.deserialize(reader)); + break; + case 5: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.args as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_2.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_2.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + case 7: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.options as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_2.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InvokeRequest { + return InvokeRequest.deserialize(bytes); + } + } + export class InvokeResponse extends pb_1.Message { + #one_of_decls: number[][] = [[4]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + data?: dependency_3.Content[]; + requestId?: number; + timeTaken?: number; + metrics?: dependency_3.Metric[]; + meta?: dependency_1.google.protobuf.Struct; + } & (({ + error?: dependency_3.Error; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 7], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("requestId" in data && data.requestId != undefined) { + this.requestId = data.requestId; + } + if ("timeTaken" in data && data.timeTaken != undefined) { + this.timeTaken = data.timeTaken; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + if ("meta" in data && data.meta != undefined) { + this.meta = data.meta; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Content, 3) as dependency_3.Content[]; + } + set data(value: dependency_3.Content[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get requestId() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set requestId(value: number) { + pb_1.Message.setField(this, 5, value); + } + get timeTaken() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set timeTaken(value: number) { + pb_1.Message.setField(this, 6, value); + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Metric, 7) as dependency_3.Metric[]; + } + set metrics(value: dependency_3.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get meta() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Struct, 8) as dependency_1.google.protobuf.Struct; + } + set meta(value: dependency_1.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 8, value); + } + get has_meta() { + return pb_1.Message.getField(this, 8) != null; + } + get _error() { + const cases: { + [index: number]: "none" | "error"; + } = { + 0: "none", + 4: "error" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + requestId?: number; + timeTaken?: number; + metrics?: ReturnType[]; + meta?: ReturnType; + }): InvokeResponse { + const message = new InvokeResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_3.Content.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + if (data.requestId != null) { + message.requestId = data.requestId; + } + if (data.timeTaken != null) { + message.timeTaken = data.timeTaken; + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => dependency_3.Metric.fromObject(item)); + } + if (data.meta != null) { + message.meta = dependency_1.google.protobuf.Struct.fromObject(data.meta); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + requestId?: number; + timeTaken?: number; + metrics?: ReturnType[]; + meta?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_3.Content) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.requestId != null) { + data.requestId = this.requestId; + } + if (this.timeTaken != null) { + data.timeTaken = this.timeTaken; + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: dependency_3.Metric) => item.toObject()); + } + if (this.meta != null) { + data.meta = this.meta.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_3.Content) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.requestId != 0) + writer.writeUint64(5, this.requestId); + if (this.timeTaken != 0) + writer.writeUint64(6, this.timeTaken); + if (this.metrics.length) + writer.writeRepeatedMessage(7, this.metrics, (item: dependency_3.Metric) => item.serialize(writer)); + if (this.has_meta) + writer.writeMessage(8, this.meta, () => this.meta.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InvokeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InvokeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_3.Content.deserialize(reader), dependency_3.Content)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + case 5: + message.requestId = reader.readUint64(); + break; + case 6: + message.timeTaken = reader.readUint64(); + break; + case 7: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 7, dependency_3.Metric.deserialize(reader), dependency_3.Metric)); + break; + case 8: + reader.readMessage(message.meta, () => message.meta = dependency_1.google.protobuf.Struct.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InvokeResponse { + return InvokeResponse.deserialize(bytes); + } + } + export class UpdateRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + requestId?: string; + metadata?: dependency_1.google.protobuf.Struct; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("requestId" in data && data.requestId != undefined) { + this.requestId = data.requestId; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + } + } + get requestId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set requestId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get metadata() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Struct, 2) as dependency_1.google.protobuf.Struct; + } + set metadata(value: dependency_1.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_metadata() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + requestId?: string; + metadata?: ReturnType; + }): UpdateRequest { + const message = new UpdateRequest({}); + if (data.requestId != null) { + message.requestId = data.requestId; + } + if (data.metadata != null) { + message.metadata = dependency_1.google.protobuf.Struct.fromObject(data.metadata); + } + return message; + } + toObject() { + const data: { + requestId?: string; + metadata?: ReturnType; + } = {}; + if (this.requestId != null) { + data.requestId = this.requestId; + } + if (this.metadata != null) { + data.metadata = this.metadata.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.requestId != "0") + writer.writeUint64String(1, this.requestId); + if (this.has_metadata) + writer.writeMessage(2, this.metadata, () => this.metadata.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.requestId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.metadata, () => message.metadata = dependency_1.google.protobuf.Struct.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateRequest { + return UpdateRequest.deserialize(bytes); + } + } + export class UpdateResponse extends pb_1.Message { + #one_of_decls: number[][] = [[3]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + } & (({ + error?: dependency_3.Error; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 3) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_error() { + return pb_1.Message.getField(this, 3) != null; + } + get _error() { + const cases: { + [index: number]: "none" | "error"; + } = { + 0: "none", + 3: "error" + }; + return cases[pb_1.Message.computeOneofCase(this, [3])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + error?: ReturnType; + }): UpdateResponse { + const message = new UpdateResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_error) + writer.writeMessage(3, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateResponse { + return UpdateResponse.deserialize(bytes); + } + } + export class ProbeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + requestId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("requestId" in data && data.requestId != undefined) { + this.requestId = data.requestId; + } + } + } + get requestId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set requestId(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + requestId?: string; + }): ProbeRequest { + const message = new ProbeRequest({}); + if (data.requestId != null) { + message.requestId = data.requestId; + } + return message; + } + toObject() { + const data: { + requestId?: string; + } = {}; + if (this.requestId != null) { + data.requestId = this.requestId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.requestId != "0") + writer.writeUint64String(1, this.requestId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProbeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProbeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.requestId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProbeRequest { + return ProbeRequest.deserialize(bytes); + } + } + export class ProbeResponse extends pb_1.Message { + #one_of_decls: number[][] = [[4]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + data?: dependency_1.google.protobuf.Struct; + } & (({ + error?: dependency_3.Error; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Struct, 3) as dependency_1.google.protobuf.Struct; + } + set data(value: dependency_1.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get _error() { + const cases: { + [index: number]: "none" | "error"; + } = { + 0: "none", + 4: "error" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): ProbeResponse { + const message = new ProbeResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = dependency_1.google.protobuf.Struct.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProbeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProbeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = dependency_1.google.protobuf.Struct.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProbeResponse { + return ProbeResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedDeploymentService { + static definition = { + Invoke: { + path: "/endpoint_api.Deployment/Invoke", + requestStream: false, + responseStream: false, + requestSerialize: (message: InvokeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => InvokeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: InvokeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => InvokeResponse.deserialize(new Uint8Array(bytes)) + }, + Update: { + path: "/endpoint_api.Deployment/Update", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: UpdateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => UpdateResponse.deserialize(new Uint8Array(bytes)) + }, + Probe: { + path: "/endpoint_api.Deployment/Probe", + requestStream: false, + responseStream: false, + requestSerialize: (message: ProbeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ProbeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ProbeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ProbeResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Invoke(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Update(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Probe(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class DeploymentClient extends grpc_1.makeGenericClientConstructor(UnimplementedDeploymentService.definition, "Deployment", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Invoke: GrpcUnaryServiceInterface = (message: InvokeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Invoke(message, metadata, options, callback); + }; + Update: GrpcUnaryServiceInterface = (message: UpdateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Update(message, metadata, options, callback); + }; + Probe: GrpcUnaryServiceInterface = (message: ProbeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Probe(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/invoker-api_grpc_pb.d.ts b/src/clients/protos/invoker-api_grpc_pb.d.ts deleted file mode 100644 index 23e3f7d..0000000 --- a/src/clients/protos/invoker-api_grpc_pb.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: endpoint_api -// file: invoker-api.proto - -import * as invoker_api_pb from "./invoker-api_pb"; -import * as grpc from "grpc"; - -interface IDeploymentService extends grpc.ServiceDefinition { - invoke: grpc.MethodDefinition; - update: grpc.MethodDefinition; - probe: grpc.MethodDefinition; -} - -export const DeploymentService: IDeploymentService; - -export interface IDeploymentServer extends grpc.UntypedServiceImplementation { - invoke: grpc.handleUnaryCall; - update: grpc.handleUnaryCall; - probe: grpc.handleUnaryCall; -} - -export class DeploymentClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - invoke(argument: invoker_api_pb.InvokeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - invoke(argument: invoker_api_pb.InvokeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - invoke(argument: invoker_api_pb.InvokeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - update(argument: invoker_api_pb.UpdateRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - update(argument: invoker_api_pb.UpdateRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - update(argument: invoker_api_pb.UpdateRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - probe(argument: invoker_api_pb.ProbeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - probe(argument: invoker_api_pb.ProbeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - probe(argument: invoker_api_pb.ProbeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/invoker-api_pb.d.ts b/src/clients/protos/invoker-api_pb.d.ts deleted file mode 100644 index d2c7b2e..0000000 --- a/src/clients/protos/invoker-api_pb.d.ts +++ /dev/null @@ -1,231 +0,0 @@ -// package: endpoint_api -// file: invoker-api.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; -import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; -import * as common_pb from "./common_pb"; - -export class EndpointDefinition extends jspb.Message { - getEndpointid(): string; - setEndpointid(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EndpointDefinition.AsObject; - static toObject(includeInstance: boolean, msg: EndpointDefinition): EndpointDefinition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EndpointDefinition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EndpointDefinition; - static deserializeBinaryFromReader(message: EndpointDefinition, reader: jspb.BinaryReader): EndpointDefinition; -} - -export namespace EndpointDefinition { - export type AsObject = { - endpointid: string, - version: string, - } -} - -export class InvokeRequest extends jspb.Message { - hasEndpoint(): boolean; - clearEndpoint(): void; - getEndpoint(): EndpointDefinition | undefined; - setEndpoint(value?: EndpointDefinition): void; - - getArgsMap(): jspb.Map; - clearArgsMap(): void; - getMetadataMap(): jspb.Map; - clearMetadataMap(): void; - getOptionsMap(): jspb.Map; - clearOptionsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InvokeRequest.AsObject; - static toObject(includeInstance: boolean, msg: InvokeRequest): InvokeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InvokeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InvokeRequest; - static deserializeBinaryFromReader(message: InvokeRequest, reader: jspb.BinaryReader): InvokeRequest; -} - -export namespace InvokeRequest { - export type AsObject = { - endpoint?: EndpointDefinition.AsObject, - argsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - metadataMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - optionsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - } -} - -export class InvokeResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.Content, index?: number): common_pb.Content; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - getRequestid(): number; - setRequestid(value: number): void; - - getTimetaken(): number; - setTimetaken(value: number): void; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: common_pb.Metric, index?: number): common_pb.Metric; - - hasMeta(): boolean; - clearMeta(): void; - getMeta(): google_protobuf_struct_pb.Struct | undefined; - setMeta(value?: google_protobuf_struct_pb.Struct): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InvokeResponse.AsObject; - static toObject(includeInstance: boolean, msg: InvokeResponse): InvokeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InvokeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InvokeResponse; - static deserializeBinaryFromReader(message: InvokeResponse, reader: jspb.BinaryReader): InvokeResponse; -} - -export namespace InvokeResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - requestid: number, - timetaken: number, - metricsList: Array, - meta?: google_protobuf_struct_pb.Struct.AsObject, - } -} - -export class UpdateRequest extends jspb.Message { - getRequestid(): string; - setRequestid(value: string): void; - - hasMetadata(): boolean; - clearMetadata(): void; - getMetadata(): google_protobuf_struct_pb.Struct | undefined; - setMetadata(value?: google_protobuf_struct_pb.Struct): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateRequest): UpdateRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateRequest; - static deserializeBinaryFromReader(message: UpdateRequest, reader: jspb.BinaryReader): UpdateRequest; -} - -export namespace UpdateRequest { - export type AsObject = { - requestid: string, - metadata?: google_protobuf_struct_pb.Struct.AsObject, - } -} - -export class UpdateResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateResponse.AsObject; - static toObject(includeInstance: boolean, msg: UpdateResponse): UpdateResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateResponse; - static deserializeBinaryFromReader(message: UpdateResponse, reader: jspb.BinaryReader): UpdateResponse; -} - -export namespace UpdateResponse { - export type AsObject = { - code: number, - success: boolean, - error?: common_pb.Error.AsObject, - } -} - -export class ProbeRequest extends jspb.Message { - getRequestid(): string; - setRequestid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProbeRequest.AsObject; - static toObject(includeInstance: boolean, msg: ProbeRequest): ProbeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProbeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProbeRequest; - static deserializeBinaryFromReader(message: ProbeRequest, reader: jspb.BinaryReader): ProbeRequest; -} - -export namespace ProbeRequest { - export type AsObject = { - requestid: string, - } -} - -export class ProbeResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): google_protobuf_struct_pb.Struct | undefined; - setData(value?: google_protobuf_struct_pb.Struct): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProbeResponse.AsObject; - static toObject(includeInstance: boolean, msg: ProbeResponse): ProbeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProbeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProbeResponse; - static deserializeBinaryFromReader(message: ProbeResponse, reader: jspb.BinaryReader): ProbeResponse; -} - -export namespace ProbeResponse { - export type AsObject = { - code: number, - success: boolean, - data?: google_protobuf_struct_pb.Struct.AsObject, - error?: common_pb.Error.AsObject, - } -} - diff --git a/src/clients/protos/knowledge-api.ts b/src/clients/protos/knowledge-api.ts new file mode 100644 index 0000000..2e5dd66 --- /dev/null +++ b/src/clients/protos/knowledge-api.ts @@ -0,0 +1,4873 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: knowledge-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./common"; +import * as dependency_3 from "./google/protobuf/struct"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace knowledge_api { + export class CreateKnowledgeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + name?: string; + description?: string; + tags?: string[]; + visibility?: string; + embeddingModelProviderId?: string; + embeddingModelProviderName?: string; + knowledgeEmbeddingModelOptions?: dependency_2.Metadata[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 8], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("tags" in data && data.tags != undefined) { + this.tags = data.tags; + } + if ("visibility" in data && data.visibility != undefined) { + this.visibility = data.visibility; + } + if ("embeddingModelProviderId" in data && data.embeddingModelProviderId != undefined) { + this.embeddingModelProviderId = data.embeddingModelProviderId; + } + if ("embeddingModelProviderName" in data && data.embeddingModelProviderName != undefined) { + this.embeddingModelProviderName = data.embeddingModelProviderName; + } + if ("knowledgeEmbeddingModelOptions" in data && data.knowledgeEmbeddingModelOptions != undefined) { + this.knowledgeEmbeddingModelOptions = data.knowledgeEmbeddingModelOptions; + } + } + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 1, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 2, value); + } + get tags() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as string[]; + } + set tags(value: string[]) { + pb_1.Message.setField(this, 4, value); + } + get visibility() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set visibility(value: string) { + pb_1.Message.setField(this, 5, value); + } + get embeddingModelProviderId() { + return pb_1.Message.getFieldWithDefault(this, 6, "0") as string; + } + set embeddingModelProviderId(value: string) { + pb_1.Message.setField(this, 6, value); + } + get embeddingModelProviderName() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set embeddingModelProviderName(value: string) { + pb_1.Message.setField(this, 7, value); + } + get knowledgeEmbeddingModelOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Metadata, 8) as dependency_2.Metadata[]; + } + set knowledgeEmbeddingModelOptions(value: dependency_2.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 8, value); + } + static fromObject(data: { + name?: string; + description?: string; + tags?: string[]; + visibility?: string; + embeddingModelProviderId?: string; + embeddingModelProviderName?: string; + knowledgeEmbeddingModelOptions?: ReturnType[]; + }): CreateKnowledgeRequest { + const message = new CreateKnowledgeRequest({}); + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.tags != null) { + message.tags = data.tags; + } + if (data.visibility != null) { + message.visibility = data.visibility; + } + if (data.embeddingModelProviderId != null) { + message.embeddingModelProviderId = data.embeddingModelProviderId; + } + if (data.embeddingModelProviderName != null) { + message.embeddingModelProviderName = data.embeddingModelProviderName; + } + if (data.knowledgeEmbeddingModelOptions != null) { + message.knowledgeEmbeddingModelOptions = data.knowledgeEmbeddingModelOptions.map(item => dependency_2.Metadata.fromObject(item)); + } + return message; + } + toObject() { + const data: { + name?: string; + description?: string; + tags?: string[]; + visibility?: string; + embeddingModelProviderId?: string; + embeddingModelProviderName?: string; + knowledgeEmbeddingModelOptions?: ReturnType[]; + } = {}; + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.tags != null) { + data.tags = this.tags; + } + if (this.visibility != null) { + data.visibility = this.visibility; + } + if (this.embeddingModelProviderId != null) { + data.embeddingModelProviderId = this.embeddingModelProviderId; + } + if (this.embeddingModelProviderName != null) { + data.embeddingModelProviderName = this.embeddingModelProviderName; + } + if (this.knowledgeEmbeddingModelOptions != null) { + data.knowledgeEmbeddingModelOptions = this.knowledgeEmbeddingModelOptions.map((item: dependency_2.Metadata) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.name.length) + writer.writeString(1, this.name); + if (this.description.length) + writer.writeString(2, this.description); + if (this.tags.length) + writer.writeRepeatedString(4, this.tags); + if (this.visibility.length) + writer.writeString(5, this.visibility); + if (this.embeddingModelProviderId != "0") + writer.writeUint64String(6, this.embeddingModelProviderId); + if (this.embeddingModelProviderName.length) + writer.writeString(7, this.embeddingModelProviderName); + if (this.knowledgeEmbeddingModelOptions.length) + writer.writeRepeatedMessage(8, this.knowledgeEmbeddingModelOptions, (item: dependency_2.Metadata) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateKnowledgeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateKnowledgeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.name = reader.readString(); + break; + case 2: + message.description = reader.readString(); + break; + case 4: + pb_1.Message.addToRepeatedField(message, 4, reader.readString()); + break; + case 5: + message.visibility = reader.readString(); + break; + case 6: + message.embeddingModelProviderId = reader.readUint64String(); + break; + case 7: + message.embeddingModelProviderName = reader.readString(); + break; + case 8: + reader.readMessage(message.knowledgeEmbeddingModelOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 8, dependency_2.Metadata.deserialize(reader), dependency_2.Metadata)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateKnowledgeRequest { + return CreateKnowledgeRequest.deserialize(bytes); + } + } + export class CreateKnowledgeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.Knowledge; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_2.Knowledge, 3) as dependency_2.Knowledge; + } + set data(value: dependency_2.Knowledge) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): CreateKnowledgeResponse { + const message = new CreateKnowledgeResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = dependency_2.Knowledge.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateKnowledgeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateKnowledgeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = dependency_2.Knowledge.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateKnowledgeResponse { + return CreateKnowledgeResponse.deserialize(bytes); + } + } + export class GetAllKnowledgeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllKnowledgeRequest { + const message = new GetAllKnowledgeRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllKnowledgeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllKnowledgeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeRequest { + return GetAllKnowledgeRequest.deserialize(bytes); + } + } + export class GetAllKnowledgeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.Knowledge[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Knowledge, 3) as dependency_2.Knowledge[]; + } + set data(value: dependency_2.Knowledge[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllKnowledgeResponse { + const message = new GetAllKnowledgeResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_2.Knowledge.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_2.Knowledge) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_2.Knowledge) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllKnowledgeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllKnowledgeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.Knowledge.deserialize(reader), dependency_2.Knowledge)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeResponse { + return GetAllKnowledgeResponse.deserialize(bytes); + } + } + export class GetKnowledgeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + id?: string; + }): GetKnowledgeRequest { + const message = new GetKnowledgeRequest({}); + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + id?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetKnowledgeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetKnowledgeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetKnowledgeRequest { + return GetKnowledgeRequest.deserialize(bytes); + } + } + export class GetKnowledgeResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.Knowledge; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_2.Knowledge, 3) as dependency_2.Knowledge; + } + set data(value: dependency_2.Knowledge) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetKnowledgeResponse { + const message = new GetKnowledgeResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = dependency_2.Knowledge.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetKnowledgeResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetKnowledgeResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = dependency_2.Knowledge.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetKnowledgeResponse { + return GetKnowledgeResponse.deserialize(bytes); + } + } + export class CreateKnowledgeTagRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + knowledgeId?: string; + tags?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("tags" in data && data.tags != undefined) { + this.tags = data.tags; + } + } + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get tags() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set tags(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + knowledgeId?: string; + tags?: string[]; + }): CreateKnowledgeTagRequest { + const message = new CreateKnowledgeTagRequest({}); + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.tags != null) { + message.tags = data.tags; + } + return message; + } + toObject() { + const data: { + knowledgeId?: string; + tags?: string[]; + } = {}; + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.tags != null) { + data.tags = this.tags; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.knowledgeId != "0") + writer.writeUint64String(1, this.knowledgeId); + if (this.tags.length) + writer.writeRepeatedString(2, this.tags); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateKnowledgeTagRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateKnowledgeTagRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.knowledgeId = reader.readUint64String(); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateKnowledgeTagRequest { + return CreateKnowledgeTagRequest.deserialize(bytes); + } + } + export class KnowledgeDocument extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + knowledgeId?: string; + language?: string; + name?: string; + description?: string; + documentSource?: dependency_3.google.protobuf.Struct; + documentType?: string; + documentSize?: number; + documentPath?: string; + indexStatus?: string; + retrievalCount?: number; + tokenCount?: number; + wordCount?: number; + DisplayStatus?: string; + status?: string; + createdBy?: string; + createdUser?: dependency_2.User; + updatedBy?: string; + updatedUser?: dependency_2.User; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("language" in data && data.language != undefined) { + this.language = data.language; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("documentSource" in data && data.documentSource != undefined) { + this.documentSource = data.documentSource; + } + if ("documentType" in data && data.documentType != undefined) { + this.documentType = data.documentType; + } + if ("documentSize" in data && data.documentSize != undefined) { + this.documentSize = data.documentSize; + } + if ("documentPath" in data && data.documentPath != undefined) { + this.documentPath = data.documentPath; + } + if ("indexStatus" in data && data.indexStatus != undefined) { + this.indexStatus = data.indexStatus; + } + if ("retrievalCount" in data && data.retrievalCount != undefined) { + this.retrievalCount = data.retrievalCount; + } + if ("tokenCount" in data && data.tokenCount != undefined) { + this.tokenCount = data.tokenCount; + } + if ("wordCount" in data && data.wordCount != undefined) { + this.wordCount = data.wordCount; + } + if ("DisplayStatus" in data && data.DisplayStatus != undefined) { + this.DisplayStatus = data.DisplayStatus; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("createdUser" in data && data.createdUser != undefined) { + this.createdUser = data.createdUser; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("updatedUser" in data && data.updatedUser != undefined) { + this.updatedUser = data.updatedUser; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get language() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set language(value: string) { + pb_1.Message.setField(this, 3, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 4, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 5, value); + } + get documentSource() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 6) as dependency_3.google.protobuf.Struct; + } + set documentSource(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_documentSource() { + return pb_1.Message.getField(this, 6) != null; + } + get documentType() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set documentType(value: string) { + pb_1.Message.setField(this, 7, value); + } + get documentSize() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set documentSize(value: number) { + pb_1.Message.setField(this, 8, value); + } + get documentPath() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set documentPath(value: string) { + pb_1.Message.setField(this, 9, value); + } + get indexStatus() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set indexStatus(value: string) { + pb_1.Message.setField(this, 10, value); + } + get retrievalCount() { + return pb_1.Message.getFieldWithDefault(this, 12, 0) as number; + } + set retrievalCount(value: number) { + pb_1.Message.setField(this, 12, value); + } + get tokenCount() { + return pb_1.Message.getFieldWithDefault(this, 13, 0) as number; + } + set tokenCount(value: number) { + pb_1.Message.setField(this, 13, value); + } + get wordCount() { + return pb_1.Message.getFieldWithDefault(this, 14, 0) as number; + } + set wordCount(value: number) { + pb_1.Message.setField(this, 14, value); + } + get DisplayStatus() { + return pb_1.Message.getFieldWithDefault(this, 19, "") as string; + } + set DisplayStatus(value: string) { + pb_1.Message.setField(this, 19, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 21, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 21, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 22, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 22, value); + } + get createdUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 23) as dependency_2.User; + } + set createdUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 23, value); + } + get has_createdUser() { + return pb_1.Message.getField(this, 23) != null; + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 24, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 24, value); + } + get updatedUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 25) as dependency_2.User; + } + set updatedUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 25, value); + } + get has_updatedUser() { + return pb_1.Message.getField(this, 25) != null; + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 26) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 26, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 26) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 27) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 27, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 27) != null; + } + static fromObject(data: { + id?: string; + knowledgeId?: string; + language?: string; + name?: string; + description?: string; + documentSource?: ReturnType; + documentType?: string; + documentSize?: number; + documentPath?: string; + indexStatus?: string; + retrievalCount?: number; + tokenCount?: number; + wordCount?: number; + DisplayStatus?: string; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + }): KnowledgeDocument { + const message = new KnowledgeDocument({}); + if (data.id != null) { + message.id = data.id; + } + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.language != null) { + message.language = data.language; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.documentSource != null) { + message.documentSource = dependency_3.google.protobuf.Struct.fromObject(data.documentSource); + } + if (data.documentType != null) { + message.documentType = data.documentType; + } + if (data.documentSize != null) { + message.documentSize = data.documentSize; + } + if (data.documentPath != null) { + message.documentPath = data.documentPath; + } + if (data.indexStatus != null) { + message.indexStatus = data.indexStatus; + } + if (data.retrievalCount != null) { + message.retrievalCount = data.retrievalCount; + } + if (data.tokenCount != null) { + message.tokenCount = data.tokenCount; + } + if (data.wordCount != null) { + message.wordCount = data.wordCount; + } + if (data.DisplayStatus != null) { + message.DisplayStatus = data.DisplayStatus; + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.createdUser != null) { + message.createdUser = dependency_2.User.fromObject(data.createdUser); + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.updatedUser != null) { + message.updatedUser = dependency_2.User.fromObject(data.updatedUser); + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + return message; + } + toObject() { + const data: { + id?: string; + knowledgeId?: string; + language?: string; + name?: string; + description?: string; + documentSource?: ReturnType; + documentType?: string; + documentSize?: number; + documentPath?: string; + indexStatus?: string; + retrievalCount?: number; + tokenCount?: number; + wordCount?: number; + DisplayStatus?: string; + status?: string; + createdBy?: string; + createdUser?: ReturnType; + updatedBy?: string; + updatedUser?: ReturnType; + createdDate?: ReturnType; + updatedDate?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.language != null) { + data.language = this.language; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.documentSource != null) { + data.documentSource = this.documentSource.toObject(); + } + if (this.documentType != null) { + data.documentType = this.documentType; + } + if (this.documentSize != null) { + data.documentSize = this.documentSize; + } + if (this.documentPath != null) { + data.documentPath = this.documentPath; + } + if (this.indexStatus != null) { + data.indexStatus = this.indexStatus; + } + if (this.retrievalCount != null) { + data.retrievalCount = this.retrievalCount; + } + if (this.tokenCount != null) { + data.tokenCount = this.tokenCount; + } + if (this.wordCount != null) { + data.wordCount = this.wordCount; + } + if (this.DisplayStatus != null) { + data.DisplayStatus = this.DisplayStatus; + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.createdUser != null) { + data.createdUser = this.createdUser.toObject(); + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.updatedUser != null) { + data.updatedUser = this.updatedUser.toObject(); + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.knowledgeId != "0") + writer.writeUint64String(2, this.knowledgeId); + if (this.language.length) + writer.writeString(3, this.language); + if (this.name.length) + writer.writeString(4, this.name); + if (this.description.length) + writer.writeString(5, this.description); + if (this.has_documentSource) + writer.writeMessage(6, this.documentSource, () => this.documentSource.serialize(writer)); + if (this.documentType.length) + writer.writeString(7, this.documentType); + if (this.documentSize != 0) + writer.writeUint64(8, this.documentSize); + if (this.documentPath.length) + writer.writeString(9, this.documentPath); + if (this.indexStatus.length) + writer.writeString(10, this.indexStatus); + if (this.retrievalCount != 0) + writer.writeUint64(12, this.retrievalCount); + if (this.tokenCount != 0) + writer.writeUint64(13, this.tokenCount); + if (this.wordCount != 0) + writer.writeUint64(14, this.wordCount); + if (this.DisplayStatus.length) + writer.writeString(19, this.DisplayStatus); + if (this.status.length) + writer.writeString(21, this.status); + if (this.createdBy != "0") + writer.writeUint64String(22, this.createdBy); + if (this.has_createdUser) + writer.writeMessage(23, this.createdUser, () => this.createdUser.serialize(writer)); + if (this.updatedBy != "0") + writer.writeUint64String(24, this.updatedBy); + if (this.has_updatedUser) + writer.writeMessage(25, this.updatedUser, () => this.updatedUser.serialize(writer)); + if (this.has_createdDate) + writer.writeMessage(26, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(27, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): KnowledgeDocument { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new KnowledgeDocument(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.knowledgeId = reader.readUint64String(); + break; + case 3: + message.language = reader.readString(); + break; + case 4: + message.name = reader.readString(); + break; + case 5: + message.description = reader.readString(); + break; + case 6: + reader.readMessage(message.documentSource, () => message.documentSource = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 7: + message.documentType = reader.readString(); + break; + case 8: + message.documentSize = reader.readUint64(); + break; + case 9: + message.documentPath = reader.readString(); + break; + case 10: + message.indexStatus = reader.readString(); + break; + case 12: + message.retrievalCount = reader.readUint64(); + break; + case 13: + message.tokenCount = reader.readUint64(); + break; + case 14: + message.wordCount = reader.readUint64(); + break; + case 19: + message.DisplayStatus = reader.readString(); + break; + case 21: + message.status = reader.readString(); + break; + case 22: + message.createdBy = reader.readUint64String(); + break; + case 23: + reader.readMessage(message.createdUser, () => message.createdUser = dependency_2.User.deserialize(reader)); + break; + case 24: + message.updatedBy = reader.readUint64String(); + break; + case 25: + reader.readMessage(message.updatedUser, () => message.updatedUser = dependency_2.User.deserialize(reader)); + break; + case 26: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 27: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): KnowledgeDocument { + return KnowledgeDocument.deserialize(bytes); + } + } + export class GetAllKnowledgeDocumentRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + knowledgeId?: string; + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 2) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 2) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 3) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + knowledgeId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllKnowledgeDocumentRequest { + const message = new GetAllKnowledgeDocumentRequest({}); + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + knowledgeId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.knowledgeId != "0") + writer.writeUint64String(1, this.knowledgeId); + if (this.has_paginate) + writer.writeMessage(2, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(3, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllKnowledgeDocumentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllKnowledgeDocumentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.knowledgeId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 3: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeDocumentRequest { + return GetAllKnowledgeDocumentRequest.deserialize(bytes); + } + } + export class GetAllKnowledgeDocumentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: KnowledgeDocument[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, KnowledgeDocument, 3) as KnowledgeDocument[]; + } + set data(value: KnowledgeDocument[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllKnowledgeDocumentResponse { + const message = new GetAllKnowledgeDocumentResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => KnowledgeDocument.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: KnowledgeDocument) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: KnowledgeDocument) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllKnowledgeDocumentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllKnowledgeDocumentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, KnowledgeDocument.deserialize(reader), KnowledgeDocument)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeDocumentResponse { + return GetAllKnowledgeDocumentResponse.deserialize(bytes); + } + } + export class CreateKnowledgeDocumentRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + knowledgeId?: string; + documentSource?: CreateKnowledgeDocumentRequest.DOCUMENT_SOURCE; + dataSource?: string; + contents?: dependency_2.Content[]; + preProcess?: CreateKnowledgeDocumentRequest.PRE_PROCESS; + separator?: string; + maxChunkSize?: number; + chunkOverlap?: number; + name?: string; + description?: string; + documentStructure?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("documentSource" in data && data.documentSource != undefined) { + this.documentSource = data.documentSource; + } + if ("dataSource" in data && data.dataSource != undefined) { + this.dataSource = data.dataSource; + } + if ("contents" in data && data.contents != undefined) { + this.contents = data.contents; + } + if ("preProcess" in data && data.preProcess != undefined) { + this.preProcess = data.preProcess; + } + if ("separator" in data && data.separator != undefined) { + this.separator = data.separator; + } + if ("maxChunkSize" in data && data.maxChunkSize != undefined) { + this.maxChunkSize = data.maxChunkSize; + } + if ("chunkOverlap" in data && data.chunkOverlap != undefined) { + this.chunkOverlap = data.chunkOverlap; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("documentStructure" in data && data.documentStructure != undefined) { + this.documentStructure = data.documentStructure; + } + } + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get documentSource() { + return pb_1.Message.getFieldWithDefault(this, 2, CreateKnowledgeDocumentRequest.DOCUMENT_SOURCE.DOCUMENT_SOURCE_MANUAL) as CreateKnowledgeDocumentRequest.DOCUMENT_SOURCE; + } + set documentSource(value: CreateKnowledgeDocumentRequest.DOCUMENT_SOURCE) { + pb_1.Message.setField(this, 2, value); + } + get dataSource() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set dataSource(value: string) { + pb_1.Message.setField(this, 3, value); + } + get contents() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Content, 5) as dependency_2.Content[]; + } + set contents(value: dependency_2.Content[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get preProcess() { + return pb_1.Message.getFieldWithDefault(this, 6, CreateKnowledgeDocumentRequest.PRE_PROCESS.AUTOMATIC) as CreateKnowledgeDocumentRequest.PRE_PROCESS; + } + set preProcess(value: CreateKnowledgeDocumentRequest.PRE_PROCESS) { + pb_1.Message.setField(this, 6, value); + } + get separator() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set separator(value: string) { + pb_1.Message.setField(this, 7, value); + } + get maxChunkSize() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set maxChunkSize(value: number) { + pb_1.Message.setField(this, 8, value); + } + get chunkOverlap() { + return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; + } + set chunkOverlap(value: number) { + pb_1.Message.setField(this, 9, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 10, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 11, value); + } + get documentStructure() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set documentStructure(value: string) { + pb_1.Message.setField(this, 12, value); + } + static fromObject(data: { + knowledgeId?: string; + documentSource?: CreateKnowledgeDocumentRequest.DOCUMENT_SOURCE; + dataSource?: string; + contents?: ReturnType[]; + preProcess?: CreateKnowledgeDocumentRequest.PRE_PROCESS; + separator?: string; + maxChunkSize?: number; + chunkOverlap?: number; + name?: string; + description?: string; + documentStructure?: string; + }): CreateKnowledgeDocumentRequest { + const message = new CreateKnowledgeDocumentRequest({}); + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.documentSource != null) { + message.documentSource = data.documentSource; + } + if (data.dataSource != null) { + message.dataSource = data.dataSource; + } + if (data.contents != null) { + message.contents = data.contents.map(item => dependency_2.Content.fromObject(item)); + } + if (data.preProcess != null) { + message.preProcess = data.preProcess; + } + if (data.separator != null) { + message.separator = data.separator; + } + if (data.maxChunkSize != null) { + message.maxChunkSize = data.maxChunkSize; + } + if (data.chunkOverlap != null) { + message.chunkOverlap = data.chunkOverlap; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.documentStructure != null) { + message.documentStructure = data.documentStructure; + } + return message; + } + toObject() { + const data: { + knowledgeId?: string; + documentSource?: CreateKnowledgeDocumentRequest.DOCUMENT_SOURCE; + dataSource?: string; + contents?: ReturnType[]; + preProcess?: CreateKnowledgeDocumentRequest.PRE_PROCESS; + separator?: string; + maxChunkSize?: number; + chunkOverlap?: number; + name?: string; + description?: string; + documentStructure?: string; + } = {}; + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.documentSource != null) { + data.documentSource = this.documentSource; + } + if (this.dataSource != null) { + data.dataSource = this.dataSource; + } + if (this.contents != null) { + data.contents = this.contents.map((item: dependency_2.Content) => item.toObject()); + } + if (this.preProcess != null) { + data.preProcess = this.preProcess; + } + if (this.separator != null) { + data.separator = this.separator; + } + if (this.maxChunkSize != null) { + data.maxChunkSize = this.maxChunkSize; + } + if (this.chunkOverlap != null) { + data.chunkOverlap = this.chunkOverlap; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.documentStructure != null) { + data.documentStructure = this.documentStructure; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.knowledgeId != "0") + writer.writeUint64String(1, this.knowledgeId); + if (this.documentSource != CreateKnowledgeDocumentRequest.DOCUMENT_SOURCE.DOCUMENT_SOURCE_MANUAL) + writer.writeEnum(2, this.documentSource); + if (this.dataSource.length) + writer.writeString(3, this.dataSource); + if (this.contents.length) + writer.writeRepeatedMessage(5, this.contents, (item: dependency_2.Content) => item.serialize(writer)); + if (this.preProcess != CreateKnowledgeDocumentRequest.PRE_PROCESS.AUTOMATIC) + writer.writeEnum(6, this.preProcess); + if (this.separator.length) + writer.writeString(7, this.separator); + if (this.maxChunkSize != 0) + writer.writeUint32(8, this.maxChunkSize); + if (this.chunkOverlap != 0) + writer.writeUint32(9, this.chunkOverlap); + if (this.name.length) + writer.writeString(10, this.name); + if (this.description.length) + writer.writeString(11, this.description); + if (this.documentStructure.length) + writer.writeString(12, this.documentStructure); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateKnowledgeDocumentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateKnowledgeDocumentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.knowledgeId = reader.readUint64String(); + break; + case 2: + message.documentSource = reader.readEnum(); + break; + case 3: + message.dataSource = reader.readString(); + break; + case 5: + reader.readMessage(message.contents, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_2.Content.deserialize(reader), dependency_2.Content)); + break; + case 6: + message.preProcess = reader.readEnum(); + break; + case 7: + message.separator = reader.readString(); + break; + case 8: + message.maxChunkSize = reader.readUint32(); + break; + case 9: + message.chunkOverlap = reader.readUint32(); + break; + case 10: + message.name = reader.readString(); + break; + case 11: + message.description = reader.readString(); + break; + case 12: + message.documentStructure = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateKnowledgeDocumentRequest { + return CreateKnowledgeDocumentRequest.deserialize(bytes); + } + } + export namespace CreateKnowledgeDocumentRequest { + export enum PRE_PROCESS { + AUTOMATIC = 0, + CUSTOM = 1 + } + export enum DOCUMENT_SOURCE { + DOCUMENT_SOURCE_MANUAL = 0, + DOCUMENT_SOURCE_TOOL = 1 + } + } + export class CreateKnowledgeDocumentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: KnowledgeDocument[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, KnowledgeDocument, 3) as KnowledgeDocument[]; + } + set data(value: KnowledgeDocument[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): CreateKnowledgeDocumentResponse { + const message = new CreateKnowledgeDocumentResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => KnowledgeDocument.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: KnowledgeDocument) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: KnowledgeDocument) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateKnowledgeDocumentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateKnowledgeDocumentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, KnowledgeDocument.deserialize(reader), KnowledgeDocument)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateKnowledgeDocumentResponse { + return CreateKnowledgeDocumentResponse.deserialize(bytes); + } + } + export class KnowledgeDocumentSegment extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + index?: string; + document_hash?: string; + document_id?: string; + text?: string; + metadata?: KnowledgeDocumentSegment.Metadata; + entities?: KnowledgeDocumentSegment.Entities; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("document_hash" in data && data.document_hash != undefined) { + this.document_hash = data.document_hash; + } + if ("document_id" in data && data.document_id != undefined) { + this.document_id = data.document_id; + } + if ("text" in data && data.text != undefined) { + this.text = data.text; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("entities" in data && data.entities != undefined) { + this.entities = data.entities; + } + } + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set index(value: string) { + pb_1.Message.setField(this, 1, value); + } + get document_hash() { + return pb_1.Message.getFieldWithDefault(this, 19, "") as string; + } + set document_hash(value: string) { + pb_1.Message.setField(this, 19, value); + } + get document_id() { + return pb_1.Message.getFieldWithDefault(this, 20, "") as string; + } + set document_id(value: string) { + pb_1.Message.setField(this, 20, value); + } + get text() { + return pb_1.Message.getFieldWithDefault(this, 21, "") as string; + } + set text(value: string) { + pb_1.Message.setField(this, 21, value); + } + get metadata() { + return pb_1.Message.getWrapperField(this, KnowledgeDocumentSegment.Metadata, 22) as KnowledgeDocumentSegment.Metadata; + } + set metadata(value: KnowledgeDocumentSegment.Metadata) { + pb_1.Message.setWrapperField(this, 22, value); + } + get has_metadata() { + return pb_1.Message.getField(this, 22) != null; + } + get entities() { + return pb_1.Message.getWrapperField(this, KnowledgeDocumentSegment.Entities, 23) as KnowledgeDocumentSegment.Entities; + } + set entities(value: KnowledgeDocumentSegment.Entities) { + pb_1.Message.setWrapperField(this, 23, value); + } + get has_entities() { + return pb_1.Message.getField(this, 23) != null; + } + static fromObject(data: { + index?: string; + document_hash?: string; + document_id?: string; + text?: string; + metadata?: ReturnType; + entities?: ReturnType; + }): KnowledgeDocumentSegment { + const message = new KnowledgeDocumentSegment({}); + if (data.index != null) { + message.index = data.index; + } + if (data.document_hash != null) { + message.document_hash = data.document_hash; + } + if (data.document_id != null) { + message.document_id = data.document_id; + } + if (data.text != null) { + message.text = data.text; + } + if (data.metadata != null) { + message.metadata = KnowledgeDocumentSegment.Metadata.fromObject(data.metadata); + } + if (data.entities != null) { + message.entities = KnowledgeDocumentSegment.Entities.fromObject(data.entities); + } + return message; + } + toObject() { + const data: { + index?: string; + document_hash?: string; + document_id?: string; + text?: string; + metadata?: ReturnType; + entities?: ReturnType; + } = {}; + if (this.index != null) { + data.index = this.index; + } + if (this.document_hash != null) { + data.document_hash = this.document_hash; + } + if (this.document_id != null) { + data.document_id = this.document_id; + } + if (this.text != null) { + data.text = this.text; + } + if (this.metadata != null) { + data.metadata = this.metadata.toObject(); + } + if (this.entities != null) { + data.entities = this.entities.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.index.length) + writer.writeString(1, this.index); + if (this.document_hash.length) + writer.writeString(19, this.document_hash); + if (this.document_id.length) + writer.writeString(20, this.document_id); + if (this.text.length) + writer.writeString(21, this.text); + if (this.has_metadata) + writer.writeMessage(22, this.metadata, () => this.metadata.serialize(writer)); + if (this.has_entities) + writer.writeMessage(23, this.entities, () => this.entities.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): KnowledgeDocumentSegment { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new KnowledgeDocumentSegment(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.index = reader.readString(); + break; + case 19: + message.document_hash = reader.readString(); + break; + case 20: + message.document_id = reader.readString(); + break; + case 21: + message.text = reader.readString(); + break; + case 22: + reader.readMessage(message.metadata, () => message.metadata = KnowledgeDocumentSegment.Metadata.deserialize(reader)); + break; + case 23: + reader.readMessage(message.entities, () => message.entities = KnowledgeDocumentSegment.Entities.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): KnowledgeDocumentSegment { + return KnowledgeDocumentSegment.deserialize(bytes); + } + } + export namespace KnowledgeDocumentSegment { + export class Metadata extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + document_hash?: string; + document_id?: string; + knowledge_document_id?: string; + knowledge_id?: string; + project_id?: string; + organization_id?: string; + document_name?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("document_hash" in data && data.document_hash != undefined) { + this.document_hash = data.document_hash; + } + if ("document_id" in data && data.document_id != undefined) { + this.document_id = data.document_id; + } + if ("knowledge_document_id" in data && data.knowledge_document_id != undefined) { + this.knowledge_document_id = data.knowledge_document_id; + } + if ("knowledge_id" in data && data.knowledge_id != undefined) { + this.knowledge_id = data.knowledge_id; + } + if ("project_id" in data && data.project_id != undefined) { + this.project_id = data.project_id; + } + if ("organization_id" in data && data.organization_id != undefined) { + this.organization_id = data.organization_id; + } + if ("document_name" in data && data.document_name != undefined) { + this.document_name = data.document_name; + } + } + } + get document_hash() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set document_hash(value: string) { + pb_1.Message.setField(this, 1, value); + } + get document_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set document_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get knowledge_document_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set knowledge_document_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get knowledge_id() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set knowledge_id(value: string) { + pb_1.Message.setField(this, 4, value); + } + get project_id() { + return pb_1.Message.getFieldWithDefault(this, 5, "0") as string; + } + set project_id(value: string) { + pb_1.Message.setField(this, 5, value); + } + get organization_id() { + return pb_1.Message.getFieldWithDefault(this, 6, "0") as string; + } + set organization_id(value: string) { + pb_1.Message.setField(this, 6, value); + } + get document_name() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set document_name(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + document_hash?: string; + document_id?: string; + knowledge_document_id?: string; + knowledge_id?: string; + project_id?: string; + organization_id?: string; + document_name?: string; + }): Metadata { + const message = new Metadata({}); + if (data.document_hash != null) { + message.document_hash = data.document_hash; + } + if (data.document_id != null) { + message.document_id = data.document_id; + } + if (data.knowledge_document_id != null) { + message.knowledge_document_id = data.knowledge_document_id; + } + if (data.knowledge_id != null) { + message.knowledge_id = data.knowledge_id; + } + if (data.project_id != null) { + message.project_id = data.project_id; + } + if (data.organization_id != null) { + message.organization_id = data.organization_id; + } + if (data.document_name != null) { + message.document_name = data.document_name; + } + return message; + } + toObject() { + const data: { + document_hash?: string; + document_id?: string; + knowledge_document_id?: string; + knowledge_id?: string; + project_id?: string; + organization_id?: string; + document_name?: string; + } = {}; + if (this.document_hash != null) { + data.document_hash = this.document_hash; + } + if (this.document_id != null) { + data.document_id = this.document_id; + } + if (this.knowledge_document_id != null) { + data.knowledge_document_id = this.knowledge_document_id; + } + if (this.knowledge_id != null) { + data.knowledge_id = this.knowledge_id; + } + if (this.project_id != null) { + data.project_id = this.project_id; + } + if (this.organization_id != null) { + data.organization_id = this.organization_id; + } + if (this.document_name != null) { + data.document_name = this.document_name; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.document_hash.length) + writer.writeString(1, this.document_hash); + if (this.document_id.length) + writer.writeString(2, this.document_id); + if (this.knowledge_document_id != "0") + writer.writeUint64String(3, this.knowledge_document_id); + if (this.knowledge_id != "0") + writer.writeUint64String(4, this.knowledge_id); + if (this.project_id != "0") + writer.writeUint64String(5, this.project_id); + if (this.organization_id != "0") + writer.writeUint64String(6, this.organization_id); + if (this.document_name.length) + writer.writeString(7, this.document_name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Metadata { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Metadata(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.document_hash = reader.readString(); + break; + case 2: + message.document_id = reader.readString(); + break; + case 3: + message.knowledge_document_id = reader.readUint64String(); + break; + case 4: + message.knowledge_id = reader.readUint64String(); + break; + case 5: + message.project_id = reader.readUint64String(); + break; + case 6: + message.organization_id = reader.readUint64String(); + break; + case 7: + message.document_name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Metadata { + return Metadata.deserialize(bytes); + } + } + export class Entities extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + organizations?: string[]; + dates?: string[]; + products?: string[]; + events?: string[]; + people?: string[]; + times?: string[]; + quantities?: string[]; + locations?: string[]; + industries?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3, 4, 5, 6, 7, 8, 9], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("organizations" in data && data.organizations != undefined) { + this.organizations = data.organizations; + } + if ("dates" in data && data.dates != undefined) { + this.dates = data.dates; + } + if ("products" in data && data.products != undefined) { + this.products = data.products; + } + if ("events" in data && data.events != undefined) { + this.events = data.events; + } + if ("people" in data && data.people != undefined) { + this.people = data.people; + } + if ("times" in data && data.times != undefined) { + this.times = data.times; + } + if ("quantities" in data && data.quantities != undefined) { + this.quantities = data.quantities; + } + if ("locations" in data && data.locations != undefined) { + this.locations = data.locations; + } + if ("industries" in data && data.industries != undefined) { + this.industries = data.industries; + } + } + } + get organizations() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set organizations(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + get dates() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set dates(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + get products() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set products(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + get events() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as string[]; + } + set events(value: string[]) { + pb_1.Message.setField(this, 4, value); + } + get people() { + return pb_1.Message.getFieldWithDefault(this, 5, []) as string[]; + } + set people(value: string[]) { + pb_1.Message.setField(this, 5, value); + } + get times() { + return pb_1.Message.getFieldWithDefault(this, 6, []) as string[]; + } + set times(value: string[]) { + pb_1.Message.setField(this, 6, value); + } + get quantities() { + return pb_1.Message.getFieldWithDefault(this, 7, []) as string[]; + } + set quantities(value: string[]) { + pb_1.Message.setField(this, 7, value); + } + get locations() { + return pb_1.Message.getFieldWithDefault(this, 8, []) as string[]; + } + set locations(value: string[]) { + pb_1.Message.setField(this, 8, value); + } + get industries() { + return pb_1.Message.getFieldWithDefault(this, 9, []) as string[]; + } + set industries(value: string[]) { + pb_1.Message.setField(this, 9, value); + } + static fromObject(data: { + organizations?: string[]; + dates?: string[]; + products?: string[]; + events?: string[]; + people?: string[]; + times?: string[]; + quantities?: string[]; + locations?: string[]; + industries?: string[]; + }): Entities { + const message = new Entities({}); + if (data.organizations != null) { + message.organizations = data.organizations; + } + if (data.dates != null) { + message.dates = data.dates; + } + if (data.products != null) { + message.products = data.products; + } + if (data.events != null) { + message.events = data.events; + } + if (data.people != null) { + message.people = data.people; + } + if (data.times != null) { + message.times = data.times; + } + if (data.quantities != null) { + message.quantities = data.quantities; + } + if (data.locations != null) { + message.locations = data.locations; + } + if (data.industries != null) { + message.industries = data.industries; + } + return message; + } + toObject() { + const data: { + organizations?: string[]; + dates?: string[]; + products?: string[]; + events?: string[]; + people?: string[]; + times?: string[]; + quantities?: string[]; + locations?: string[]; + industries?: string[]; + } = {}; + if (this.organizations != null) { + data.organizations = this.organizations; + } + if (this.dates != null) { + data.dates = this.dates; + } + if (this.products != null) { + data.products = this.products; + } + if (this.events != null) { + data.events = this.events; + } + if (this.people != null) { + data.people = this.people; + } + if (this.times != null) { + data.times = this.times; + } + if (this.quantities != null) { + data.quantities = this.quantities; + } + if (this.locations != null) { + data.locations = this.locations; + } + if (this.industries != null) { + data.industries = this.industries; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.organizations.length) + writer.writeRepeatedString(1, this.organizations); + if (this.dates.length) + writer.writeRepeatedString(2, this.dates); + if (this.products.length) + writer.writeRepeatedString(3, this.products); + if (this.events.length) + writer.writeRepeatedString(4, this.events); + if (this.people.length) + writer.writeRepeatedString(5, this.people); + if (this.times.length) + writer.writeRepeatedString(6, this.times); + if (this.quantities.length) + writer.writeRepeatedString(7, this.quantities); + if (this.locations.length) + writer.writeRepeatedString(8, this.locations); + if (this.industries.length) + writer.writeRepeatedString(9, this.industries); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Entities { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Entities(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + case 4: + pb_1.Message.addToRepeatedField(message, 4, reader.readString()); + break; + case 5: + pb_1.Message.addToRepeatedField(message, 5, reader.readString()); + break; + case 6: + pb_1.Message.addToRepeatedField(message, 6, reader.readString()); + break; + case 7: + pb_1.Message.addToRepeatedField(message, 7, reader.readString()); + break; + case 8: + pb_1.Message.addToRepeatedField(message, 8, reader.readString()); + break; + case 9: + pb_1.Message.addToRepeatedField(message, 9, reader.readString()); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Entities { + return Entities.deserialize(bytes); + } + } + } + export class GetAllKnowledgeDocumentSegmentRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + knowledgeId?: string; + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 3) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 3) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 4) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + knowledgeId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllKnowledgeDocumentSegmentRequest { + const message = new GetAllKnowledgeDocumentSegmentRequest({}); + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + knowledgeId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.knowledgeId != "0") + writer.writeUint64String(1, this.knowledgeId); + if (this.has_paginate) + writer.writeMessage(3, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(4, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllKnowledgeDocumentSegmentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllKnowledgeDocumentSegmentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.knowledgeId = reader.readUint64String(); + break; + case 3: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 4: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeDocumentSegmentRequest { + return GetAllKnowledgeDocumentSegmentRequest.deserialize(bytes); + } + } + export class GetAllKnowledgeDocumentSegmentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: KnowledgeDocumentSegment[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, KnowledgeDocumentSegment, 3) as KnowledgeDocumentSegment[]; + } + set data(value: KnowledgeDocumentSegment[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllKnowledgeDocumentSegmentResponse { + const message = new GetAllKnowledgeDocumentSegmentResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => KnowledgeDocumentSegment.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: KnowledgeDocumentSegment) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: KnowledgeDocumentSegment) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllKnowledgeDocumentSegmentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllKnowledgeDocumentSegmentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, KnowledgeDocumentSegment.deserialize(reader), KnowledgeDocumentSegment)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeDocumentSegmentResponse { + return GetAllKnowledgeDocumentSegmentResponse.deserialize(bytes); + } + } + export class UpdateKnowledgeDetailRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + knowledgeId?: string; + name?: string; + description?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + } + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + knowledgeId?: string; + name?: string; + description?: string; + }): UpdateKnowledgeDetailRequest { + const message = new UpdateKnowledgeDetailRequest({}); + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + return message; + } + toObject() { + const data: { + knowledgeId?: string; + name?: string; + description?: string; + } = {}; + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.knowledgeId != "0") + writer.writeUint64String(1, this.knowledgeId); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateKnowledgeDetailRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateKnowledgeDetailRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.knowledgeId = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateKnowledgeDetailRequest { + return UpdateKnowledgeDetailRequest.deserialize(bytes); + } + } + export class UpdateKnowledgeDocumentSegmentRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + organizations?: string[]; + dates?: string[]; + products?: string[]; + events?: string[]; + people?: string[]; + times?: string[]; + quantities?: string[]; + locations?: string[]; + industries?: string[]; + documentName?: string; + documentId?: string; + index?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3, 4, 5, 6, 7, 8, 9], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("organizations" in data && data.organizations != undefined) { + this.organizations = data.organizations; + } + if ("dates" in data && data.dates != undefined) { + this.dates = data.dates; + } + if ("products" in data && data.products != undefined) { + this.products = data.products; + } + if ("events" in data && data.events != undefined) { + this.events = data.events; + } + if ("people" in data && data.people != undefined) { + this.people = data.people; + } + if ("times" in data && data.times != undefined) { + this.times = data.times; + } + if ("quantities" in data && data.quantities != undefined) { + this.quantities = data.quantities; + } + if ("locations" in data && data.locations != undefined) { + this.locations = data.locations; + } + if ("industries" in data && data.industries != undefined) { + this.industries = data.industries; + } + if ("documentName" in data && data.documentName != undefined) { + this.documentName = data.documentName; + } + if ("documentId" in data && data.documentId != undefined) { + this.documentId = data.documentId; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + } + } + get organizations() { + return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; + } + set organizations(value: string[]) { + pb_1.Message.setField(this, 1, value); + } + get dates() { + return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; + } + set dates(value: string[]) { + pb_1.Message.setField(this, 2, value); + } + get products() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set products(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + get events() { + return pb_1.Message.getFieldWithDefault(this, 4, []) as string[]; + } + set events(value: string[]) { + pb_1.Message.setField(this, 4, value); + } + get people() { + return pb_1.Message.getFieldWithDefault(this, 5, []) as string[]; + } + set people(value: string[]) { + pb_1.Message.setField(this, 5, value); + } + get times() { + return pb_1.Message.getFieldWithDefault(this, 6, []) as string[]; + } + set times(value: string[]) { + pb_1.Message.setField(this, 6, value); + } + get quantities() { + return pb_1.Message.getFieldWithDefault(this, 7, []) as string[]; + } + set quantities(value: string[]) { + pb_1.Message.setField(this, 7, value); + } + get locations() { + return pb_1.Message.getFieldWithDefault(this, 8, []) as string[]; + } + set locations(value: string[]) { + pb_1.Message.setField(this, 8, value); + } + get industries() { + return pb_1.Message.getFieldWithDefault(this, 9, []) as string[]; + } + set industries(value: string[]) { + pb_1.Message.setField(this, 9, value); + } + get documentName() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set documentName(value: string) { + pb_1.Message.setField(this, 10, value); + } + get documentId() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set documentId(value: string) { + pb_1.Message.setField(this, 11, value); + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 12, "") as string; + } + set index(value: string) { + pb_1.Message.setField(this, 12, value); + } + static fromObject(data: { + organizations?: string[]; + dates?: string[]; + products?: string[]; + events?: string[]; + people?: string[]; + times?: string[]; + quantities?: string[]; + locations?: string[]; + industries?: string[]; + documentName?: string; + documentId?: string; + index?: string; + }): UpdateKnowledgeDocumentSegmentRequest { + const message = new UpdateKnowledgeDocumentSegmentRequest({}); + if (data.organizations != null) { + message.organizations = data.organizations; + } + if (data.dates != null) { + message.dates = data.dates; + } + if (data.products != null) { + message.products = data.products; + } + if (data.events != null) { + message.events = data.events; + } + if (data.people != null) { + message.people = data.people; + } + if (data.times != null) { + message.times = data.times; + } + if (data.quantities != null) { + message.quantities = data.quantities; + } + if (data.locations != null) { + message.locations = data.locations; + } + if (data.industries != null) { + message.industries = data.industries; + } + if (data.documentName != null) { + message.documentName = data.documentName; + } + if (data.documentId != null) { + message.documentId = data.documentId; + } + if (data.index != null) { + message.index = data.index; + } + return message; + } + toObject() { + const data: { + organizations?: string[]; + dates?: string[]; + products?: string[]; + events?: string[]; + people?: string[]; + times?: string[]; + quantities?: string[]; + locations?: string[]; + industries?: string[]; + documentName?: string; + documentId?: string; + index?: string; + } = {}; + if (this.organizations != null) { + data.organizations = this.organizations; + } + if (this.dates != null) { + data.dates = this.dates; + } + if (this.products != null) { + data.products = this.products; + } + if (this.events != null) { + data.events = this.events; + } + if (this.people != null) { + data.people = this.people; + } + if (this.times != null) { + data.times = this.times; + } + if (this.quantities != null) { + data.quantities = this.quantities; + } + if (this.locations != null) { + data.locations = this.locations; + } + if (this.industries != null) { + data.industries = this.industries; + } + if (this.documentName != null) { + data.documentName = this.documentName; + } + if (this.documentId != null) { + data.documentId = this.documentId; + } + if (this.index != null) { + data.index = this.index; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.organizations.length) + writer.writeRepeatedString(1, this.organizations); + if (this.dates.length) + writer.writeRepeatedString(2, this.dates); + if (this.products.length) + writer.writeRepeatedString(3, this.products); + if (this.events.length) + writer.writeRepeatedString(4, this.events); + if (this.people.length) + writer.writeRepeatedString(5, this.people); + if (this.times.length) + writer.writeRepeatedString(6, this.times); + if (this.quantities.length) + writer.writeRepeatedString(7, this.quantities); + if (this.locations.length) + writer.writeRepeatedString(8, this.locations); + if (this.industries.length) + writer.writeRepeatedString(9, this.industries); + if (this.documentName.length) + writer.writeString(10, this.documentName); + if (this.documentId.length) + writer.writeString(11, this.documentId); + if (this.index.length) + writer.writeString(12, this.index); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateKnowledgeDocumentSegmentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateKnowledgeDocumentSegmentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + pb_1.Message.addToRepeatedField(message, 1, reader.readString()); + break; + case 2: + pb_1.Message.addToRepeatedField(message, 2, reader.readString()); + break; + case 3: + pb_1.Message.addToRepeatedField(message, 3, reader.readString()); + break; + case 4: + pb_1.Message.addToRepeatedField(message, 4, reader.readString()); + break; + case 5: + pb_1.Message.addToRepeatedField(message, 5, reader.readString()); + break; + case 6: + pb_1.Message.addToRepeatedField(message, 6, reader.readString()); + break; + case 7: + pb_1.Message.addToRepeatedField(message, 7, reader.readString()); + break; + case 8: + pb_1.Message.addToRepeatedField(message, 8, reader.readString()); + break; + case 9: + pb_1.Message.addToRepeatedField(message, 9, reader.readString()); + break; + case 10: + message.documentName = reader.readString(); + break; + case 11: + message.documentId = reader.readString(); + break; + case 12: + message.index = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateKnowledgeDocumentSegmentRequest { + return UpdateKnowledgeDocumentSegmentRequest.deserialize(bytes); + } + } + export class DeleteKnowledgeDocumentSegmentRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + documentId?: string; + index?: string; + reason?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("documentId" in data && data.documentId != undefined) { + this.documentId = data.documentId; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + if ("reason" in data && data.reason != undefined) { + this.reason = data.reason; + } + } + } + get documentId() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set documentId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set index(value: string) { + pb_1.Message.setField(this, 2, value); + } + get reason() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set reason(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + documentId?: string; + index?: string; + reason?: string; + }): DeleteKnowledgeDocumentSegmentRequest { + const message = new DeleteKnowledgeDocumentSegmentRequest({}); + if (data.documentId != null) { + message.documentId = data.documentId; + } + if (data.index != null) { + message.index = data.index; + } + if (data.reason != null) { + message.reason = data.reason; + } + return message; + } + toObject() { + const data: { + documentId?: string; + index?: string; + reason?: string; + } = {}; + if (this.documentId != null) { + data.documentId = this.documentId; + } + if (this.index != null) { + data.index = this.index; + } + if (this.reason != null) { + data.reason = this.reason; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.documentId.length) + writer.writeString(1, this.documentId); + if (this.index.length) + writer.writeString(2, this.index); + if (this.reason.length) + writer.writeString(3, this.reason); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeleteKnowledgeDocumentSegmentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteKnowledgeDocumentSegmentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.documentId = reader.readString(); + break; + case 2: + message.index = reader.readString(); + break; + case 3: + message.reason = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DeleteKnowledgeDocumentSegmentRequest { + return DeleteKnowledgeDocumentSegmentRequest.deserialize(bytes); + } + } + export class GetAllKnowledgeLogRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + projectId?: string; + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + order?: dependency_2.Ordering; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("order" in data && data.order != undefined) { + this.order = data.order; + } + } + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 3) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 3) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 4) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get order() { + return pb_1.Message.getWrapperField(this, dependency_2.Ordering, 5) as dependency_2.Ordering; + } + set order(value: dependency_2.Ordering) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_order() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + projectId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + order?: ReturnType; + }): GetAllKnowledgeLogRequest { + const message = new GetAllKnowledgeLogRequest({}); + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.order != null) { + message.order = dependency_2.Ordering.fromObject(data.order); + } + return message; + } + toObject() { + const data: { + projectId?: string; + paginate?: ReturnType; + criterias?: ReturnType[]; + order?: ReturnType; + } = {}; + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.order != null) { + data.order = this.order.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.projectId != "0") + writer.writeUint64String(2, this.projectId); + if (this.has_paginate) + writer.writeMessage(3, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(4, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.has_order) + writer.writeMessage(5, this.order, () => this.order.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllKnowledgeLogRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllKnowledgeLogRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.projectId = reader.readUint64String(); + break; + case 3: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 4: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 5: + reader.readMessage(message.order, () => message.order = dependency_2.Ordering.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeLogRequest { + return GetAllKnowledgeLogRequest.deserialize(bytes); + } + } + export class GetKnowledgeLogRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + projectId?: string; + id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + projectId?: string; + id?: string; + }): GetKnowledgeLogRequest { + const message = new GetKnowledgeLogRequest({}); + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + projectId?: string; + id?: string; + } = {}; + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.id != null) { + data.id = this.id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.projectId != "0") + writer.writeUint64String(2, this.projectId); + if (this.id != "0") + writer.writeUint64String(3, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetKnowledgeLogRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetKnowledgeLogRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.projectId = reader.readUint64String(); + break; + case 3: + message.id = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetKnowledgeLogRequest { + return GetKnowledgeLogRequest.deserialize(bytes); + } + } + export class GetKnowledgeLogResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: KnowledgeLog; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, KnowledgeLog, 3) as KnowledgeLog; + } + set data(value: KnowledgeLog) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetKnowledgeLogResponse { + const message = new GetKnowledgeLogResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = KnowledgeLog.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetKnowledgeLogResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetKnowledgeLogResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = KnowledgeLog.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetKnowledgeLogResponse { + return GetKnowledgeLogResponse.deserialize(bytes); + } + } + export class GetAllKnowledgeLogResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: KnowledgeLog[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, KnowledgeLog, 3) as KnowledgeLog[]; + } + set data(value: KnowledgeLog[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllKnowledgeLogResponse { + const message = new GetAllKnowledgeLogResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => KnowledgeLog.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: KnowledgeLog) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: KnowledgeLog) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllKnowledgeLogResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllKnowledgeLogResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, KnowledgeLog.deserialize(reader), KnowledgeLog)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeLogResponse { + return GetAllKnowledgeLogResponse.deserialize(bytes); + } + } + export class KnowledgeLog extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + action?: dependency_3.google.protobuf.Struct; + request?: dependency_3.google.protobuf.Struct; + response?: dependency_3.google.protobuf.Struct; + status?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + knowledgeId?: string; + projectId?: string; + organizationId?: string; + topK?: number; + scoreThreshold?: number; + documentCount?: number; + assetPrefix?: string; + retrievalMethod?: string; + timeTaken?: string; + additionalData?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("action" in data && data.action != undefined) { + this.action = data.action; + } + if ("request" in data && data.request != undefined) { + this.request = data.request; + } + if ("response" in data && data.response != undefined) { + this.response = data.response; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("knowledgeId" in data && data.knowledgeId != undefined) { + this.knowledgeId = data.knowledgeId; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("topK" in data && data.topK != undefined) { + this.topK = data.topK; + } + if ("scoreThreshold" in data && data.scoreThreshold != undefined) { + this.scoreThreshold = data.scoreThreshold; + } + if ("documentCount" in data && data.documentCount != undefined) { + this.documentCount = data.documentCount; + } + if ("assetPrefix" in data && data.assetPrefix != undefined) { + this.assetPrefix = data.assetPrefix; + } + if ("retrievalMethod" in data && data.retrievalMethod != undefined) { + this.retrievalMethod = data.retrievalMethod; + } + if ("timeTaken" in data && data.timeTaken != undefined) { + this.timeTaken = data.timeTaken; + } + if ("additionalData" in data && data.additionalData != undefined) { + this.additionalData = data.additionalData; + } + } + if (!this.additionalData) + this.additionalData = new Map(); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get action() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 2) as dependency_3.google.protobuf.Struct; + } + set action(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_action() { + return pb_1.Message.getField(this, 2) != null; + } + get request() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 3) as dependency_3.google.protobuf.Struct; + } + set request(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_request() { + return pb_1.Message.getField(this, 3) != null; + } + get response() { + return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Struct, 4) as dependency_3.google.protobuf.Struct; + } + set response(value: dependency_3.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_response() { + return pb_1.Message.getField(this, 4) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 5, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 6) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 6) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 7) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 7) != null; + } + get knowledgeId() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set knowledgeId(value: string) { + pb_1.Message.setField(this, 8, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 9, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 9, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 10, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 10, value); + } + get topK() { + return pb_1.Message.getFieldWithDefault(this, 11, 0) as number; + } + set topK(value: number) { + pb_1.Message.setField(this, 11, value); + } + get scoreThreshold() { + return pb_1.Message.getFieldWithDefault(this, 12, 0) as number; + } + set scoreThreshold(value: number) { + pb_1.Message.setField(this, 12, value); + } + get documentCount() { + return pb_1.Message.getFieldWithDefault(this, 13, 0) as number; + } + set documentCount(value: number) { + pb_1.Message.setField(this, 13, value); + } + get assetPrefix() { + return pb_1.Message.getFieldWithDefault(this, 14, "") as string; + } + set assetPrefix(value: string) { + pb_1.Message.setField(this, 14, value); + } + get retrievalMethod() { + return pb_1.Message.getFieldWithDefault(this, 15, "") as string; + } + set retrievalMethod(value: string) { + pb_1.Message.setField(this, 15, value); + } + get timeTaken() { + return pb_1.Message.getFieldWithDefault(this, 16, "0") as string; + } + set timeTaken(value: string) { + pb_1.Message.setField(this, 16, value); + } + get additionalData() { + return pb_1.Message.getField(this, 17) as any as Map; + } + set additionalData(value: Map) { + pb_1.Message.setField(this, 17, value as any); + } + static fromObject(data: { + id?: string; + action?: ReturnType; + request?: ReturnType; + response?: ReturnType; + status?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + knowledgeId?: string; + projectId?: string; + organizationId?: string; + topK?: number; + scoreThreshold?: number; + documentCount?: number; + assetPrefix?: string; + retrievalMethod?: string; + timeTaken?: string; + additionalData?: { + [key: string]: string; + }; + }): KnowledgeLog { + const message = new KnowledgeLog({}); + if (data.id != null) { + message.id = data.id; + } + if (data.action != null) { + message.action = dependency_3.google.protobuf.Struct.fromObject(data.action); + } + if (data.request != null) { + message.request = dependency_3.google.protobuf.Struct.fromObject(data.request); + } + if (data.response != null) { + message.response = dependency_3.google.protobuf.Struct.fromObject(data.response); + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.knowledgeId != null) { + message.knowledgeId = data.knowledgeId; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.topK != null) { + message.topK = data.topK; + } + if (data.scoreThreshold != null) { + message.scoreThreshold = data.scoreThreshold; + } + if (data.documentCount != null) { + message.documentCount = data.documentCount; + } + if (data.assetPrefix != null) { + message.assetPrefix = data.assetPrefix; + } + if (data.retrievalMethod != null) { + message.retrievalMethod = data.retrievalMethod; + } + if (data.timeTaken != null) { + message.timeTaken = data.timeTaken; + } + if (typeof data.additionalData == "object") { + message.additionalData = new Map(Object.entries(data.additionalData)); + } + return message; + } + toObject() { + const data: { + id?: string; + action?: ReturnType; + request?: ReturnType; + response?: ReturnType; + status?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + knowledgeId?: string; + projectId?: string; + organizationId?: string; + topK?: number; + scoreThreshold?: number; + documentCount?: number; + assetPrefix?: string; + retrievalMethod?: string; + timeTaken?: string; + additionalData?: { + [key: string]: string; + }; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.action != null) { + data.action = this.action.toObject(); + } + if (this.request != null) { + data.request = this.request.toObject(); + } + if (this.response != null) { + data.response = this.response.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.knowledgeId != null) { + data.knowledgeId = this.knowledgeId; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.topK != null) { + data.topK = this.topK; + } + if (this.scoreThreshold != null) { + data.scoreThreshold = this.scoreThreshold; + } + if (this.documentCount != null) { + data.documentCount = this.documentCount; + } + if (this.assetPrefix != null) { + data.assetPrefix = this.assetPrefix; + } + if (this.retrievalMethod != null) { + data.retrievalMethod = this.retrievalMethod; + } + if (this.timeTaken != null) { + data.timeTaken = this.timeTaken; + } + if (this.additionalData != null) { + data.additionalData = (Object.fromEntries)(this.additionalData); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.has_action) + writer.writeMessage(2, this.action, () => this.action.serialize(writer)); + if (this.has_request) + writer.writeMessage(3, this.request, () => this.request.serialize(writer)); + if (this.has_response) + writer.writeMessage(4, this.response, () => this.response.serialize(writer)); + if (this.status.length) + writer.writeString(5, this.status); + if (this.has_createdDate) + writer.writeMessage(6, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(7, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.knowledgeId != "0") + writer.writeUint64String(8, this.knowledgeId); + if (this.projectId != "0") + writer.writeUint64String(9, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(10, this.organizationId); + if (this.topK != 0) + writer.writeUint32(11, this.topK); + if (this.scoreThreshold != 0) + writer.writeFloat(12, this.scoreThreshold); + if (this.documentCount != 0) + writer.writeUint32(13, this.documentCount); + if (this.assetPrefix.length) + writer.writeString(14, this.assetPrefix); + if (this.retrievalMethod.length) + writer.writeString(15, this.retrievalMethod); + if (this.timeTaken != "0") + writer.writeUint64String(16, this.timeTaken); + for (const [key, value] of this.additionalData) { + writer.writeMessage(17, this.additionalData, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): KnowledgeLog { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new KnowledgeLog(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.action, () => message.action = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 3: + reader.readMessage(message.request, () => message.request = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 4: + reader.readMessage(message.response, () => message.response = dependency_3.google.protobuf.Struct.deserialize(reader)); + break; + case 5: + message.status = reader.readString(); + break; + case 6: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 7: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 8: + message.knowledgeId = reader.readUint64String(); + break; + case 9: + message.projectId = reader.readUint64String(); + break; + case 10: + message.organizationId = reader.readUint64String(); + break; + case 11: + message.topK = reader.readUint32(); + break; + case 12: + message.scoreThreshold = reader.readFloat(); + break; + case 13: + message.documentCount = reader.readUint32(); + break; + case 14: + message.assetPrefix = reader.readString(); + break; + case 15: + message.retrievalMethod = reader.readString(); + break; + case 16: + message.timeTaken = reader.readUint64String(); + break; + case 17: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.additionalData as any, reader, reader.readString, reader.readString)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): KnowledgeLog { + return KnowledgeLog.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedKnowledgeServiceService { + static definition = { + GetKnowledge: { + path: "/knowledge_api.KnowledgeService/GetKnowledge", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetKnowledgeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetKnowledgeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetKnowledgeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetKnowledgeResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllKnowledge: { + path: "/knowledge_api.KnowledgeService/GetAllKnowledge", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllKnowledgeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllKnowledgeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllKnowledgeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllKnowledgeResponse.deserialize(new Uint8Array(bytes)) + }, + CreateKnowledge: { + path: "/knowledge_api.KnowledgeService/CreateKnowledge", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateKnowledgeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateKnowledgeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateKnowledgeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateKnowledgeResponse.deserialize(new Uint8Array(bytes)) + }, + CreateKnowledgeTag: { + path: "/knowledge_api.KnowledgeService/CreateKnowledgeTag", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateKnowledgeTagRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateKnowledgeTagRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetKnowledgeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetKnowledgeResponse.deserialize(new Uint8Array(bytes)) + }, + CreateKnowledgeDocument: { + path: "/knowledge_api.KnowledgeService/CreateKnowledgeDocument", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateKnowledgeDocumentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateKnowledgeDocumentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateKnowledgeDocumentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateKnowledgeDocumentResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllKnowledgeDocument: { + path: "/knowledge_api.KnowledgeService/GetAllKnowledgeDocument", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllKnowledgeDocumentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllKnowledgeDocumentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllKnowledgeDocumentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllKnowledgeDocumentResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllKnowledgeDocumentSegment: { + path: "/knowledge_api.KnowledgeService/GetAllKnowledgeDocumentSegment", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllKnowledgeDocumentSegmentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllKnowledgeDocumentSegmentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllKnowledgeDocumentSegmentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllKnowledgeDocumentSegmentResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateKnowledgeDetail: { + path: "/knowledge_api.KnowledgeService/UpdateKnowledgeDetail", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateKnowledgeDetailRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateKnowledgeDetailRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetKnowledgeResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetKnowledgeResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateKnowledgeDocumentSegment: { + path: "/knowledge_api.KnowledgeService/UpdateKnowledgeDocumentSegment", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateKnowledgeDocumentSegmentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateKnowledgeDocumentSegmentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_2.BaseResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_2.BaseResponse.deserialize(new Uint8Array(bytes)) + }, + DeleteKnowledgeDocumentSegment: { + path: "/knowledge_api.KnowledgeService/DeleteKnowledgeDocumentSegment", + requestStream: false, + responseStream: false, + requestSerialize: (message: DeleteKnowledgeDocumentSegmentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => DeleteKnowledgeDocumentSegmentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_2.BaseResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_2.BaseResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllKnowledgeLog: { + path: "/knowledge_api.KnowledgeService/GetAllKnowledgeLog", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllKnowledgeLogRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllKnowledgeLogRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllKnowledgeLogResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllKnowledgeLogResponse.deserialize(new Uint8Array(bytes)) + }, + GetKnowledgeLog: { + path: "/knowledge_api.KnowledgeService/GetKnowledgeLog", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetKnowledgeLogRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetKnowledgeLogRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetKnowledgeLogResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetKnowledgeLogResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GetKnowledge(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllKnowledge(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateKnowledge(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateKnowledgeTag(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateKnowledgeDocument(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllKnowledgeDocument(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllKnowledgeDocumentSegment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateKnowledgeDetail(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateKnowledgeDocumentSegment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DeleteKnowledgeDocumentSegment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllKnowledgeLog(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetKnowledgeLog(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class KnowledgeServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedKnowledgeServiceService.definition, "KnowledgeService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GetKnowledge: GrpcUnaryServiceInterface = (message: GetKnowledgeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetKnowledge(message, metadata, options, callback); + }; + GetAllKnowledge: GrpcUnaryServiceInterface = (message: GetAllKnowledgeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllKnowledge(message, metadata, options, callback); + }; + CreateKnowledge: GrpcUnaryServiceInterface = (message: CreateKnowledgeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateKnowledge(message, metadata, options, callback); + }; + CreateKnowledgeTag: GrpcUnaryServiceInterface = (message: CreateKnowledgeTagRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateKnowledgeTag(message, metadata, options, callback); + }; + CreateKnowledgeDocument: GrpcUnaryServiceInterface = (message: CreateKnowledgeDocumentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateKnowledgeDocument(message, metadata, options, callback); + }; + GetAllKnowledgeDocument: GrpcUnaryServiceInterface = (message: GetAllKnowledgeDocumentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllKnowledgeDocument(message, metadata, options, callback); + }; + GetAllKnowledgeDocumentSegment: GrpcUnaryServiceInterface = (message: GetAllKnowledgeDocumentSegmentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllKnowledgeDocumentSegment(message, metadata, options, callback); + }; + UpdateKnowledgeDetail: GrpcUnaryServiceInterface = (message: UpdateKnowledgeDetailRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateKnowledgeDetail(message, metadata, options, callback); + }; + UpdateKnowledgeDocumentSegment: GrpcUnaryServiceInterface = (message: UpdateKnowledgeDocumentSegmentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateKnowledgeDocumentSegment(message, metadata, options, callback); + }; + DeleteKnowledgeDocumentSegment: GrpcUnaryServiceInterface = (message: DeleteKnowledgeDocumentSegmentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DeleteKnowledgeDocumentSegment(message, metadata, options, callback); + }; + GetAllKnowledgeLog: GrpcUnaryServiceInterface = (message: GetAllKnowledgeLogRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllKnowledgeLog(message, metadata, options, callback); + }; + GetKnowledgeLog: GrpcUnaryServiceInterface = (message: GetKnowledgeLogRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetKnowledgeLog(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/knowledge-api_grpc_pb.d.ts b/src/clients/protos/knowledge-api_grpc_pb.d.ts deleted file mode 100644 index 3d7de95..0000000 --- a/src/clients/protos/knowledge-api_grpc_pb.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: knowledge_api -// file: knowledge-api.proto - -import * as knowledge_api_pb from "./knowledge-api_pb"; -import * as common_pb from "./common_pb"; -import * as grpc from "grpc"; - -interface IKnowledgeServiceService extends grpc.ServiceDefinition { - getKnowledge: grpc.MethodDefinition; - getAllKnowledge: grpc.MethodDefinition; - createKnowledge: grpc.MethodDefinition; - createKnowledgeTag: grpc.MethodDefinition; - createKnowledgeDocument: grpc.MethodDefinition; - getAllKnowledgeDocument: grpc.MethodDefinition; - getAllKnowledgeDocumentSegment: grpc.MethodDefinition; - updateKnowledgeDetail: grpc.MethodDefinition; - updateKnowledgeDocumentSegment: grpc.MethodDefinition; - deleteKnowledgeDocumentSegment: grpc.MethodDefinition; -} - -export const KnowledgeServiceService: IKnowledgeServiceService; - -export interface IKnowledgeServiceServer extends grpc.UntypedServiceImplementation { - getKnowledge: grpc.handleUnaryCall; - getAllKnowledge: grpc.handleUnaryCall; - createKnowledge: grpc.handleUnaryCall; - createKnowledgeTag: grpc.handleUnaryCall; - createKnowledgeDocument: grpc.handleUnaryCall; - getAllKnowledgeDocument: grpc.handleUnaryCall; - getAllKnowledgeDocumentSegment: grpc.handleUnaryCall; - updateKnowledgeDetail: grpc.handleUnaryCall; - updateKnowledgeDocumentSegment: grpc.handleUnaryCall; - deleteKnowledgeDocumentSegment: grpc.handleUnaryCall; -} - -export class KnowledgeServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - getKnowledge(argument: knowledge_api_pb.GetKnowledgeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getKnowledge(argument: knowledge_api_pb.GetKnowledgeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getKnowledge(argument: knowledge_api_pb.GetKnowledgeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllKnowledge(argument: knowledge_api_pb.GetAllKnowledgeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllKnowledge(argument: knowledge_api_pb.GetAllKnowledgeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllKnowledge(argument: knowledge_api_pb.GetAllKnowledgeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createKnowledge(argument: knowledge_api_pb.CreateKnowledgeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createKnowledge(argument: knowledge_api_pb.CreateKnowledgeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createKnowledge(argument: knowledge_api_pb.CreateKnowledgeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createKnowledgeTag(argument: knowledge_api_pb.CreateKnowledgeTagRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createKnowledgeTag(argument: knowledge_api_pb.CreateKnowledgeTagRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createKnowledgeTag(argument: knowledge_api_pb.CreateKnowledgeTagRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createKnowledgeDocument(argument: knowledge_api_pb.CreateKnowledgeDocumentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createKnowledgeDocument(argument: knowledge_api_pb.CreateKnowledgeDocumentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createKnowledgeDocument(argument: knowledge_api_pb.CreateKnowledgeDocumentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllKnowledgeDocument(argument: knowledge_api_pb.GetAllKnowledgeDocumentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllKnowledgeDocument(argument: knowledge_api_pb.GetAllKnowledgeDocumentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllKnowledgeDocument(argument: knowledge_api_pb.GetAllKnowledgeDocumentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllKnowledgeDocumentSegment(argument: knowledge_api_pb.GetAllKnowledgeDocumentSegmentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllKnowledgeDocumentSegment(argument: knowledge_api_pb.GetAllKnowledgeDocumentSegmentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllKnowledgeDocumentSegment(argument: knowledge_api_pb.GetAllKnowledgeDocumentSegmentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateKnowledgeDetail(argument: knowledge_api_pb.UpdateKnowledgeDetailRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateKnowledgeDetail(argument: knowledge_api_pb.UpdateKnowledgeDetailRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateKnowledgeDetail(argument: knowledge_api_pb.UpdateKnowledgeDetailRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateKnowledgeDocumentSegment(argument: knowledge_api_pb.UpdateKnowledgeDocumentSegmentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateKnowledgeDocumentSegment(argument: knowledge_api_pb.UpdateKnowledgeDocumentSegmentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateKnowledgeDocumentSegment(argument: knowledge_api_pb.UpdateKnowledgeDocumentSegmentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteKnowledgeDocumentSegment(argument: knowledge_api_pb.DeleteKnowledgeDocumentSegmentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteKnowledgeDocumentSegment(argument: knowledge_api_pb.DeleteKnowledgeDocumentSegmentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteKnowledgeDocumentSegment(argument: knowledge_api_pb.DeleteKnowledgeDocumentSegmentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/knowledge-api_grpc_pb.js b/src/clients/protos/knowledge-api_grpc_pb.js index a2ad5d3..888bea3 100644 --- a/src/clients/protos/knowledge-api_grpc_pb.js +++ b/src/clients/protos/knowledge-api_grpc_pb.js @@ -128,6 +128,28 @@ function deserialize_knowledge_api_GetAllKnowledgeDocumentSegmentResponse(buffer return knowledge$api_pb.GetAllKnowledgeDocumentSegmentResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_knowledge_api_GetAllKnowledgeLogRequest(arg) { + if (!(arg instanceof knowledge$api_pb.GetAllKnowledgeLogRequest)) { + throw new Error('Expected argument of type knowledge_api.GetAllKnowledgeLogRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_knowledge_api_GetAllKnowledgeLogRequest(buffer_arg) { + return knowledge$api_pb.GetAllKnowledgeLogRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_knowledge_api_GetAllKnowledgeLogResponse(arg) { + if (!(arg instanceof knowledge$api_pb.GetAllKnowledgeLogResponse)) { + throw new Error('Expected argument of type knowledge_api.GetAllKnowledgeLogResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_knowledge_api_GetAllKnowledgeLogResponse(buffer_arg) { + return knowledge$api_pb.GetAllKnowledgeLogResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_knowledge_api_GetAllKnowledgeRequest(arg) { if (!(arg instanceof knowledge$api_pb.GetAllKnowledgeRequest)) { throw new Error('Expected argument of type knowledge_api.GetAllKnowledgeRequest'); @@ -150,6 +172,28 @@ function deserialize_knowledge_api_GetAllKnowledgeResponse(buffer_arg) { return knowledge$api_pb.GetAllKnowledgeResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_knowledge_api_GetKnowledgeLogRequest(arg) { + if (!(arg instanceof knowledge$api_pb.GetKnowledgeLogRequest)) { + throw new Error('Expected argument of type knowledge_api.GetKnowledgeLogRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_knowledge_api_GetKnowledgeLogRequest(buffer_arg) { + return knowledge$api_pb.GetKnowledgeLogRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_knowledge_api_GetKnowledgeLogResponse(arg) { + if (!(arg instanceof knowledge$api_pb.GetKnowledgeLogResponse)) { + throw new Error('Expected argument of type knowledge_api.GetKnowledgeLogResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_knowledge_api_GetKnowledgeLogResponse(buffer_arg) { + return knowledge$api_pb.GetKnowledgeLogResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_knowledge_api_GetKnowledgeRequest(arg) { if (!(arg instanceof knowledge$api_pb.GetKnowledgeRequest)) { throw new Error('Expected argument of type knowledge_api.GetKnowledgeRequest'); @@ -307,6 +351,29 @@ updateKnowledgeDocumentSegment: { responseSerialize: serialize_BaseResponse, responseDeserialize: deserialize_BaseResponse, }, + // knowledge log retrieval log +getAllKnowledgeLog: { + path: '/knowledge_api.KnowledgeService/GetAllKnowledgeLog', + requestStream: false, + responseStream: false, + requestType: knowledge$api_pb.GetAllKnowledgeLogRequest, + responseType: knowledge$api_pb.GetAllKnowledgeLogResponse, + requestSerialize: serialize_knowledge_api_GetAllKnowledgeLogRequest, + requestDeserialize: deserialize_knowledge_api_GetAllKnowledgeLogRequest, + responseSerialize: serialize_knowledge_api_GetAllKnowledgeLogResponse, + responseDeserialize: deserialize_knowledge_api_GetAllKnowledgeLogResponse, + }, + getKnowledgeLog: { + path: '/knowledge_api.KnowledgeService/GetKnowledgeLog', + requestStream: false, + responseStream: false, + requestType: knowledge$api_pb.GetKnowledgeLogRequest, + responseType: knowledge$api_pb.GetKnowledgeLogResponse, + requestSerialize: serialize_knowledge_api_GetKnowledgeLogRequest, + requestDeserialize: deserialize_knowledge_api_GetKnowledgeLogRequest, + responseSerialize: serialize_knowledge_api_GetKnowledgeLogResponse, + responseDeserialize: deserialize_knowledge_api_GetKnowledgeLogResponse, + }, }; exports.KnowledgeServiceClient = grpc.makeGenericClientConstructor(KnowledgeServiceService, 'KnowledgeService'); diff --git a/src/clients/protos/knowledge-api_pb.d.ts b/src/clients/protos/knowledge-api_pb.d.ts deleted file mode 100644 index 1762052..0000000 --- a/src/clients/protos/knowledge-api_pb.d.ts +++ /dev/null @@ -1,916 +0,0 @@ -// package: knowledge_api -// file: knowledge-api.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as common_pb from "./common_pb"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; - -export class CreateKnowledgeRequest extends jspb.Message { - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value: string, index?: number): string; - - getVisibility(): string; - setVisibility(value: string): void; - - getEmbeddingmodelproviderid(): string; - setEmbeddingmodelproviderid(value: string): void; - - getEmbeddingmodelprovidername(): string; - setEmbeddingmodelprovidername(value: string): void; - - clearKnowledgeembeddingmodeloptionsList(): void; - getKnowledgeembeddingmodeloptionsList(): Array; - setKnowledgeembeddingmodeloptionsList(value: Array): void; - addKnowledgeembeddingmodeloptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateKnowledgeRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateKnowledgeRequest): CreateKnowledgeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateKnowledgeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateKnowledgeRequest; - static deserializeBinaryFromReader(message: CreateKnowledgeRequest, reader: jspb.BinaryReader): CreateKnowledgeRequest; -} - -export namespace CreateKnowledgeRequest { - export type AsObject = { - name: string, - description: string, - tagsList: Array, - visibility: string, - embeddingmodelproviderid: string, - embeddingmodelprovidername: string, - knowledgeembeddingmodeloptionsList: Array, - } -} - -export class CreateKnowledgeResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): common_pb.Knowledge | undefined; - setData(value?: common_pb.Knowledge): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateKnowledgeResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateKnowledgeResponse): CreateKnowledgeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateKnowledgeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateKnowledgeResponse; - static deserializeBinaryFromReader(message: CreateKnowledgeResponse, reader: jspb.BinaryReader): CreateKnowledgeResponse; -} - -export namespace CreateKnowledgeResponse { - export type AsObject = { - code: number, - success: boolean, - data?: common_pb.Knowledge.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAllKnowledgeRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllKnowledgeRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllKnowledgeRequest): GetAllKnowledgeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllKnowledgeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeRequest; - static deserializeBinaryFromReader(message: GetAllKnowledgeRequest, reader: jspb.BinaryReader): GetAllKnowledgeRequest; -} - -export namespace GetAllKnowledgeRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllKnowledgeResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.Knowledge, index?: number): common_pb.Knowledge; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllKnowledgeResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllKnowledgeResponse): GetAllKnowledgeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllKnowledgeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeResponse; - static deserializeBinaryFromReader(message: GetAllKnowledgeResponse, reader: jspb.BinaryReader): GetAllKnowledgeResponse; -} - -export namespace GetAllKnowledgeResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class GetKnowledgeRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKnowledgeRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetKnowledgeRequest): GetKnowledgeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetKnowledgeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetKnowledgeRequest; - static deserializeBinaryFromReader(message: GetKnowledgeRequest, reader: jspb.BinaryReader): GetKnowledgeRequest; -} - -export namespace GetKnowledgeRequest { - export type AsObject = { - id: string, - } -} - -export class GetKnowledgeResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): common_pb.Knowledge | undefined; - setData(value?: common_pb.Knowledge): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKnowledgeResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetKnowledgeResponse): GetKnowledgeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetKnowledgeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetKnowledgeResponse; - static deserializeBinaryFromReader(message: GetKnowledgeResponse, reader: jspb.BinaryReader): GetKnowledgeResponse; -} - -export namespace GetKnowledgeResponse { - export type AsObject = { - code: number, - success: boolean, - data?: common_pb.Knowledge.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class CreateKnowledgeTagRequest extends jspb.Message { - getKnowledgeid(): string; - setKnowledgeid(value: string): void; - - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateKnowledgeTagRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateKnowledgeTagRequest): CreateKnowledgeTagRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateKnowledgeTagRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateKnowledgeTagRequest; - static deserializeBinaryFromReader(message: CreateKnowledgeTagRequest, reader: jspb.BinaryReader): CreateKnowledgeTagRequest; -} - -export namespace CreateKnowledgeTagRequest { - export type AsObject = { - knowledgeid: string, - tagsList: Array, - } -} - -export class KnowledgeDocument extends jspb.Message { - getId(): string; - setId(value: string): void; - - getKnowledgeid(): string; - setKnowledgeid(value: string): void; - - getLanguage(): string; - setLanguage(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - hasDocumentsource(): boolean; - clearDocumentsource(): void; - getDocumentsource(): google_protobuf_struct_pb.Struct | undefined; - setDocumentsource(value?: google_protobuf_struct_pb.Struct): void; - - getDocumenttype(): string; - setDocumenttype(value: string): void; - - getDocumentsize(): number; - setDocumentsize(value: number): void; - - getDocumentpath(): string; - setDocumentpath(value: string): void; - - getIndexstatus(): string; - setIndexstatus(value: string): void; - - getRetrievalcount(): number; - setRetrievalcount(value: number): void; - - getTokencount(): number; - setTokencount(value: number): void; - - getWordcount(): number; - setWordcount(value: number): void; - - getDisplaystatus(): string; - setDisplaystatus(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - hasCreateduser(): boolean; - clearCreateduser(): void; - getCreateduser(): common_pb.User | undefined; - setCreateduser(value?: common_pb.User): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - hasUpdateduser(): boolean; - clearUpdateduser(): void; - getUpdateduser(): common_pb.User | undefined; - setUpdateduser(value?: common_pb.User): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KnowledgeDocument.AsObject; - static toObject(includeInstance: boolean, msg: KnowledgeDocument): KnowledgeDocument.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KnowledgeDocument, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KnowledgeDocument; - static deserializeBinaryFromReader(message: KnowledgeDocument, reader: jspb.BinaryReader): KnowledgeDocument; -} - -export namespace KnowledgeDocument { - export type AsObject = { - id: string, - knowledgeid: string, - language: string, - name: string, - description: string, - documentsource?: google_protobuf_struct_pb.Struct.AsObject, - documenttype: string, - documentsize: number, - documentpath: string, - indexstatus: string, - retrievalcount: number, - tokencount: number, - wordcount: number, - displaystatus: string, - status: string, - createdby: string, - createduser?: common_pb.User.AsObject, - updatedby: string, - updateduser?: common_pb.User.AsObject, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class GetAllKnowledgeDocumentRequest extends jspb.Message { - getKnowledgeid(): string; - setKnowledgeid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllKnowledgeDocumentRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllKnowledgeDocumentRequest): GetAllKnowledgeDocumentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllKnowledgeDocumentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeDocumentRequest; - static deserializeBinaryFromReader(message: GetAllKnowledgeDocumentRequest, reader: jspb.BinaryReader): GetAllKnowledgeDocumentRequest; -} - -export namespace GetAllKnowledgeDocumentRequest { - export type AsObject = { - knowledgeid: string, - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllKnowledgeDocumentResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: KnowledgeDocument, index?: number): KnowledgeDocument; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllKnowledgeDocumentResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllKnowledgeDocumentResponse): GetAllKnowledgeDocumentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllKnowledgeDocumentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeDocumentResponse; - static deserializeBinaryFromReader(message: GetAllKnowledgeDocumentResponse, reader: jspb.BinaryReader): GetAllKnowledgeDocumentResponse; -} - -export namespace GetAllKnowledgeDocumentResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class CreateKnowledgeDocumentRequest extends jspb.Message { - getKnowledgeid(): string; - setKnowledgeid(value: string): void; - - getDocumentsource(): CreateKnowledgeDocumentRequest.DOCUMENT_SOURCEMap[keyof CreateKnowledgeDocumentRequest.DOCUMENT_SOURCEMap]; - setDocumentsource(value: CreateKnowledgeDocumentRequest.DOCUMENT_SOURCEMap[keyof CreateKnowledgeDocumentRequest.DOCUMENT_SOURCEMap]): void; - - getDatasource(): string; - setDatasource(value: string): void; - - clearContentsList(): void; - getContentsList(): Array; - setContentsList(value: Array): void; - addContents(value?: common_pb.Content, index?: number): common_pb.Content; - - getPreprocess(): CreateKnowledgeDocumentRequest.PRE_PROCESSMap[keyof CreateKnowledgeDocumentRequest.PRE_PROCESSMap]; - setPreprocess(value: CreateKnowledgeDocumentRequest.PRE_PROCESSMap[keyof CreateKnowledgeDocumentRequest.PRE_PROCESSMap]): void; - - getSeparator(): string; - setSeparator(value: string): void; - - getMaxchunksize(): number; - setMaxchunksize(value: number): void; - - getChunkoverlap(): number; - setChunkoverlap(value: number): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - getDocumentstructure(): string; - setDocumentstructure(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateKnowledgeDocumentRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateKnowledgeDocumentRequest): CreateKnowledgeDocumentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateKnowledgeDocumentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateKnowledgeDocumentRequest; - static deserializeBinaryFromReader(message: CreateKnowledgeDocumentRequest, reader: jspb.BinaryReader): CreateKnowledgeDocumentRequest; -} - -export namespace CreateKnowledgeDocumentRequest { - export type AsObject = { - knowledgeid: string, - documentsource: CreateKnowledgeDocumentRequest.DOCUMENT_SOURCEMap[keyof CreateKnowledgeDocumentRequest.DOCUMENT_SOURCEMap], - datasource: string, - contentsList: Array, - preprocess: CreateKnowledgeDocumentRequest.PRE_PROCESSMap[keyof CreateKnowledgeDocumentRequest.PRE_PROCESSMap], - separator: string, - maxchunksize: number, - chunkoverlap: number, - name: string, - description: string, - documentstructure: string, - } - - export interface PRE_PROCESSMap { - AUTOMATIC: 0; - CUSTOM: 1; - } - - export const PRE_PROCESS: PRE_PROCESSMap; - - export interface DOCUMENT_SOURCEMap { - DOCUMENT_SOURCE_MANUAL: 0; - DOCUMENT_SOURCE_TOOL: 1; - } - - export const DOCUMENT_SOURCE: DOCUMENT_SOURCEMap; -} - -export class CreateKnowledgeDocumentResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: KnowledgeDocument, index?: number): KnowledgeDocument; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateKnowledgeDocumentResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateKnowledgeDocumentResponse): CreateKnowledgeDocumentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateKnowledgeDocumentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateKnowledgeDocumentResponse; - static deserializeBinaryFromReader(message: CreateKnowledgeDocumentResponse, reader: jspb.BinaryReader): CreateKnowledgeDocumentResponse; -} - -export namespace CreateKnowledgeDocumentResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class KnowledgeDocumentSegment extends jspb.Message { - getIndex(): string; - setIndex(value: string): void; - - getDocumentHash(): string; - setDocumentHash(value: string): void; - - getDocumentId(): string; - setDocumentId(value: string): void; - - getText(): string; - setText(value: string): void; - - hasMetadata(): boolean; - clearMetadata(): void; - getMetadata(): KnowledgeDocumentSegment.Metadata | undefined; - setMetadata(value?: KnowledgeDocumentSegment.Metadata): void; - - hasEntities(): boolean; - clearEntities(): void; - getEntities(): KnowledgeDocumentSegment.Entities | undefined; - setEntities(value?: KnowledgeDocumentSegment.Entities): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KnowledgeDocumentSegment.AsObject; - static toObject(includeInstance: boolean, msg: KnowledgeDocumentSegment): KnowledgeDocumentSegment.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KnowledgeDocumentSegment, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KnowledgeDocumentSegment; - static deserializeBinaryFromReader(message: KnowledgeDocumentSegment, reader: jspb.BinaryReader): KnowledgeDocumentSegment; -} - -export namespace KnowledgeDocumentSegment { - export type AsObject = { - index: string, - documentHash: string, - documentId: string, - text: string, - metadata?: KnowledgeDocumentSegment.Metadata.AsObject, - entities?: KnowledgeDocumentSegment.Entities.AsObject, - } - - export class Metadata extends jspb.Message { - getDocumentHash(): string; - setDocumentHash(value: string): void; - - getDocumentId(): string; - setDocumentId(value: string): void; - - getKnowledgeDocumentId(): string; - setKnowledgeDocumentId(value: string): void; - - getKnowledgeId(): string; - setKnowledgeId(value: string): void; - - getProjectId(): string; - setProjectId(value: string): void; - - getOrganizationId(): string; - setOrganizationId(value: string): void; - - getDocumentName(): string; - setDocumentName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Metadata.AsObject; - static toObject(includeInstance: boolean, msg: Metadata): Metadata.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Metadata, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Metadata; - static deserializeBinaryFromReader(message: Metadata, reader: jspb.BinaryReader): Metadata; - } - - export namespace Metadata { - export type AsObject = { - documentHash: string, - documentId: string, - knowledgeDocumentId: string, - knowledgeId: string, - projectId: string, - organizationId: string, - documentName: string, - } - } - - export class Entities extends jspb.Message { - clearOrganizationsList(): void; - getOrganizationsList(): Array; - setOrganizationsList(value: Array): void; - addOrganizations(value: string, index?: number): string; - - clearDatesList(): void; - getDatesList(): Array; - setDatesList(value: Array): void; - addDates(value: string, index?: number): string; - - clearProductsList(): void; - getProductsList(): Array; - setProductsList(value: Array): void; - addProducts(value: string, index?: number): string; - - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value: string, index?: number): string; - - clearPeopleList(): void; - getPeopleList(): Array; - setPeopleList(value: Array): void; - addPeople(value: string, index?: number): string; - - clearTimesList(): void; - getTimesList(): Array; - setTimesList(value: Array): void; - addTimes(value: string, index?: number): string; - - clearQuantitiesList(): void; - getQuantitiesList(): Array; - setQuantitiesList(value: Array): void; - addQuantities(value: string, index?: number): string; - - clearLocationsList(): void; - getLocationsList(): Array; - setLocationsList(value: Array): void; - addLocations(value: string, index?: number): string; - - clearIndustriesList(): void; - getIndustriesList(): Array; - setIndustriesList(value: Array): void; - addIndustries(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Entities.AsObject; - static toObject(includeInstance: boolean, msg: Entities): Entities.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Entities, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Entities; - static deserializeBinaryFromReader(message: Entities, reader: jspb.BinaryReader): Entities; - } - - export namespace Entities { - export type AsObject = { - organizationsList: Array, - datesList: Array, - productsList: Array, - eventsList: Array, - peopleList: Array, - timesList: Array, - quantitiesList: Array, - locationsList: Array, - industriesList: Array, - } - } -} - -export class GetAllKnowledgeDocumentSegmentRequest extends jspb.Message { - getKnowledgeid(): string; - setKnowledgeid(value: string): void; - - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllKnowledgeDocumentSegmentRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllKnowledgeDocumentSegmentRequest): GetAllKnowledgeDocumentSegmentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllKnowledgeDocumentSegmentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeDocumentSegmentRequest; - static deserializeBinaryFromReader(message: GetAllKnowledgeDocumentSegmentRequest, reader: jspb.BinaryReader): GetAllKnowledgeDocumentSegmentRequest; -} - -export namespace GetAllKnowledgeDocumentSegmentRequest { - export type AsObject = { - knowledgeid: string, - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllKnowledgeDocumentSegmentResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: KnowledgeDocumentSegment, index?: number): KnowledgeDocumentSegment; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllKnowledgeDocumentSegmentResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllKnowledgeDocumentSegmentResponse): GetAllKnowledgeDocumentSegmentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllKnowledgeDocumentSegmentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllKnowledgeDocumentSegmentResponse; - static deserializeBinaryFromReader(message: GetAllKnowledgeDocumentSegmentResponse, reader: jspb.BinaryReader): GetAllKnowledgeDocumentSegmentResponse; -} - -export namespace GetAllKnowledgeDocumentSegmentResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class UpdateKnowledgeDetailRequest extends jspb.Message { - getKnowledgeid(): string; - setKnowledgeid(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateKnowledgeDetailRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateKnowledgeDetailRequest): UpdateKnowledgeDetailRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateKnowledgeDetailRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateKnowledgeDetailRequest; - static deserializeBinaryFromReader(message: UpdateKnowledgeDetailRequest, reader: jspb.BinaryReader): UpdateKnowledgeDetailRequest; -} - -export namespace UpdateKnowledgeDetailRequest { - export type AsObject = { - knowledgeid: string, - name: string, - description: string, - } -} - -export class UpdateKnowledgeDocumentSegmentRequest extends jspb.Message { - clearOrganizationsList(): void; - getOrganizationsList(): Array; - setOrganizationsList(value: Array): void; - addOrganizations(value: string, index?: number): string; - - clearDatesList(): void; - getDatesList(): Array; - setDatesList(value: Array): void; - addDates(value: string, index?: number): string; - - clearProductsList(): void; - getProductsList(): Array; - setProductsList(value: Array): void; - addProducts(value: string, index?: number): string; - - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value: string, index?: number): string; - - clearPeopleList(): void; - getPeopleList(): Array; - setPeopleList(value: Array): void; - addPeople(value: string, index?: number): string; - - clearTimesList(): void; - getTimesList(): Array; - setTimesList(value: Array): void; - addTimes(value: string, index?: number): string; - - clearQuantitiesList(): void; - getQuantitiesList(): Array; - setQuantitiesList(value: Array): void; - addQuantities(value: string, index?: number): string; - - clearLocationsList(): void; - getLocationsList(): Array; - setLocationsList(value: Array): void; - addLocations(value: string, index?: number): string; - - clearIndustriesList(): void; - getIndustriesList(): Array; - setIndustriesList(value: Array): void; - addIndustries(value: string, index?: number): string; - - getDocumentname(): string; - setDocumentname(value: string): void; - - getDocumentid(): string; - setDocumentid(value: string): void; - - getIndex(): string; - setIndex(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateKnowledgeDocumentSegmentRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateKnowledgeDocumentSegmentRequest): UpdateKnowledgeDocumentSegmentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateKnowledgeDocumentSegmentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateKnowledgeDocumentSegmentRequest; - static deserializeBinaryFromReader(message: UpdateKnowledgeDocumentSegmentRequest, reader: jspb.BinaryReader): UpdateKnowledgeDocumentSegmentRequest; -} - -export namespace UpdateKnowledgeDocumentSegmentRequest { - export type AsObject = { - organizationsList: Array, - datesList: Array, - productsList: Array, - eventsList: Array, - peopleList: Array, - timesList: Array, - quantitiesList: Array, - locationsList: Array, - industriesList: Array, - documentname: string, - documentid: string, - index: string, - } -} - -export class DeleteKnowledgeDocumentSegmentRequest extends jspb.Message { - getDocumentid(): string; - setDocumentid(value: string): void; - - getIndex(): string; - setIndex(value: string): void; - - getReason(): string; - setReason(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteKnowledgeDocumentSegmentRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeleteKnowledgeDocumentSegmentRequest): DeleteKnowledgeDocumentSegmentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteKnowledgeDocumentSegmentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteKnowledgeDocumentSegmentRequest; - static deserializeBinaryFromReader(message: DeleteKnowledgeDocumentSegmentRequest, reader: jspb.BinaryReader): DeleteKnowledgeDocumentSegmentRequest; -} - -export namespace DeleteKnowledgeDocumentSegmentRequest { - export type AsObject = { - documentid: string, - index: string, - reason: string, - } -} - diff --git a/src/clients/protos/knowledge-api_pb.js b/src/clients/protos/knowledge-api_pb.js index af291dc..db9c514 100644 --- a/src/clients/protos/knowledge-api_pb.js +++ b/src/clients/protos/knowledge-api_pb.js @@ -39,14 +39,19 @@ goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeDocumentRequest', null, gl goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeDocumentResponse', null, global); goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeDocumentSegmentRequest', null, global); goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeDocumentSegmentResponse', null, global); +goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeLogRequest', null, global); +goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeLogResponse', null, global); goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeRequest', null, global); goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeResponse', null, global); +goog.exportSymbol('proto.knowledge_api.GetKnowledgeLogRequest', null, global); +goog.exportSymbol('proto.knowledge_api.GetKnowledgeLogResponse', null, global); goog.exportSymbol('proto.knowledge_api.GetKnowledgeRequest', null, global); goog.exportSymbol('proto.knowledge_api.GetKnowledgeResponse', null, global); goog.exportSymbol('proto.knowledge_api.KnowledgeDocument', null, global); goog.exportSymbol('proto.knowledge_api.KnowledgeDocumentSegment', null, global); goog.exportSymbol('proto.knowledge_api.KnowledgeDocumentSegment.Entities', null, global); goog.exportSymbol('proto.knowledge_api.KnowledgeDocumentSegment.Metadata', null, global); +goog.exportSymbol('proto.knowledge_api.KnowledgeLog', null, global); goog.exportSymbol('proto.knowledge_api.UpdateKnowledgeDetailRequest', null, global); goog.exportSymbol('proto.knowledge_api.UpdateKnowledgeDocumentSegmentRequest', null, global); /** @@ -469,6 +474,111 @@ if (goog.DEBUG && !COMPILED) { */ proto.knowledge_api.DeleteKnowledgeDocumentSegmentRequest.displayName = 'proto.knowledge_api.DeleteKnowledgeDocumentSegmentRequest'; } +/** + * 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.GetAllKnowledgeLogRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.knowledge_api.GetAllKnowledgeLogRequest.repeatedFields_, null); +}; +goog.inherits(proto.knowledge_api.GetAllKnowledgeLogRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.knowledge_api.GetAllKnowledgeLogRequest.displayName = 'proto.knowledge_api.GetAllKnowledgeLogRequest'; +} +/** + * 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.GetKnowledgeLogRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.knowledge_api.GetKnowledgeLogRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.knowledge_api.GetKnowledgeLogRequest.displayName = 'proto.knowledge_api.GetKnowledgeLogRequest'; +} +/** + * 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.GetKnowledgeLogResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.knowledge_api.GetKnowledgeLogResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.knowledge_api.GetKnowledgeLogResponse.displayName = 'proto.knowledge_api.GetKnowledgeLogResponse'; +} +/** + * 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.GetAllKnowledgeLogResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.knowledge_api.GetAllKnowledgeLogResponse.repeatedFields_, null); +}; +goog.inherits(proto.knowledge_api.GetAllKnowledgeLogResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.knowledge_api.GetAllKnowledgeLogResponse.displayName = 'proto.knowledge_api.GetAllKnowledgeLogResponse'; +} +/** + * 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.KnowledgeLog = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.knowledge_api.KnowledgeLog, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.knowledge_api.KnowledgeLog.displayName = 'proto.knowledge_api.KnowledgeLog'; +} /** * List of repeated fields within this message type. @@ -7158,4 +7268,1758 @@ proto.knowledge_api.DeleteKnowledgeDocumentSegmentRequest.prototype.setReason = }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.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.knowledge_api.GetAllKnowledgeLogRequest.prototype.toObject = function(opt_includeInstance) { + return proto.knowledge_api.GetAllKnowledgeLogRequest.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.GetAllKnowledgeLogRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.toObject = function(includeInstance, msg) { + var f, obj = { + projectid: jspb.Message.getFieldWithDefault(msg, 2, "0"), + paginate: (f = msg.getPaginate()) && common_pb.Paginate.toObject(includeInstance, f), + criteriasList: jspb.Message.toObjectList(msg.getCriteriasList(), + common_pb.Criteria.toObject, includeInstance), + order: (f = msg.getOrder()) && common_pb.Ordering.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.GetAllKnowledgeLogRequest} + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.knowledge_api.GetAllKnowledgeLogRequest; + return proto.knowledge_api.GetAllKnowledgeLogRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.knowledge_api.GetAllKnowledgeLogRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.knowledge_api.GetAllKnowledgeLogRequest} + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setProjectid(value); + break; + case 3: + var value = new common_pb.Paginate; + reader.readMessage(value,common_pb.Paginate.deserializeBinaryFromReader); + msg.setPaginate(value); + break; + case 4: + var value = new common_pb.Criteria; + reader.readMessage(value,common_pb.Criteria.deserializeBinaryFromReader); + msg.addCriterias(value); + break; + case 5: + var value = new common_pb.Ordering; + reader.readMessage(value,common_pb.Ordering.deserializeBinaryFromReader); + msg.setOrder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.knowledge_api.GetAllKnowledgeLogRequest.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.GetAllKnowledgeLogRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProjectid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f + ); + } + f = message.getPaginate(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_pb.Paginate.serializeBinaryToWriter + ); + } + f = message.getCriteriasList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + common_pb.Criteria.serializeBinaryToWriter + ); + } + f = message.getOrder(); + if (f != null) { + writer.writeMessage( + 5, + f, + common_pb.Ordering.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 projectId = 2; + * @return {string} + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.getProjectid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.GetAllKnowledgeLogRequest} returns this + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.setProjectid = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); +}; + + +/** + * optional Paginate paginate = 3; + * @return {?proto.Paginate} + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.getPaginate = function() { + return /** @type{?proto.Paginate} */ ( + jspb.Message.getWrapperField(this, common_pb.Paginate, 3)); +}; + + +/** + * @param {?proto.Paginate|undefined} value + * @return {!proto.knowledge_api.GetAllKnowledgeLogRequest} returns this +*/ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.setPaginate = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.GetAllKnowledgeLogRequest} returns this + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.clearPaginate = function() { + return this.setPaginate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.hasPaginate = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated Criteria criterias = 4; + * @return {!Array} + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.getCriteriasList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_pb.Criteria, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.knowledge_api.GetAllKnowledgeLogRequest} returns this +*/ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.setCriteriasList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.Criteria=} opt_value + * @param {number=} opt_index + * @return {!proto.Criteria} + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.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.knowledge_api.GetAllKnowledgeLogRequest} returns this + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.clearCriteriasList = function() { + return this.setCriteriasList([]); +}; + + +/** + * optional Ordering order = 5; + * @return {?proto.Ordering} + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.getOrder = function() { + return /** @type{?proto.Ordering} */ ( + jspb.Message.getWrapperField(this, common_pb.Ordering, 5)); +}; + + +/** + * @param {?proto.Ordering|undefined} value + * @return {!proto.knowledge_api.GetAllKnowledgeLogRequest} returns this +*/ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.setOrder = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.GetAllKnowledgeLogRequest} returns this + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.clearOrder = function() { + return this.setOrder(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.GetAllKnowledgeLogRequest.prototype.hasOrder = 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.knowledge_api.GetKnowledgeLogRequest.prototype.toObject = function(opt_includeInstance) { + return proto.knowledge_api.GetKnowledgeLogRequest.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.GetKnowledgeLogRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.GetKnowledgeLogRequest.toObject = function(includeInstance, msg) { + var f, obj = { + projectid: jspb.Message.getFieldWithDefault(msg, 2, "0"), + id: jspb.Message.getFieldWithDefault(msg, 3, "0") + }; + + 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.GetKnowledgeLogRequest} + */ +proto.knowledge_api.GetKnowledgeLogRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.knowledge_api.GetKnowledgeLogRequest; + return proto.knowledge_api.GetKnowledgeLogRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.knowledge_api.GetKnowledgeLogRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.knowledge_api.GetKnowledgeLogRequest} + */ +proto.knowledge_api.GetKnowledgeLogRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setProjectid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.knowledge_api.GetKnowledgeLogRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.knowledge_api.GetKnowledgeLogRequest.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.GetKnowledgeLogRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.GetKnowledgeLogRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProjectid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f + ); + } + f = message.getId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 3, + f + ); + } +}; + + +/** + * optional uint64 projectId = 2; + * @return {string} + */ +proto.knowledge_api.GetKnowledgeLogRequest.prototype.getProjectid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.GetKnowledgeLogRequest} returns this + */ +proto.knowledge_api.GetKnowledgeLogRequest.prototype.setProjectid = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); +}; + + +/** + * optional uint64 id = 3; + * @return {string} + */ +proto.knowledge_api.GetKnowledgeLogRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.GetKnowledgeLogRequest} returns this + */ +proto.knowledge_api.GetKnowledgeLogRequest.prototype.setId = 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} + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.toObject = function(opt_includeInstance) { + return proto.knowledge_api.GetKnowledgeLogResponse.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.GetKnowledgeLogResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.GetKnowledgeLogResponse.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()) && proto.knowledge_api.KnowledgeLog.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.knowledge_api.GetKnowledgeLogResponse} + */ +proto.knowledge_api.GetKnowledgeLogResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.knowledge_api.GetKnowledgeLogResponse; + return proto.knowledge_api.GetKnowledgeLogResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.knowledge_api.GetKnowledgeLogResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.knowledge_api.GetKnowledgeLogResponse} + */ +proto.knowledge_api.GetKnowledgeLogResponse.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.knowledge_api.KnowledgeLog; + reader.readMessage(value,proto.knowledge_api.KnowledgeLog.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.knowledge_api.GetKnowledgeLogResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.knowledge_api.GetKnowledgeLogResponse.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.GetKnowledgeLogResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.GetKnowledgeLogResponse.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, + proto.knowledge_api.KnowledgeLog.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_pb.Error.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.knowledge_api.GetKnowledgeLogResponse} returns this + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool success = 2; + * @return {boolean} + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.knowledge_api.GetKnowledgeLogResponse} returns this + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional KnowledgeLog data = 3; + * @return {?proto.knowledge_api.KnowledgeLog} + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.getData = function() { + return /** @type{?proto.knowledge_api.KnowledgeLog} */ ( + jspb.Message.getWrapperField(this, proto.knowledge_api.KnowledgeLog, 3)); +}; + + +/** + * @param {?proto.knowledge_api.KnowledgeLog|undefined} value + * @return {!proto.knowledge_api.GetKnowledgeLogResponse} returns this +*/ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.GetKnowledgeLogResponse} returns this + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.hasData = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Error error = 4; + * @return {?proto.Error} + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, common_pb.Error, 4)); +}; + + +/** + * @param {?proto.Error|undefined} value + * @return {!proto.knowledge_api.GetKnowledgeLogResponse} returns this +*/ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.GetKnowledgeLogResponse} returns this + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.GetKnowledgeLogResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.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.knowledge_api.GetAllKnowledgeLogResponse.prototype.toObject = function(opt_includeInstance) { + return proto.knowledge_api.GetAllKnowledgeLogResponse.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.GetAllKnowledgeLogResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.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.knowledge_api.KnowledgeLog.toObject, includeInstance), + error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f), + paginated: (f = msg.getPaginated()) && common_pb.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.knowledge_api.GetAllKnowledgeLogResponse} + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.knowledge_api.GetAllKnowledgeLogResponse; + return proto.knowledge_api.GetAllKnowledgeLogResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.knowledge_api.GetAllKnowledgeLogResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.knowledge_api.GetAllKnowledgeLogResponse} + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.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.knowledge_api.KnowledgeLog; + reader.readMessage(value,proto.knowledge_api.KnowledgeLog.deserializeBinaryFromReader); + msg.addData(value); + break; + case 4: + var value = new common_pb.Error; + reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); + msg.setError(value); + break; + case 5: + var value = new common_pb.Paginated; + reader.readMessage(value,common_pb.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.knowledge_api.GetAllKnowledgeLogResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.knowledge_api.GetAllKnowledgeLogResponse.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.GetAllKnowledgeLogResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.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.knowledge_api.KnowledgeLog.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_pb.Error.serializeBinaryToWriter + ); + } + f = message.getPaginated(); + if (f != null) { + writer.writeMessage( + 5, + f, + common_pb.Paginated.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.knowledge_api.GetAllKnowledgeLogResponse} returns this + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool success = 2; + * @return {boolean} + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.knowledge_api.GetAllKnowledgeLogResponse} returns this + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * repeated KnowledgeLog data = 3; + * @return {!Array} + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.getDataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.knowledge_api.KnowledgeLog, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.knowledge_api.GetAllKnowledgeLogResponse} returns this +*/ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.setDataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.knowledge_api.KnowledgeLog=} opt_value + * @param {number=} opt_index + * @return {!proto.knowledge_api.KnowledgeLog} + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.addData = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.knowledge_api.KnowledgeLog, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.knowledge_api.GetAllKnowledgeLogResponse} returns this + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.clearDataList = function() { + return this.setDataList([]); +}; + + +/** + * optional Error error = 4; + * @return {?proto.Error} + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, common_pb.Error, 4)); +}; + + +/** + * @param {?proto.Error|undefined} value + * @return {!proto.knowledge_api.GetAllKnowledgeLogResponse} returns this +*/ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.GetAllKnowledgeLogResponse} returns this + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Paginated paginated = 5; + * @return {?proto.Paginated} + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.getPaginated = function() { + return /** @type{?proto.Paginated} */ ( + jspb.Message.getWrapperField(this, common_pb.Paginated, 5)); +}; + + +/** + * @param {?proto.Paginated|undefined} value + * @return {!proto.knowledge_api.GetAllKnowledgeLogResponse} returns this +*/ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.setPaginated = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.GetAllKnowledgeLogResponse} returns this + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.prototype.clearPaginated = function() { + return this.setPaginated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.GetAllKnowledgeLogResponse.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.knowledge_api.KnowledgeLog.prototype.toObject = function(opt_includeInstance) { + return proto.knowledge_api.KnowledgeLog.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.KnowledgeLog} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.KnowledgeLog.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "0"), + action: (f = msg.getAction()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + request: (f = msg.getRequest()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + response: (f = msg.getResponse()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + status: jspb.Message.getFieldWithDefault(msg, 5, ""), + createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + knowledgeid: jspb.Message.getFieldWithDefault(msg, 8, "0"), + projectid: jspb.Message.getFieldWithDefault(msg, 9, "0"), + organizationid: jspb.Message.getFieldWithDefault(msg, 10, "0"), + topk: jspb.Message.getFieldWithDefault(msg, 11, 0), + scorethreshold: jspb.Message.getFloatingPointFieldWithDefault(msg, 12, 0.0), + documentcount: jspb.Message.getFieldWithDefault(msg, 13, 0), + assetprefix: jspb.Message.getFieldWithDefault(msg, 14, ""), + retrievalmethod: jspb.Message.getFieldWithDefault(msg, 15, ""), + timetaken: jspb.Message.getFieldWithDefault(msg, 16, "0"), + additionaldataMap: (f = msg.getAdditionaldataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + 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.KnowledgeLog} + */ +proto.knowledge_api.KnowledgeLog.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.knowledge_api.KnowledgeLog; + return proto.knowledge_api.KnowledgeLog.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.knowledge_api.KnowledgeLog} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.knowledge_api.KnowledgeLog} + */ +proto.knowledge_api.KnowledgeLog.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 2: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setAction(value); + break; + case 3: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setRequest(value); + break; + case 4: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setResponse(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(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; + case 8: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setKnowledgeid(value); + break; + case 9: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setProjectid(value); + break; + case 10: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setOrganizationid(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTopk(value); + break; + case 12: + var value = /** @type {number} */ (reader.readFloat()); + msg.setScorethreshold(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint32()); + msg.setDocumentcount(value); + break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setAssetprefix(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setRetrievalmethod(value); + break; + case 16: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setTimetaken(value); + break; + case 17: + var value = msg.getAdditionaldataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.knowledge_api.KnowledgeLog.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.knowledge_api.KnowledgeLog.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.KnowledgeLog} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.KnowledgeLog.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getAction(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getResponse(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCreateddate(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUpdateddate(); + if (f != null) { + writer.writeMessage( + 7, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getKnowledgeid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 8, + f + ); + } + f = message.getProjectid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 9, + f + ); + } + f = message.getOrganizationid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 10, + f + ); + } + f = message.getTopk(); + if (f !== 0) { + writer.writeUint32( + 11, + f + ); + } + f = message.getScorethreshold(); + if (f !== 0.0) { + writer.writeFloat( + 12, + f + ); + } + f = message.getDocumentcount(); + if (f !== 0) { + writer.writeUint32( + 13, + f + ); + } + f = message.getAssetprefix(); + if (f.length > 0) { + writer.writeString( + 14, + f + ); + } + f = message.getRetrievalmethod(); + if (f.length > 0) { + writer.writeString( + 15, + f + ); + } + f = message.getTimetaken(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 16, + f + ); + } + f = message.getAdditionaldataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(17, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional uint64 id = 1; + * @return {string} + */ +proto.knowledge_api.KnowledgeLog.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setId = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct action = 2; + * @return {?proto.google.protobuf.Struct} + */ +proto.knowledge_api.KnowledgeLog.prototype.getAction = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this +*/ +proto.knowledge_api.KnowledgeLog.prototype.setAction = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.clearAction = function() { + return this.setAction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.KnowledgeLog.prototype.hasAction = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Struct request = 3; + * @return {?proto.google.protobuf.Struct} + */ +proto.knowledge_api.KnowledgeLog.prototype.getRequest = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this +*/ +proto.knowledge_api.KnowledgeLog.prototype.setRequest = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.clearRequest = function() { + return this.setRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.KnowledgeLog.prototype.hasRequest = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Struct response = 4; + * @return {?proto.google.protobuf.Struct} + */ +proto.knowledge_api.KnowledgeLog.prototype.getResponse = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this +*/ +proto.knowledge_api.KnowledgeLog.prototype.setResponse = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.clearResponse = function() { + return this.setResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.KnowledgeLog.prototype.hasResponse = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string status = 5; + * @return {string} + */ +proto.knowledge_api.KnowledgeLog.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setStatus = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional google.protobuf.Timestamp createdDate = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.knowledge_api.KnowledgeLog.prototype.getCreateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this +*/ +proto.knowledge_api.KnowledgeLog.prototype.setCreateddate = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.clearCreateddate = function() { + return this.setCreateddate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.KnowledgeLog.prototype.hasCreateddate = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional google.protobuf.Timestamp updatedDate = 7; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.knowledge_api.KnowledgeLog.prototype.getUpdateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this +*/ +proto.knowledge_api.KnowledgeLog.prototype.setUpdateddate = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.clearUpdateddate = function() { + return this.setUpdateddate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.KnowledgeLog.prototype.hasUpdateddate = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional uint64 knowledgeId = 8; + * @return {string} + */ +proto.knowledge_api.KnowledgeLog.prototype.getKnowledgeid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setKnowledgeid = function(value) { + return jspb.Message.setProto3StringIntField(this, 8, value); +}; + + +/** + * optional uint64 projectId = 9; + * @return {string} + */ +proto.knowledge_api.KnowledgeLog.prototype.getProjectid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setProjectid = function(value) { + return jspb.Message.setProto3StringIntField(this, 9, value); +}; + + +/** + * optional uint64 organizationId = 10; + * @return {string} + */ +proto.knowledge_api.KnowledgeLog.prototype.getOrganizationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setOrganizationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 10, value); +}; + + +/** + * optional uint32 topK = 11; + * @return {number} + */ +proto.knowledge_api.KnowledgeLog.prototype.getTopk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setTopk = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional float scoreThreshold = 12; + * @return {number} + */ +proto.knowledge_api.KnowledgeLog.prototype.getScorethreshold = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 12, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setScorethreshold = function(value) { + return jspb.Message.setProto3FloatField(this, 12, value); +}; + + +/** + * optional uint32 documentCount = 13; + * @return {number} + */ +proto.knowledge_api.KnowledgeLog.prototype.getDocumentcount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setDocumentcount = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional string assetPrefix = 14; + * @return {string} + */ +proto.knowledge_api.KnowledgeLog.prototype.getAssetprefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setAssetprefix = function(value) { + return jspb.Message.setProto3StringField(this, 14, value); +}; + + +/** + * optional string retrievalMethod = 15; + * @return {string} + */ +proto.knowledge_api.KnowledgeLog.prototype.getRetrievalmethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setRetrievalmethod = function(value) { + return jspb.Message.setProto3StringField(this, 15, value); +}; + + +/** + * optional uint64 timeTaken = 16; + * @return {string} + */ +proto.knowledge_api.KnowledgeLog.prototype.getTimetaken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.setTimetaken = function(value) { + return jspb.Message.setProto3StringIntField(this, 16, value); +}; + + +/** + * map additionalData = 17; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.knowledge_api.KnowledgeLog.prototype.getAdditionaldataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 17, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.knowledge_api.KnowledgeLog} returns this + */ +proto.knowledge_api.KnowledgeLog.prototype.clearAdditionaldataMap = function() { + this.getAdditionaldataMap().clear(); + return this;}; + + goog.object.extend(exports, proto.knowledge_api); diff --git a/src/clients/protos/marketplace-api.ts b/src/clients/protos/marketplace-api.ts new file mode 100644 index 0000000..420ea28 --- /dev/null +++ b/src/clients/protos/marketplace-api.ts @@ -0,0 +1,790 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: marketplace-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./google/protobuf/struct"; +import * as dependency_3 from "./common"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace marketplace_api { + export class GetAllDeploymentRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_3.Paginate; + criterias?: dependency_3.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_3.Paginate, 1) as dependency_3.Paginate; + } + set paginate(value: dependency_3.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Criteria, 2) as dependency_3.Criteria[]; + } + set criterias(value: dependency_3.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllDeploymentRequest { + const message = new GetAllDeploymentRequest({}); + if (data.paginate != null) { + message.paginate = dependency_3.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_3.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_3.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_3.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllDeploymentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllDeploymentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_3.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.Criteria.deserialize(reader), dependency_3.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllDeploymentRequest { + return GetAllDeploymentRequest.deserialize(bytes); + } + } + export class SearchableDeployment extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + status?: string; + visibility?: string; + type?: string; + projectId?: string; + organizationId?: string; + tag?: string[]; + language?: string; + organization?: dependency_3.Organization; + name?: string; + description?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + appAppearance?: dependency_2.google.protobuf.Struct; + webAppearance?: dependency_2.google.protobuf.Struct; + modelProviderId?: string; + modelProviderName?: string; + modelOptions?: dependency_3.Metadata[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [14, 12], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("visibility" in data && data.visibility != undefined) { + this.visibility = data.visibility; + } + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("tag" in data && data.tag != undefined) { + this.tag = data.tag; + } + if ("language" in data && data.language != undefined) { + this.language = data.language; + } + if ("organization" in data && data.organization != undefined) { + this.organization = data.organization; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("appAppearance" in data && data.appAppearance != undefined) { + this.appAppearance = data.appAppearance; + } + if ("webAppearance" in data && data.webAppearance != undefined) { + this.webAppearance = data.webAppearance; + } + if ("modelProviderId" in data && data.modelProviderId != undefined) { + this.modelProviderId = data.modelProviderId; + } + if ("modelProviderName" in data && data.modelProviderName != undefined) { + this.modelProviderName = data.modelProviderName; + } + if ("modelOptions" in data && data.modelOptions != undefined) { + this.modelOptions = data.modelOptions; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 2, value); + } + get visibility() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set visibility(value: string) { + pb_1.Message.setField(this, 3, value); + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set type(value: string) { + pb_1.Message.setField(this, 4, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 7, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 8, value); + } + get tag() { + return pb_1.Message.getFieldWithDefault(this, 14, []) as string[]; + } + set tag(value: string[]) { + pb_1.Message.setField(this, 14, value); + } + get language() { + return pb_1.Message.getFieldWithDefault(this, 16, "") as string; + } + set language(value: string) { + pb_1.Message.setField(this, 16, value); + } + get organization() { + return pb_1.Message.getWrapperField(this, dependency_3.Organization, 17) as dependency_3.Organization; + } + set organization(value: dependency_3.Organization) { + pb_1.Message.setWrapperField(this, 17, value); + } + get has_organization() { + return pb_1.Message.getField(this, 17) != null; + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 18, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 18, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 19, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 19, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 20) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 20, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 20) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 21) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 21, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 21) != null; + } + get appAppearance() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Struct, 24) as dependency_2.google.protobuf.Struct; + } + set appAppearance(value: dependency_2.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 24, value); + } + get has_appAppearance() { + return pb_1.Message.getField(this, 24) != null; + } + get webAppearance() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Struct, 25) as dependency_2.google.protobuf.Struct; + } + set webAppearance(value: dependency_2.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 25, value); + } + get has_webAppearance() { + return pb_1.Message.getField(this, 25) != null; + } + get modelProviderId() { + return pb_1.Message.getFieldWithDefault(this, 26, "0") as string; + } + set modelProviderId(value: string) { + pb_1.Message.setField(this, 26, value); + } + get modelProviderName() { + return pb_1.Message.getFieldWithDefault(this, 27, "") as string; + } + set modelProviderName(value: string) { + pb_1.Message.setField(this, 27, value); + } + get modelOptions() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Metadata, 12) as dependency_3.Metadata[]; + } + set modelOptions(value: dependency_3.Metadata[]) { + pb_1.Message.setRepeatedWrapperField(this, 12, value); + } + static fromObject(data: { + id?: string; + status?: string; + visibility?: string; + type?: string; + projectId?: string; + organizationId?: string; + tag?: string[]; + language?: string; + organization?: ReturnType; + name?: string; + description?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + appAppearance?: ReturnType; + webAppearance?: ReturnType; + modelProviderId?: string; + modelProviderName?: string; + modelOptions?: ReturnType[]; + }): SearchableDeployment { + const message = new SearchableDeployment({}); + if (data.id != null) { + message.id = data.id; + } + if (data.status != null) { + message.status = data.status; + } + if (data.visibility != null) { + message.visibility = data.visibility; + } + if (data.type != null) { + message.type = data.type; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.tag != null) { + message.tag = data.tag; + } + if (data.language != null) { + message.language = data.language; + } + if (data.organization != null) { + message.organization = dependency_3.Organization.fromObject(data.organization); + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.appAppearance != null) { + message.appAppearance = dependency_2.google.protobuf.Struct.fromObject(data.appAppearance); + } + if (data.webAppearance != null) { + message.webAppearance = dependency_2.google.protobuf.Struct.fromObject(data.webAppearance); + } + if (data.modelProviderId != null) { + message.modelProviderId = data.modelProviderId; + } + if (data.modelProviderName != null) { + message.modelProviderName = data.modelProviderName; + } + if (data.modelOptions != null) { + message.modelOptions = data.modelOptions.map(item => dependency_3.Metadata.fromObject(item)); + } + return message; + } + toObject() { + const data: { + id?: string; + status?: string; + visibility?: string; + type?: string; + projectId?: string; + organizationId?: string; + tag?: string[]; + language?: string; + organization?: ReturnType; + name?: string; + description?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + appAppearance?: ReturnType; + webAppearance?: ReturnType; + modelProviderId?: string; + modelProviderName?: string; + modelOptions?: ReturnType[]; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.status != null) { + data.status = this.status; + } + if (this.visibility != null) { + data.visibility = this.visibility; + } + if (this.type != null) { + data.type = this.type; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.tag != null) { + data.tag = this.tag; + } + if (this.language != null) { + data.language = this.language; + } + if (this.organization != null) { + data.organization = this.organization.toObject(); + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.appAppearance != null) { + data.appAppearance = this.appAppearance.toObject(); + } + if (this.webAppearance != null) { + data.webAppearance = this.webAppearance.toObject(); + } + if (this.modelProviderId != null) { + data.modelProviderId = this.modelProviderId; + } + if (this.modelProviderName != null) { + data.modelProviderName = this.modelProviderName; + } + if (this.modelOptions != null) { + data.modelOptions = this.modelOptions.map((item: dependency_3.Metadata) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id.length) + writer.writeString(1, this.id); + if (this.status.length) + writer.writeString(2, this.status); + if (this.visibility.length) + writer.writeString(3, this.visibility); + if (this.type.length) + writer.writeString(4, this.type); + if (this.projectId.length) + writer.writeString(7, this.projectId); + if (this.organizationId.length) + writer.writeString(8, this.organizationId); + if (this.tag.length) + writer.writeRepeatedString(14, this.tag); + if (this.language.length) + writer.writeString(16, this.language); + if (this.has_organization) + writer.writeMessage(17, this.organization, () => this.organization.serialize(writer)); + if (this.name.length) + writer.writeString(18, this.name); + if (this.description.length) + writer.writeString(19, this.description); + if (this.has_createdDate) + writer.writeMessage(20, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(21, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.has_appAppearance) + writer.writeMessage(24, this.appAppearance, () => this.appAppearance.serialize(writer)); + if (this.has_webAppearance) + writer.writeMessage(25, this.webAppearance, () => this.webAppearance.serialize(writer)); + if (this.modelProviderId != "0") + writer.writeUint64String(26, this.modelProviderId); + if (this.modelProviderName.length) + writer.writeString(27, this.modelProviderName); + if (this.modelOptions.length) + writer.writeRepeatedMessage(12, this.modelOptions, (item: dependency_3.Metadata) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SearchableDeployment { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SearchableDeployment(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readString(); + break; + case 2: + message.status = reader.readString(); + break; + case 3: + message.visibility = reader.readString(); + break; + case 4: + message.type = reader.readString(); + break; + case 7: + message.projectId = reader.readString(); + break; + case 8: + message.organizationId = reader.readString(); + break; + case 14: + pb_1.Message.addToRepeatedField(message, 14, reader.readString()); + break; + case 16: + message.language = reader.readString(); + break; + case 17: + reader.readMessage(message.organization, () => message.organization = dependency_3.Organization.deserialize(reader)); + break; + case 18: + message.name = reader.readString(); + break; + case 19: + message.description = reader.readString(); + break; + case 20: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 21: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 24: + reader.readMessage(message.appAppearance, () => message.appAppearance = dependency_2.google.protobuf.Struct.deserialize(reader)); + break; + case 25: + reader.readMessage(message.webAppearance, () => message.webAppearance = dependency_2.google.protobuf.Struct.deserialize(reader)); + break; + case 26: + message.modelProviderId = reader.readUint64String(); + break; + case 27: + message.modelProviderName = reader.readString(); + break; + case 12: + reader.readMessage(message.modelOptions, () => pb_1.Message.addToRepeatedWrapperField(message, 12, dependency_3.Metadata.deserialize(reader), dependency_3.Metadata)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SearchableDeployment { + return SearchableDeployment.deserialize(bytes); + } + } + export class GetAllDeploymentResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: SearchableDeployment[]; + error?: dependency_3.Error; + paginated?: dependency_3.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, SearchableDeployment, 3) as SearchableDeployment[]; + } + set data(value: SearchableDeployment[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_3.Paginated, 5) as dependency_3.Paginated; + } + set paginated(value: dependency_3.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllDeploymentResponse { + const message = new GetAllDeploymentResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => SearchableDeployment.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_3.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: SearchableDeployment) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: SearchableDeployment) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllDeploymentResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllDeploymentResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, SearchableDeployment.deserialize(reader), SearchableDeployment)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_3.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllDeploymentResponse { + return GetAllDeploymentResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedMarketplaceServiceService { + static definition = { + GetAllDeployment: { + path: "/marketplace_api.MarketplaceService/GetAllDeployment", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllDeploymentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllDeploymentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllDeploymentResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllDeploymentResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GetAllDeployment(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class MarketplaceServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedMarketplaceServiceService.definition, "MarketplaceService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GetAllDeployment: GrpcUnaryServiceInterface = (message: GetAllDeploymentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllDeployment(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/marketplace-api_grpc_pb.d.ts b/src/clients/protos/marketplace-api_grpc_pb.d.ts deleted file mode 100644 index 751efd3..0000000 --- a/src/clients/protos/marketplace-api_grpc_pb.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: marketplace_api -// file: marketplace-api.proto - -import * as marketplace_api_pb from "./marketplace-api_pb"; -import * as grpc from "grpc"; - -interface IMarketplaceServiceService extends grpc.ServiceDefinition { - getAllDeployment: grpc.MethodDefinition; -} - -export const MarketplaceServiceService: IMarketplaceServiceService; - -export interface IMarketplaceServiceServer extends grpc.UntypedServiceImplementation { - getAllDeployment: grpc.handleUnaryCall; -} - -export class MarketplaceServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - getAllDeployment(argument: marketplace_api_pb.GetAllDeploymentRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllDeployment(argument: marketplace_api_pb.GetAllDeploymentRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllDeployment(argument: marketplace_api_pb.GetAllDeploymentRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/marketplace-api_pb.d.ts b/src/clients/protos/marketplace-api_pb.d.ts deleted file mode 100644 index ebca6b8..0000000 --- a/src/clients/protos/marketplace-api_pb.d.ts +++ /dev/null @@ -1,180 +0,0 @@ -// package: marketplace_api -// file: marketplace-api.proto - -import * as jspb from "google-protobuf"; -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"; -import * as common_pb from "./common_pb"; - -export class GetAllDeploymentRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllDeploymentRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllDeploymentRequest): GetAllDeploymentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllDeploymentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllDeploymentRequest; - static deserializeBinaryFromReader(message: GetAllDeploymentRequest, reader: jspb.BinaryReader): GetAllDeploymentRequest; -} - -export namespace GetAllDeploymentRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class SearchableDeployment extends jspb.Message { - getId(): string; - setId(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - getVisibility(): string; - setVisibility(value: string): void; - - getType(): string; - setType(value: string): void; - - getProjectid(): string; - setProjectid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - clearTagList(): void; - getTagList(): Array; - setTagList(value: Array): void; - addTag(value: string, index?: number): string; - - getLanguage(): string; - setLanguage(value: string): void; - - hasOrganization(): boolean; - clearOrganization(): void; - getOrganization(): common_pb.Organization | undefined; - setOrganization(value?: common_pb.Organization): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasAppappearance(): boolean; - clearAppappearance(): void; - getAppappearance(): google_protobuf_struct_pb.Struct | undefined; - setAppappearance(value?: google_protobuf_struct_pb.Struct): void; - - hasWebappearance(): boolean; - clearWebappearance(): void; - getWebappearance(): google_protobuf_struct_pb.Struct | undefined; - setWebappearance(value?: google_protobuf_struct_pb.Struct): void; - - getModelproviderid(): string; - setModelproviderid(value: string): void; - - getModelprovidername(): string; - setModelprovidername(value: string): void; - - clearModeloptionsList(): void; - getModeloptionsList(): Array; - setModeloptionsList(value: Array): void; - addModeloptions(value?: common_pb.Metadata, index?: number): common_pb.Metadata; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SearchableDeployment.AsObject; - static toObject(includeInstance: boolean, msg: SearchableDeployment): SearchableDeployment.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SearchableDeployment, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SearchableDeployment; - static deserializeBinaryFromReader(message: SearchableDeployment, reader: jspb.BinaryReader): SearchableDeployment; -} - -export namespace SearchableDeployment { - export type AsObject = { - id: string, - status: string, - visibility: string, - type: string, - projectid: string, - organizationid: string, - tagList: Array, - language: string, - organization?: common_pb.Organization.AsObject, - name: string, - description: string, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - appappearance?: google_protobuf_struct_pb.Struct.AsObject, - webappearance?: google_protobuf_struct_pb.Struct.AsObject, - modelproviderid: string, - modelprovidername: string, - modeloptionsList: Array, - } -} - -export class GetAllDeploymentResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: SearchableDeployment, index?: number): SearchableDeployment; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllDeploymentResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllDeploymentResponse): GetAllDeploymentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllDeploymentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllDeploymentResponse; - static deserializeBinaryFromReader(message: GetAllDeploymentResponse, reader: jspb.BinaryReader): GetAllDeploymentResponse; -} - -export namespace GetAllDeploymentResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - diff --git a/src/clients/protos/provider-api.ts b/src/clients/protos/provider-api.ts new file mode 100644 index 0000000..eb83226 --- /dev/null +++ b/src/clients/protos/provider-api.ts @@ -0,0 +1,726 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: provider-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./common"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace provider_api { + export class GetAllModelProviderRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_1.Paginate; + criterias?: dependency_1.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_1.Paginate, 1) as dependency_1.Paginate; + } + set paginate(value: dependency_1.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.Criteria, 2) as dependency_1.Criteria[]; + } + set criterias(value: dependency_1.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllModelProviderRequest { + const message = new GetAllModelProviderRequest({}); + if (data.paginate != null) { + message.paginate = dependency_1.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_1.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_1.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_1.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllModelProviderRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllModelProviderRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_1.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.Criteria.deserialize(reader), dependency_1.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllModelProviderRequest { + return GetAllModelProviderRequest.deserialize(bytes); + } + } + export class GetAllModelProviderResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_1.Provider[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.Provider, 3) as dependency_1.Provider[]; + } + set data(value: dependency_1.Provider[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + }): GetAllModelProviderResponse { + const message = new GetAllModelProviderResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_1.Provider.fromObject(item)); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_1.Provider) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_1.Provider) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllModelProviderResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllModelProviderResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_1.Provider.deserialize(reader), dependency_1.Provider)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllModelProviderResponse { + return GetAllModelProviderResponse.deserialize(bytes); + } + } + export class ToolProvider extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + description?: string; + image?: string; + feature?: string[]; + connectConfiguration?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("image" in data && data.image != undefined) { + this.image = data.image; + } + if ("feature" in data && data.feature != undefined) { + this.feature = data.feature; + } + if ("connectConfiguration" in data && data.connectConfiguration != undefined) { + this.connectConfiguration = data.connectConfiguration; + } + } + if (!this.connectConfiguration) + this.connectConfiguration = new Map(); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get image() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set image(value: string) { + pb_1.Message.setField(this, 4, value); + } + get feature() { + return pb_1.Message.getFieldWithDefault(this, 5, []) as string[]; + } + set feature(value: string[]) { + pb_1.Message.setField(this, 5, value); + } + get connectConfiguration() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set connectConfiguration(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + static fromObject(data: { + id?: string; + name?: string; + description?: string; + image?: string; + feature?: string[]; + connectConfiguration?: { + [key: string]: string; + }; + }): ToolProvider { + const message = new ToolProvider({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.image != null) { + message.image = data.image; + } + if (data.feature != null) { + message.feature = data.feature; + } + if (typeof data.connectConfiguration == "object") { + message.connectConfiguration = new Map(Object.entries(data.connectConfiguration)); + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + description?: string; + image?: string; + feature?: string[]; + connectConfiguration?: { + [key: string]: string; + }; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.image != null) { + data.image = this.image; + } + if (this.feature != null) { + data.feature = this.feature; + } + if (this.connectConfiguration != null) { + data.connectConfiguration = (Object.fromEntries)(this.connectConfiguration); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.image.length) + writer.writeString(4, this.image); + if (this.feature.length) + writer.writeRepeatedString(5, this.feature); + for (const [key, value] of this.connectConfiguration) { + writer.writeMessage(6, this.connectConfiguration, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ToolProvider { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ToolProvider(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.image = reader.readString(); + break; + case 5: + pb_1.Message.addToRepeatedField(message, 5, reader.readString()); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.connectConfiguration as any, reader, reader.readString, reader.readString)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ToolProvider { + return ToolProvider.deserialize(bytes); + } + } + export class GetAllToolProviderRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_1.Paginate; + criterias?: dependency_1.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_1.Paginate, 1) as dependency_1.Paginate; + } + set paginate(value: dependency_1.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_1.Criteria, 2) as dependency_1.Criteria[]; + } + set criterias(value: dependency_1.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllToolProviderRequest { + const message = new GetAllToolProviderRequest({}); + if (data.paginate != null) { + message.paginate = dependency_1.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_1.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_1.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_1.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllToolProviderRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllToolProviderRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_1.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.Criteria.deserialize(reader), dependency_1.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllToolProviderRequest { + return GetAllToolProviderRequest.deserialize(bytes); + } + } + export class GetAllToolProviderResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: ToolProvider[]; + error?: dependency_1.Error; + paginated?: dependency_1.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, ToolProvider, 3) as ToolProvider[]; + } + set data(value: ToolProvider[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_1.Error, 4) as dependency_1.Error; + } + set error(value: dependency_1.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_1.Paginated, 5) as dependency_1.Paginated; + } + set paginated(value: dependency_1.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllToolProviderResponse { + const message = new GetAllToolProviderResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => ToolProvider.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_1.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_1.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: ToolProvider) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: ToolProvider) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllToolProviderResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllToolProviderResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, ToolProvider.deserialize(reader), ToolProvider)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_1.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_1.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllToolProviderResponse { + return GetAllToolProviderResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedProviderServiceService { + static definition = { + GetAllToolProvider: { + path: "/provider_api.ProviderService/GetAllToolProvider", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllToolProviderRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllToolProviderRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllToolProviderResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllToolProviderResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllModelProvider: { + path: "/provider_api.ProviderService/GetAllModelProvider", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllModelProviderRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllModelProviderRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllModelProviderResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllModelProviderResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GetAllToolProvider(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllModelProvider(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ProviderServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedProviderServiceService.definition, "ProviderService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GetAllToolProvider: GrpcUnaryServiceInterface = (message: GetAllToolProviderRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllToolProvider(message, metadata, options, callback); + }; + GetAllModelProvider: GrpcUnaryServiceInterface = (message: GetAllModelProviderRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllModelProvider(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/provider-api_grpc_pb.d.ts b/src/clients/protos/provider-api_grpc_pb.d.ts deleted file mode 100644 index e4e2a92..0000000 --- a/src/clients/protos/provider-api_grpc_pb.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: provider_api -// file: provider-api.proto - -import * as provider_api_pb from "./provider-api_pb"; -import * as grpc from "grpc"; - -interface IProviderServiceService extends grpc.ServiceDefinition { - getAllToolProvider: grpc.MethodDefinition; - getAllModelProvider: grpc.MethodDefinition; -} - -export const ProviderServiceService: IProviderServiceService; - -export interface IProviderServiceServer extends grpc.UntypedServiceImplementation { - getAllToolProvider: grpc.handleUnaryCall; - getAllModelProvider: grpc.handleUnaryCall; -} - -export class ProviderServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - getAllToolProvider(argument: provider_api_pb.GetAllToolProviderRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllToolProvider(argument: provider_api_pb.GetAllToolProviderRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllToolProvider(argument: provider_api_pb.GetAllToolProviderRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllModelProvider(argument: provider_api_pb.GetAllModelProviderRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllModelProvider(argument: provider_api_pb.GetAllModelProviderRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllModelProvider(argument: provider_api_pb.GetAllModelProviderRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/provider-api_pb.d.ts b/src/clients/protos/provider-api_pb.d.ts deleted file mode 100644 index 9812bb1..0000000 --- a/src/clients/protos/provider-api_pb.d.ts +++ /dev/null @@ -1,175 +0,0 @@ -// package: provider_api -// file: provider-api.proto - -import * as jspb from "google-protobuf"; -import * as common_pb from "./common_pb"; - -export class GetAllModelProviderRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllModelProviderRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllModelProviderRequest): GetAllModelProviderRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllModelProviderRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllModelProviderRequest; - static deserializeBinaryFromReader(message: GetAllModelProviderRequest, reader: jspb.BinaryReader): GetAllModelProviderRequest; -} - -export namespace GetAllModelProviderRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllModelProviderResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.Provider, index?: number): common_pb.Provider; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllModelProviderResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllModelProviderResponse): GetAllModelProviderResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllModelProviderResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllModelProviderResponse; - static deserializeBinaryFromReader(message: GetAllModelProviderResponse, reader: jspb.BinaryReader): GetAllModelProviderResponse; -} - -export namespace GetAllModelProviderResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - } -} - -export class ToolProvider extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - getImage(): string; - setImage(value: string): void; - - clearFeatureList(): void; - getFeatureList(): Array; - setFeatureList(value: Array): void; - addFeature(value: string, index?: number): string; - - getConnectconfigurationMap(): jspb.Map; - clearConnectconfigurationMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ToolProvider.AsObject; - static toObject(includeInstance: boolean, msg: ToolProvider): ToolProvider.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ToolProvider, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ToolProvider; - static deserializeBinaryFromReader(message: ToolProvider, reader: jspb.BinaryReader): ToolProvider; -} - -export namespace ToolProvider { - export type AsObject = { - id: string, - name: string, - description: string, - image: string, - featureList: Array, - connectconfigurationMap: Array<[string, string]>, - } -} - -export class GetAllToolProviderRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllToolProviderRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllToolProviderRequest): GetAllToolProviderRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllToolProviderRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllToolProviderRequest; - static deserializeBinaryFromReader(message: GetAllToolProviderRequest, reader: jspb.BinaryReader): GetAllToolProviderRequest; -} - -export namespace GetAllToolProviderRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllToolProviderResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: ToolProvider, index?: number): ToolProvider; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllToolProviderResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllToolProviderResponse): GetAllToolProviderResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllToolProviderResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllToolProviderResponse; - static deserializeBinaryFromReader(message: GetAllToolProviderResponse, reader: jspb.BinaryReader): GetAllToolProviderResponse; -} - -export namespace GetAllToolProviderResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - diff --git a/src/clients/protos/sendgrid-api.ts b/src/clients/protos/sendgrid-api.ts new file mode 100644 index 0000000..39e425f --- /dev/null +++ b/src/clients/protos/sendgrid-api.ts @@ -0,0 +1,813 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: sendgrid-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace integration_api { + export class Contact extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + email?: string; + name?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("email" in data && data.email != undefined) { + this.email = data.email; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + } + } + get email() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set email(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + email?: string; + name?: string; + }): Contact { + const message = new Contact({}); + if (data.email != null) { + message.email = data.email; + } + if (data.name != null) { + message.name = data.name; + } + return message; + } + toObject() { + const data: { + email?: string; + name?: string; + } = {}; + if (this.email != null) { + data.email = this.email; + } + if (this.name != null) { + data.name = this.name; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.email.length) + writer.writeString(1, this.email); + if (this.name.length) + writer.writeString(2, this.name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Contact { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Contact(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.email = reader.readString(); + break; + case 2: + message.name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Contact { + return Contact.deserialize(bytes); + } + } + export class WelcomeEmailRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + userId?: number; + to?: Contact; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("userId" in data && data.userId != undefined) { + this.userId = data.userId; + } + if ("to" in data && data.to != undefined) { + this.to = data.to; + } + } + } + get userId() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set userId(value: number) { + pb_1.Message.setField(this, 1, value); + } + get to() { + return pb_1.Message.getWrapperField(this, Contact, 2) as Contact; + } + set to(value: Contact) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_to() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + userId?: number; + to?: ReturnType; + }): WelcomeEmailRequest { + const message = new WelcomeEmailRequest({}); + if (data.userId != null) { + message.userId = data.userId; + } + if (data.to != null) { + message.to = Contact.fromObject(data.to); + } + return message; + } + toObject() { + const data: { + userId?: number; + to?: ReturnType; + } = {}; + if (this.userId != null) { + data.userId = this.userId; + } + if (this.to != null) { + data.to = this.to.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.userId != 0) + writer.writeUint64(1, this.userId); + if (this.has_to) + writer.writeMessage(2, this.to, () => this.to.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WelcomeEmailRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WelcomeEmailRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.userId = reader.readUint64(); + break; + case 2: + reader.readMessage(message.to, () => message.to = Contact.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WelcomeEmailRequest { + return WelcomeEmailRequest.deserialize(bytes); + } + } + export class WelcomeEmailResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + code?: number; + success?: boolean; + }): WelcomeEmailResponse { + const message = new WelcomeEmailResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WelcomeEmailResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WelcomeEmailResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WelcomeEmailResponse { + return WelcomeEmailResponse.deserialize(bytes); + } + } + export class ResetPasswordEmailRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + userId?: number; + to?: Contact; + resetPasswordLink?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("userId" in data && data.userId != undefined) { + this.userId = data.userId; + } + if ("to" in data && data.to != undefined) { + this.to = data.to; + } + if ("resetPasswordLink" in data && data.resetPasswordLink != undefined) { + this.resetPasswordLink = data.resetPasswordLink; + } + } + } + get userId() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set userId(value: number) { + pb_1.Message.setField(this, 1, value); + } + get to() { + return pb_1.Message.getWrapperField(this, Contact, 2) as Contact; + } + set to(value: Contact) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_to() { + return pb_1.Message.getField(this, 2) != null; + } + get resetPasswordLink() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set resetPasswordLink(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + userId?: number; + to?: ReturnType; + resetPasswordLink?: string; + }): ResetPasswordEmailRequest { + const message = new ResetPasswordEmailRequest({}); + if (data.userId != null) { + message.userId = data.userId; + } + if (data.to != null) { + message.to = Contact.fromObject(data.to); + } + if (data.resetPasswordLink != null) { + message.resetPasswordLink = data.resetPasswordLink; + } + return message; + } + toObject() { + const data: { + userId?: number; + to?: ReturnType; + resetPasswordLink?: string; + } = {}; + if (this.userId != null) { + data.userId = this.userId; + } + if (this.to != null) { + data.to = this.to.toObject(); + } + if (this.resetPasswordLink != null) { + data.resetPasswordLink = this.resetPasswordLink; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.userId != 0) + writer.writeUint64(1, this.userId); + if (this.has_to) + writer.writeMessage(2, this.to, () => this.to.serialize(writer)); + if (this.resetPasswordLink.length) + writer.writeString(3, this.resetPasswordLink); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResetPasswordEmailRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResetPasswordEmailRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.userId = reader.readUint64(); + break; + case 2: + reader.readMessage(message.to, () => message.to = Contact.deserialize(reader)); + break; + case 3: + message.resetPasswordLink = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResetPasswordEmailRequest { + return ResetPasswordEmailRequest.deserialize(bytes); + } + } + export class ResetPasswordEmailResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + code?: number; + success?: boolean; + }): ResetPasswordEmailResponse { + const message = new ResetPasswordEmailResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ResetPasswordEmailResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ResetPasswordEmailResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ResetPasswordEmailResponse { + return ResetPasswordEmailResponse.deserialize(bytes); + } + } + export class InviteMemeberEmailRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + userId?: number; + to?: Contact; + organizationName?: string; + projectName?: string; + inviterName?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("userId" in data && data.userId != undefined) { + this.userId = data.userId; + } + if ("to" in data && data.to != undefined) { + this.to = data.to; + } + if ("organizationName" in data && data.organizationName != undefined) { + this.organizationName = data.organizationName; + } + if ("projectName" in data && data.projectName != undefined) { + this.projectName = data.projectName; + } + if ("inviterName" in data && data.inviterName != undefined) { + this.inviterName = data.inviterName; + } + } + } + get userId() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set userId(value: number) { + pb_1.Message.setField(this, 1, value); + } + get to() { + return pb_1.Message.getWrapperField(this, Contact, 2) as Contact; + } + set to(value: Contact) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_to() { + return pb_1.Message.getField(this, 2) != null; + } + get organizationName() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set organizationName(value: string) { + pb_1.Message.setField(this, 3, value); + } + get projectName() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set projectName(value: string) { + pb_1.Message.setField(this, 4, value); + } + get inviterName() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set inviterName(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + userId?: number; + to?: ReturnType; + organizationName?: string; + projectName?: string; + inviterName?: string; + }): InviteMemeberEmailRequest { + const message = new InviteMemeberEmailRequest({}); + if (data.userId != null) { + message.userId = data.userId; + } + if (data.to != null) { + message.to = Contact.fromObject(data.to); + } + if (data.organizationName != null) { + message.organizationName = data.organizationName; + } + if (data.projectName != null) { + message.projectName = data.projectName; + } + if (data.inviterName != null) { + message.inviterName = data.inviterName; + } + return message; + } + toObject() { + const data: { + userId?: number; + to?: ReturnType; + organizationName?: string; + projectName?: string; + inviterName?: string; + } = {}; + if (this.userId != null) { + data.userId = this.userId; + } + if (this.to != null) { + data.to = this.to.toObject(); + } + if (this.organizationName != null) { + data.organizationName = this.organizationName; + } + if (this.projectName != null) { + data.projectName = this.projectName; + } + if (this.inviterName != null) { + data.inviterName = this.inviterName; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.userId != 0) + writer.writeUint64(1, this.userId); + if (this.has_to) + writer.writeMessage(2, this.to, () => this.to.serialize(writer)); + if (this.organizationName.length) + writer.writeString(3, this.organizationName); + if (this.projectName.length) + writer.writeString(4, this.projectName); + if (this.inviterName.length) + writer.writeString(5, this.inviterName); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InviteMemeberEmailRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InviteMemeberEmailRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.userId = reader.readUint64(); + break; + case 2: + reader.readMessage(message.to, () => message.to = Contact.deserialize(reader)); + break; + case 3: + message.organizationName = reader.readString(); + break; + case 4: + message.projectName = reader.readString(); + break; + case 5: + message.inviterName = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InviteMemeberEmailRequest { + return InviteMemeberEmailRequest.deserialize(bytes); + } + } + export class InviteMemeberEmailResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + code?: number; + success?: boolean; + }): InviteMemeberEmailResponse { + const message = new InviteMemeberEmailResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InviteMemeberEmailResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InviteMemeberEmailResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): InviteMemeberEmailResponse { + return InviteMemeberEmailResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedSendgridServiceService { + static definition = { + WelcomeEmail: { + path: "/integration_api.SendgridService/WelcomeEmail", + requestStream: false, + responseStream: false, + requestSerialize: (message: WelcomeEmailRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => WelcomeEmailRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: WelcomeEmailResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => WelcomeEmailResponse.deserialize(new Uint8Array(bytes)) + }, + ResetPasswordEmail: { + path: "/integration_api.SendgridService/ResetPasswordEmail", + requestStream: false, + responseStream: false, + requestSerialize: (message: ResetPasswordEmailRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ResetPasswordEmailRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ResetPasswordEmailResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ResetPasswordEmailResponse.deserialize(new Uint8Array(bytes)) + }, + InviteMemberEmail: { + path: "/integration_api.SendgridService/InviteMemberEmail", + requestStream: false, + responseStream: false, + requestSerialize: (message: InviteMemeberEmailRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => InviteMemeberEmailRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: InviteMemeberEmailResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => InviteMemeberEmailResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract WelcomeEmail(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ResetPasswordEmail(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract InviteMemberEmail(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class SendgridServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedSendgridServiceService.definition, "SendgridService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + WelcomeEmail: GrpcUnaryServiceInterface = (message: WelcomeEmailRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.WelcomeEmail(message, metadata, options, callback); + }; + ResetPasswordEmail: GrpcUnaryServiceInterface = (message: ResetPasswordEmailRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ResetPasswordEmail(message, metadata, options, callback); + }; + InviteMemberEmail: GrpcUnaryServiceInterface = (message: InviteMemeberEmailRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.InviteMemberEmail(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/sendgrid-api_grpc_pb.d.ts b/src/clients/protos/sendgrid-api_grpc_pb.d.ts deleted file mode 100644 index 84d7682..0000000 --- a/src/clients/protos/sendgrid-api_grpc_pb.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: integration_api -// file: sendgrid-api.proto - -import * as sendgrid_api_pb from "./sendgrid-api_pb"; -import * as grpc from "grpc"; - -interface ISendgridServiceService extends grpc.ServiceDefinition { - welcomeEmail: grpc.MethodDefinition; - resetPasswordEmail: grpc.MethodDefinition; - inviteMemberEmail: grpc.MethodDefinition; -} - -export const SendgridServiceService: ISendgridServiceService; - -export interface ISendgridServiceServer extends grpc.UntypedServiceImplementation { - welcomeEmail: grpc.handleUnaryCall; - resetPasswordEmail: grpc.handleUnaryCall; - inviteMemberEmail: grpc.handleUnaryCall; -} - -export class SendgridServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - welcomeEmail(argument: sendgrid_api_pb.WelcomeEmailRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - welcomeEmail(argument: sendgrid_api_pb.WelcomeEmailRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - welcomeEmail(argument: sendgrid_api_pb.WelcomeEmailRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - resetPasswordEmail(argument: sendgrid_api_pb.ResetPasswordEmailRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - resetPasswordEmail(argument: sendgrid_api_pb.ResetPasswordEmailRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - resetPasswordEmail(argument: sendgrid_api_pb.ResetPasswordEmailRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - inviteMemberEmail(argument: sendgrid_api_pb.InviteMemeberEmailRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - inviteMemberEmail(argument: sendgrid_api_pb.InviteMemeberEmailRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - inviteMemberEmail(argument: sendgrid_api_pb.InviteMemeberEmailRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/sendgrid-api_pb.d.ts b/src/clients/protos/sendgrid-api_pb.d.ts deleted file mode 100644 index dafbc4d..0000000 --- a/src/clients/protos/sendgrid-api_pb.d.ts +++ /dev/null @@ -1,195 +0,0 @@ -// package: integration_api -// file: sendgrid-api.proto - -import * as jspb from "google-protobuf"; - -export class Contact extends jspb.Message { - getEmail(): string; - setEmail(value: string): void; - - getName(): string; - setName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Contact.AsObject; - static toObject(includeInstance: boolean, msg: Contact): Contact.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Contact, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Contact; - static deserializeBinaryFromReader(message: Contact, reader: jspb.BinaryReader): Contact; -} - -export namespace Contact { - export type AsObject = { - email: string, - name: string, - } -} - -export class WelcomeEmailRequest extends jspb.Message { - getUserid(): number; - setUserid(value: number): void; - - hasTo(): boolean; - clearTo(): void; - getTo(): Contact | undefined; - setTo(value?: Contact): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WelcomeEmailRequest.AsObject; - static toObject(includeInstance: boolean, msg: WelcomeEmailRequest): WelcomeEmailRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WelcomeEmailRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WelcomeEmailRequest; - static deserializeBinaryFromReader(message: WelcomeEmailRequest, reader: jspb.BinaryReader): WelcomeEmailRequest; -} - -export namespace WelcomeEmailRequest { - export type AsObject = { - userid: number, - to?: Contact.AsObject, - } -} - -export class WelcomeEmailResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WelcomeEmailResponse.AsObject; - static toObject(includeInstance: boolean, msg: WelcomeEmailResponse): WelcomeEmailResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WelcomeEmailResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WelcomeEmailResponse; - static deserializeBinaryFromReader(message: WelcomeEmailResponse, reader: jspb.BinaryReader): WelcomeEmailResponse; -} - -export namespace WelcomeEmailResponse { - export type AsObject = { - code: number, - success: boolean, - } -} - -export class ResetPasswordEmailRequest extends jspb.Message { - getUserid(): number; - setUserid(value: number): void; - - hasTo(): boolean; - clearTo(): void; - getTo(): Contact | undefined; - setTo(value?: Contact): void; - - getResetpasswordlink(): string; - setResetpasswordlink(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResetPasswordEmailRequest.AsObject; - static toObject(includeInstance: boolean, msg: ResetPasswordEmailRequest): ResetPasswordEmailRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResetPasswordEmailRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResetPasswordEmailRequest; - static deserializeBinaryFromReader(message: ResetPasswordEmailRequest, reader: jspb.BinaryReader): ResetPasswordEmailRequest; -} - -export namespace ResetPasswordEmailRequest { - export type AsObject = { - userid: number, - to?: Contact.AsObject, - resetpasswordlink: string, - } -} - -export class ResetPasswordEmailResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResetPasswordEmailResponse.AsObject; - static toObject(includeInstance: boolean, msg: ResetPasswordEmailResponse): ResetPasswordEmailResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResetPasswordEmailResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResetPasswordEmailResponse; - static deserializeBinaryFromReader(message: ResetPasswordEmailResponse, reader: jspb.BinaryReader): ResetPasswordEmailResponse; -} - -export namespace ResetPasswordEmailResponse { - export type AsObject = { - code: number, - success: boolean, - } -} - -export class InviteMemeberEmailRequest extends jspb.Message { - getUserid(): number; - setUserid(value: number): void; - - hasTo(): boolean; - clearTo(): void; - getTo(): Contact | undefined; - setTo(value?: Contact): void; - - getOrganizationname(): string; - setOrganizationname(value: string): void; - - getProjectname(): string; - setProjectname(value: string): void; - - getInvitername(): string; - setInvitername(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InviteMemeberEmailRequest.AsObject; - static toObject(includeInstance: boolean, msg: InviteMemeberEmailRequest): InviteMemeberEmailRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InviteMemeberEmailRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InviteMemeberEmailRequest; - static deserializeBinaryFromReader(message: InviteMemeberEmailRequest, reader: jspb.BinaryReader): InviteMemeberEmailRequest; -} - -export namespace InviteMemeberEmailRequest { - export type AsObject = { - userid: number, - to?: Contact.AsObject, - organizationname: string, - projectname: string, - invitername: string, - } -} - -export class InviteMemeberEmailResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InviteMemeberEmailResponse.AsObject; - static toObject(includeInstance: boolean, msg: InviteMemeberEmailResponse): InviteMemeberEmailResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InviteMemeberEmailResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InviteMemeberEmailResponse; - static deserializeBinaryFromReader(message: InviteMemeberEmailResponse, reader: jspb.BinaryReader): InviteMemeberEmailResponse; -} - -export namespace InviteMemeberEmailResponse { - export type AsObject = { - code: number, - success: boolean, - } -} - diff --git a/src/clients/protos/talk-api.ts b/src/clients/protos/talk-api.ts new file mode 100644 index 0000000..91941a6 --- /dev/null +++ b/src/clients/protos/talk-api.ts @@ -0,0 +1,2359 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: talk-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/any"; +import * as dependency_2 from "./google/protobuf/timestamp"; +import * as dependency_3 from "./common"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace talk_api { + export class AssistantDefinition extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + version?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set version(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + assistantId?: string; + version?: string; + }): AssistantDefinition { + const message = new AssistantDefinition({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.version != null) { + message.version = data.version; + } + return message; + } + toObject() { + const data: { + assistantId?: string; + version?: string; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.version != null) { + data.version = this.version; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.version.length) + writer.writeString(2, this.version); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantDefinition { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantDefinition(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + message.version = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantDefinition { + return AssistantDefinition.deserialize(bytes); + } + } + export class AssistantConversationConfiguration extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantConversationId?: string; + assistant?: AssistantDefinition; + time?: dependency_2.google.protobuf.Timestamp; + metadata?: Map; + args?: Map; + options?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantConversationId" in data && data.assistantConversationId != undefined) { + this.assistantConversationId = data.assistantConversationId; + } + if ("assistant" in data && data.assistant != undefined) { + this.assistant = data.assistant; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("args" in data && data.args != undefined) { + this.args = data.args; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + } + if (!this.metadata) + this.metadata = new Map(); + if (!this.args) + this.args = new Map(); + if (!this.options) + this.options = new Map(); + } + get assistantConversationId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantConversationId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistant() { + return pb_1.Message.getWrapperField(this, AssistantDefinition, 2) as AssistantDefinition; + } + set assistant(value: AssistantDefinition) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_assistant() { + return pb_1.Message.getField(this, 2) != null; + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 3) as dependency_2.google.protobuf.Timestamp; + } + set time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_time() { + return pb_1.Message.getField(this, 3) != null; + } + get metadata() { + return pb_1.Message.getField(this, 4) as any as Map; + } + set metadata(value: Map) { + pb_1.Message.setField(this, 4, value as any); + } + get args() { + return pb_1.Message.getField(this, 5) as any as Map; + } + set args(value: Map) { + pb_1.Message.setField(this, 5, value as any); + } + get options() { + return pb_1.Message.getField(this, 6) as any as Map; + } + set options(value: Map) { + pb_1.Message.setField(this, 6, value as any); + } + static fromObject(data: { + assistantConversationId?: string; + assistant?: ReturnType; + time?: ReturnType; + metadata?: { + [key: string]: ReturnType; + }; + args?: { + [key: string]: ReturnType; + }; + options?: { + [key: string]: ReturnType; + }; + }): AssistantConversationConfiguration { + const message = new AssistantConversationConfiguration({}); + if (data.assistantConversationId != null) { + message.assistantConversationId = data.assistantConversationId; + } + if (data.assistant != null) { + message.assistant = AssistantDefinition.fromObject(data.assistant); + } + if (data.time != null) { + message.time = dependency_2.google.protobuf.Timestamp.fromObject(data.time); + } + if (typeof data.metadata == "object") { + message.metadata = new Map(Object.entries(data.metadata).map(([key, value]) => [key, dependency_1.google.protobuf.Any.fromObject(value)])); + } + if (typeof data.args == "object") { + message.args = new Map(Object.entries(data.args).map(([key, value]) => [key, dependency_1.google.protobuf.Any.fromObject(value)])); + } + if (typeof data.options == "object") { + message.options = new Map(Object.entries(data.options).map(([key, value]) => [key, dependency_1.google.protobuf.Any.fromObject(value)])); + } + return message; + } + toObject() { + const data: { + assistantConversationId?: string; + assistant?: ReturnType; + time?: ReturnType; + metadata?: { + [key: string]: ReturnType; + }; + args?: { + [key: string]: ReturnType; + }; + options?: { + [key: string]: ReturnType; + }; + } = {}; + if (this.assistantConversationId != null) { + data.assistantConversationId = this.assistantConversationId; + } + if (this.assistant != null) { + data.assistant = this.assistant.toObject(); + } + if (this.time != null) { + data.time = this.time.toObject(); + } + if (this.metadata != null) { + data.metadata = (Object.fromEntries)((Array.from)(this.metadata).map(([key, value]) => [key, value.toObject()])); + } + if (this.args != null) { + data.args = (Object.fromEntries)((Array.from)(this.args).map(([key, value]) => [key, value.toObject()])); + } + if (this.options != null) { + data.options = (Object.fromEntries)((Array.from)(this.options).map(([key, value]) => [key, value.toObject()])); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantConversationId != "0") + writer.writeUint64String(1, this.assistantConversationId); + if (this.has_assistant) + writer.writeMessage(2, this.assistant, () => this.assistant.serialize(writer)); + if (this.has_time) + writer.writeMessage(3, this.time, () => this.time.serialize(writer)); + for (const [key, value] of this.metadata) { + writer.writeMessage(4, this.metadata, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + for (const [key, value] of this.args) { + writer.writeMessage(5, this.args, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + for (const [key, value] of this.options) { + writer.writeMessage(6, this.options, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantConversationConfiguration { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantConversationConfiguration(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantConversationId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.assistant, () => message.assistant = AssistantDefinition.deserialize(reader)); + break; + case 3: + reader.readMessage(message.time, () => message.time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + case 4: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_1.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + case 5: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.args as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_1.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + case 6: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.options as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_1.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantConversationConfiguration { + return AssistantConversationConfiguration.deserialize(bytes); + } + } + export class AssistantConversationInterruption extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + type?: AssistantConversationInterruption.InterruptionType; + time?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 2, AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_UNSPECIFIED) as AssistantConversationInterruption.InterruptionType; + } + set type(value: AssistantConversationInterruption.InterruptionType) { + pb_1.Message.setField(this, 2, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 3) as dependency_2.google.protobuf.Timestamp; + } + set time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_time() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + id?: string; + type?: AssistantConversationInterruption.InterruptionType; + time?: ReturnType; + }): AssistantConversationInterruption { + const message = new AssistantConversationInterruption({}); + if (data.id != null) { + message.id = data.id; + } + if (data.type != null) { + message.type = data.type; + } + if (data.time != null) { + message.time = dependency_2.google.protobuf.Timestamp.fromObject(data.time); + } + return message; + } + toObject() { + const data: { + id?: string; + type?: AssistantConversationInterruption.InterruptionType; + time?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.type != null) { + data.type = this.type; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id.length) + writer.writeString(1, this.id); + if (this.type != AssistantConversationInterruption.InterruptionType.INTERRUPTION_TYPE_UNSPECIFIED) + writer.writeEnum(2, this.type); + if (this.has_time) + writer.writeMessage(3, this.time, () => this.time.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantConversationInterruption { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantConversationInterruption(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readString(); + break; + case 2: + message.type = reader.readEnum(); + break; + case 3: + reader.readMessage(message.time, () => message.time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantConversationInterruption { + return AssistantConversationInterruption.deserialize(bytes); + } + } + export namespace AssistantConversationInterruption { + export enum InterruptionType { + INTERRUPTION_TYPE_UNSPECIFIED = 0, + INTERRUPTION_TYPE_VAD = 1, + INTERRUPTION_TYPE_WORD = 2 + } + } + export class AssistantConversationUserMessage extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + message?: dependency_3.Message; + id?: string; + completed?: boolean; + time?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("message" in data && data.message != undefined) { + this.message = data.message; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("completed" in data && data.completed != undefined) { + this.completed = data.completed; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + } + } + get message() { + return pb_1.Message.getWrapperField(this, dependency_3.Message, 1) as dependency_3.Message; + } + set message(value: dependency_3.Message) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_message() { + return pb_1.Message.getField(this, 1) != null; + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get completed() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set completed(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 4) as dependency_2.google.protobuf.Timestamp; + } + set time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_time() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + message?: ReturnType; + id?: string; + completed?: boolean; + time?: ReturnType; + }): AssistantConversationUserMessage { + const message = new AssistantConversationUserMessage({}); + if (data.message != null) { + message.message = dependency_3.Message.fromObject(data.message); + } + if (data.id != null) { + message.id = data.id; + } + if (data.completed != null) { + message.completed = data.completed; + } + if (data.time != null) { + message.time = dependency_2.google.protobuf.Timestamp.fromObject(data.time); + } + return message; + } + toObject() { + const data: { + message?: ReturnType; + id?: string; + completed?: boolean; + time?: ReturnType; + } = {}; + if (this.message != null) { + data.message = this.message.toObject(); + } + if (this.id != null) { + data.id = this.id; + } + if (this.completed != null) { + data.completed = this.completed; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_message) + writer.writeMessage(1, this.message, () => this.message.serialize(writer)); + if (this.id.length) + writer.writeString(2, this.id); + if (this.completed != false) + writer.writeBool(3, this.completed); + if (this.has_time) + writer.writeMessage(4, this.time, () => this.time.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantConversationUserMessage { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantConversationUserMessage(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.message, () => message.message = dependency_3.Message.deserialize(reader)); + break; + case 2: + message.id = reader.readString(); + break; + case 3: + message.completed = reader.readBool(); + break; + case 4: + reader.readMessage(message.time, () => message.time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantConversationUserMessage { + return AssistantConversationUserMessage.deserialize(bytes); + } + } + export class AssistantConversationAssistantMessage extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + message?: dependency_3.Message; + id?: string; + completed?: boolean; + time?: dependency_2.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("message" in data && data.message != undefined) { + this.message = data.message; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("completed" in data && data.completed != undefined) { + this.completed = data.completed; + } + if ("time" in data && data.time != undefined) { + this.time = data.time; + } + } + } + get message() { + return pb_1.Message.getWrapperField(this, dependency_3.Message, 1) as dependency_3.Message; + } + set message(value: dependency_3.Message) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_message() { + return pb_1.Message.getField(this, 1) != null; + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get completed() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set completed(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + get time() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 4) as dependency_2.google.protobuf.Timestamp; + } + set time(value: dependency_2.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_time() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + message?: ReturnType; + id?: string; + completed?: boolean; + time?: ReturnType; + }): AssistantConversationAssistantMessage { + const message = new AssistantConversationAssistantMessage({}); + if (data.message != null) { + message.message = dependency_3.Message.fromObject(data.message); + } + if (data.id != null) { + message.id = data.id; + } + if (data.completed != null) { + message.completed = data.completed; + } + if (data.time != null) { + message.time = dependency_2.google.protobuf.Timestamp.fromObject(data.time); + } + return message; + } + toObject() { + const data: { + message?: ReturnType; + id?: string; + completed?: boolean; + time?: ReturnType; + } = {}; + if (this.message != null) { + data.message = this.message.toObject(); + } + if (this.id != null) { + data.id = this.id; + } + if (this.completed != null) { + data.completed = this.completed; + } + if (this.time != null) { + data.time = this.time.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_message) + writer.writeMessage(1, this.message, () => this.message.serialize(writer)); + if (this.id.length) + writer.writeString(2, this.id); + if (this.completed != false) + writer.writeBool(3, this.completed); + if (this.has_time) + writer.writeMessage(4, this.time, () => this.time.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantConversationAssistantMessage { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantConversationAssistantMessage(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.message, () => message.message = dependency_3.Message.deserialize(reader)); + break; + case 2: + message.id = reader.readString(); + break; + case 3: + message.completed = reader.readBool(); + break; + case 4: + reader.readMessage(message.time, () => message.time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantConversationAssistantMessage { + return AssistantConversationAssistantMessage.deserialize(bytes); + } + } + export class AssistantMessagingRequest extends pb_1.Message { + #one_of_decls: number[][] = [[2, 3]]; + constructor(data?: any[] | ({} & (({ + configuration?: AssistantConversationConfiguration; + message?: never; + } | { + configuration?: never; + message?: AssistantConversationUserMessage; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("configuration" in data && data.configuration != undefined) { + this.configuration = data.configuration; + } + if ("message" in data && data.message != undefined) { + this.message = data.message; + } + } + } + get configuration() { + return pb_1.Message.getWrapperField(this, AssistantConversationConfiguration, 2) as AssistantConversationConfiguration; + } + set configuration(value: AssistantConversationConfiguration) { + pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); + } + get has_configuration() { + return pb_1.Message.getField(this, 2) != null; + } + get message() { + return pb_1.Message.getWrapperField(this, AssistantConversationUserMessage, 3) as AssistantConversationUserMessage; + } + set message(value: AssistantConversationUserMessage) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_message() { + return pb_1.Message.getField(this, 3) != null; + } + get request() { + const cases: { + [index: number]: "none" | "configuration" | "message"; + } = { + 0: "none", + 2: "configuration", + 3: "message" + }; + return cases[pb_1.Message.computeOneofCase(this, [2, 3])]; + } + static fromObject(data: { + configuration?: ReturnType; + message?: ReturnType; + }): AssistantMessagingRequest { + const message = new AssistantMessagingRequest({}); + if (data.configuration != null) { + message.configuration = AssistantConversationConfiguration.fromObject(data.configuration); + } + if (data.message != null) { + message.message = AssistantConversationUserMessage.fromObject(data.message); + } + return message; + } + toObject() { + const data: { + configuration?: ReturnType; + message?: ReturnType; + } = {}; + if (this.configuration != null) { + data.configuration = this.configuration.toObject(); + } + if (this.message != null) { + data.message = this.message.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_configuration) + writer.writeMessage(2, this.configuration, () => this.configuration.serialize(writer)); + if (this.has_message) + writer.writeMessage(3, this.message, () => this.message.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantMessagingRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantMessagingRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + reader.readMessage(message.configuration, () => message.configuration = AssistantConversationConfiguration.deserialize(reader)); + break; + case 3: + reader.readMessage(message.message, () => message.message = AssistantConversationUserMessage.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantMessagingRequest { + return AssistantMessagingRequest.deserialize(bytes); + } + } + export class AssistantMessagingResponse extends pb_1.Message { + #one_of_decls: number[][] = [[9, 10, 11, 12, 13]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + error?: dependency_3.Error; + } & (({ + configuration?: AssistantConversationConfiguration; + interruption?: never; + user?: never; + assistant?: never; + message?: never; + } | { + configuration?: never; + interruption?: AssistantConversationInterruption; + user?: never; + assistant?: never; + message?: never; + } | { + configuration?: never; + interruption?: never; + user?: AssistantConversationUserMessage; + assistant?: never; + message?: never; + } | { + configuration?: never; + interruption?: never; + user?: never; + assistant?: AssistantConversationAssistantMessage; + message?: never; + } | { + configuration?: never; + interruption?: never; + user?: never; + assistant?: never; + message?: dependency_3.AssistantConversationMessage; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("configuration" in data && data.configuration != undefined) { + this.configuration = data.configuration; + } + if ("interruption" in data && data.interruption != undefined) { + this.interruption = data.interruption; + } + if ("user" in data && data.user != undefined) { + this.user = data.user; + } + if ("assistant" in data && data.assistant != undefined) { + this.assistant = data.assistant; + } + if ("message" in data && data.message != undefined) { + this.message = data.message; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get configuration() { + return pb_1.Message.getWrapperField(this, AssistantConversationConfiguration, 9) as AssistantConversationConfiguration; + } + set configuration(value: AssistantConversationConfiguration) { + pb_1.Message.setOneofWrapperField(this, 9, this.#one_of_decls[0], value); + } + get has_configuration() { + return pb_1.Message.getField(this, 9) != null; + } + get interruption() { + return pb_1.Message.getWrapperField(this, AssistantConversationInterruption, 10) as AssistantConversationInterruption; + } + set interruption(value: AssistantConversationInterruption) { + pb_1.Message.setOneofWrapperField(this, 10, this.#one_of_decls[0], value); + } + get has_interruption() { + return pb_1.Message.getField(this, 10) != null; + } + get user() { + return pb_1.Message.getWrapperField(this, AssistantConversationUserMessage, 11) as AssistantConversationUserMessage; + } + set user(value: AssistantConversationUserMessage) { + pb_1.Message.setOneofWrapperField(this, 11, this.#one_of_decls[0], value); + } + get has_user() { + return pb_1.Message.getField(this, 11) != null; + } + get assistant() { + return pb_1.Message.getWrapperField(this, AssistantConversationAssistantMessage, 12) as AssistantConversationAssistantMessage; + } + set assistant(value: AssistantConversationAssistantMessage) { + pb_1.Message.setOneofWrapperField(this, 12, this.#one_of_decls[0], value); + } + get has_assistant() { + return pb_1.Message.getField(this, 12) != null; + } + get message() { + return pb_1.Message.getWrapperField(this, dependency_3.AssistantConversationMessage, 13) as dependency_3.AssistantConversationMessage; + } + set message(value: dependency_3.AssistantConversationMessage) { + pb_1.Message.setOneofWrapperField(this, 13, this.#one_of_decls[0], value); + } + get has_message() { + return pb_1.Message.getField(this, 13) != null; + } + get data() { + const cases: { + [index: number]: "none" | "configuration" | "interruption" | "user" | "assistant" | "message"; + } = { + 0: "none", + 9: "configuration", + 10: "interruption", + 11: "user", + 12: "assistant", + 13: "message" + }; + return cases[pb_1.Message.computeOneofCase(this, [9, 10, 11, 12, 13])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + error?: ReturnType; + configuration?: ReturnType; + interruption?: ReturnType; + user?: ReturnType; + assistant?: ReturnType; + message?: ReturnType; + }): AssistantMessagingResponse { + const message = new AssistantMessagingResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + if (data.configuration != null) { + message.configuration = AssistantConversationConfiguration.fromObject(data.configuration); + } + if (data.interruption != null) { + message.interruption = AssistantConversationInterruption.fromObject(data.interruption); + } + if (data.user != null) { + message.user = AssistantConversationUserMessage.fromObject(data.user); + } + if (data.assistant != null) { + message.assistant = AssistantConversationAssistantMessage.fromObject(data.assistant); + } + if (data.message != null) { + message.message = dependency_3.AssistantConversationMessage.fromObject(data.message); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + error?: ReturnType; + configuration?: ReturnType; + interruption?: ReturnType; + user?: ReturnType; + assistant?: ReturnType; + message?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.configuration != null) { + data.configuration = this.configuration.toObject(); + } + if (this.interruption != null) { + data.interruption = this.interruption.toObject(); + } + if (this.user != null) { + data.user = this.user.toObject(); + } + if (this.assistant != null) { + data.assistant = this.assistant.toObject(); + } + if (this.message != null) { + data.message = this.message.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_configuration) + writer.writeMessage(9, this.configuration, () => this.configuration.serialize(writer)); + if (this.has_interruption) + writer.writeMessage(10, this.interruption, () => this.interruption.serialize(writer)); + if (this.has_user) + writer.writeMessage(11, this.user, () => this.user.serialize(writer)); + if (this.has_assistant) + writer.writeMessage(12, this.assistant, () => this.assistant.serialize(writer)); + if (this.has_message) + writer.writeMessage(13, this.message, () => this.message.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssistantMessagingResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssistantMessagingResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + case 9: + reader.readMessage(message.configuration, () => message.configuration = AssistantConversationConfiguration.deserialize(reader)); + break; + case 10: + reader.readMessage(message.interruption, () => message.interruption = AssistantConversationInterruption.deserialize(reader)); + break; + case 11: + reader.readMessage(message.user, () => message.user = AssistantConversationUserMessage.deserialize(reader)); + break; + case 12: + reader.readMessage(message.assistant, () => message.assistant = AssistantConversationAssistantMessage.deserialize(reader)); + break; + case 13: + reader.readMessage(message.message, () => message.message = dependency_3.AssistantConversationMessage.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AssistantMessagingResponse { + return AssistantMessagingResponse.deserialize(bytes); + } + } + export class CreateMessageMetricRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + assistantConversationId?: string; + messageId?: string; + metrics?: dependency_3.Metric[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("assistantConversationId" in data && data.assistantConversationId != undefined) { + this.assistantConversationId = data.assistantConversationId; + } + if ("messageId" in data && data.messageId != undefined) { + this.messageId = data.messageId; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantConversationId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantConversationId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get messageId() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set messageId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Metric, 4) as dependency_3.Metric[]; + } + set metrics(value: dependency_3.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + static fromObject(data: { + assistantId?: string; + assistantConversationId?: string; + messageId?: string; + metrics?: ReturnType[]; + }): CreateMessageMetricRequest { + const message = new CreateMessageMetricRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.assistantConversationId != null) { + message.assistantConversationId = data.assistantConversationId; + } + if (data.messageId != null) { + message.messageId = data.messageId; + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => dependency_3.Metric.fromObject(item)); + } + return message; + } + toObject() { + const data: { + assistantId?: string; + assistantConversationId?: string; + messageId?: string; + metrics?: ReturnType[]; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.assistantConversationId != null) { + data.assistantConversationId = this.assistantConversationId; + } + if (this.messageId != null) { + data.messageId = this.messageId; + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: dependency_3.Metric) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.assistantConversationId != "0") + writer.writeUint64String(2, this.assistantConversationId); + if (this.messageId.length) + writer.writeString(3, this.messageId); + if (this.metrics.length) + writer.writeRepeatedMessage(4, this.metrics, (item: dependency_3.Metric) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateMessageMetricRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateMessageMetricRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + message.assistantConversationId = reader.readUint64String(); + break; + case 3: + message.messageId = reader.readString(); + break; + case 4: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_3.Metric.deserialize(reader), dependency_3.Metric)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateMessageMetricRequest { + return CreateMessageMetricRequest.deserialize(bytes); + } + } + export class CreateMessageMetricResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_3.Metric[]; + error?: dependency_3.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Metric, 3) as dependency_3.Metric[]; + } + set data(value: dependency_3.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + }): CreateMessageMetricResponse { + const message = new CreateMessageMetricResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_3.Metric.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_3.Metric) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_3.Metric) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateMessageMetricResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateMessageMetricResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_3.Metric.deserialize(reader), dependency_3.Metric)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateMessageMetricResponse { + return CreateMessageMetricResponse.deserialize(bytes); + } + } + export class CreateConversationMetricRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistantId?: string; + assistantConversationId?: string; + metrics?: dependency_3.Metric[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistantId" in data && data.assistantId != undefined) { + this.assistantId = data.assistantId; + } + if ("assistantConversationId" in data && data.assistantConversationId != undefined) { + this.assistantConversationId = data.assistantConversationId; + } + if ("metrics" in data && data.metrics != undefined) { + this.metrics = data.metrics; + } + } + } + get assistantId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set assistantId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get assistantConversationId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set assistantConversationId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get metrics() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Metric, 3) as dependency_3.Metric[]; + } + set metrics(value: dependency_3.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + static fromObject(data: { + assistantId?: string; + assistantConversationId?: string; + metrics?: ReturnType[]; + }): CreateConversationMetricRequest { + const message = new CreateConversationMetricRequest({}); + if (data.assistantId != null) { + message.assistantId = data.assistantId; + } + if (data.assistantConversationId != null) { + message.assistantConversationId = data.assistantConversationId; + } + if (data.metrics != null) { + message.metrics = data.metrics.map(item => dependency_3.Metric.fromObject(item)); + } + return message; + } + toObject() { + const data: { + assistantId?: string; + assistantConversationId?: string; + metrics?: ReturnType[]; + } = {}; + if (this.assistantId != null) { + data.assistantId = this.assistantId; + } + if (this.assistantConversationId != null) { + data.assistantConversationId = this.assistantConversationId; + } + if (this.metrics != null) { + data.metrics = this.metrics.map((item: dependency_3.Metric) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.assistantId != "0") + writer.writeUint64String(1, this.assistantId); + if (this.assistantConversationId != "0") + writer.writeUint64String(2, this.assistantConversationId); + if (this.metrics.length) + writer.writeRepeatedMessage(3, this.metrics, (item: dependency_3.Metric) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateConversationMetricRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateConversationMetricRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.assistantId = reader.readUint64String(); + break; + case 2: + message.assistantConversationId = reader.readUint64String(); + break; + case 3: + reader.readMessage(message.metrics, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_3.Metric.deserialize(reader), dependency_3.Metric)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateConversationMetricRequest { + return CreateConversationMetricRequest.deserialize(bytes); + } + } + export class CreateConversationMetricResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_3.Metric[]; + error?: dependency_3.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Metric, 3) as dependency_3.Metric[]; + } + set data(value: dependency_3.Metric[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + }): CreateConversationMetricResponse { + const message = new CreateConversationMetricResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_3.Metric.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_3.Metric) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_3.Metric) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateConversationMetricResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateConversationMetricResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_3.Metric.deserialize(reader), dependency_3.Metric)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateConversationMetricResponse { + return CreateConversationMetricResponse.deserialize(bytes); + } + } + export class CreatePhoneCallRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + assistant?: AssistantDefinition; + metadata?: Map; + args?: Map; + options?: Map; + fromNumber?: string; + toNumber?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("assistant" in data && data.assistant != undefined) { + this.assistant = data.assistant; + } + if ("metadata" in data && data.metadata != undefined) { + this.metadata = data.metadata; + } + if ("args" in data && data.args != undefined) { + this.args = data.args; + } + if ("options" in data && data.options != undefined) { + this.options = data.options; + } + if ("fromNumber" in data && data.fromNumber != undefined) { + this.fromNumber = data.fromNumber; + } + if ("toNumber" in data && data.toNumber != undefined) { + this.toNumber = data.toNumber; + } + } + if (!this.metadata) + this.metadata = new Map(); + if (!this.args) + this.args = new Map(); + if (!this.options) + this.options = new Map(); + } + get assistant() { + return pb_1.Message.getWrapperField(this, AssistantDefinition, 1) as AssistantDefinition; + } + set assistant(value: AssistantDefinition) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_assistant() { + return pb_1.Message.getField(this, 1) != null; + } + get metadata() { + return pb_1.Message.getField(this, 3) as any as Map; + } + set metadata(value: Map) { + pb_1.Message.setField(this, 3, value as any); + } + get args() { + return pb_1.Message.getField(this, 4) as any as Map; + } + set args(value: Map) { + pb_1.Message.setField(this, 4, value as any); + } + get options() { + return pb_1.Message.getField(this, 5) as any as Map; + } + set options(value: Map) { + pb_1.Message.setField(this, 5, value as any); + } + get fromNumber() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set fromNumber(value: string) { + pb_1.Message.setField(this, 6, value); + } + get toNumber() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set toNumber(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + assistant?: ReturnType; + metadata?: { + [key: string]: ReturnType; + }; + args?: { + [key: string]: ReturnType; + }; + options?: { + [key: string]: ReturnType; + }; + fromNumber?: string; + toNumber?: string; + }): CreatePhoneCallRequest { + const message = new CreatePhoneCallRequest({}); + if (data.assistant != null) { + message.assistant = AssistantDefinition.fromObject(data.assistant); + } + if (typeof data.metadata == "object") { + message.metadata = new Map(Object.entries(data.metadata).map(([key, value]) => [key, dependency_1.google.protobuf.Any.fromObject(value)])); + } + if (typeof data.args == "object") { + message.args = new Map(Object.entries(data.args).map(([key, value]) => [key, dependency_1.google.protobuf.Any.fromObject(value)])); + } + if (typeof data.options == "object") { + message.options = new Map(Object.entries(data.options).map(([key, value]) => [key, dependency_1.google.protobuf.Any.fromObject(value)])); + } + if (data.fromNumber != null) { + message.fromNumber = data.fromNumber; + } + if (data.toNumber != null) { + message.toNumber = data.toNumber; + } + return message; + } + toObject() { + const data: { + assistant?: ReturnType; + metadata?: { + [key: string]: ReturnType; + }; + args?: { + [key: string]: ReturnType; + }; + options?: { + [key: string]: ReturnType; + }; + fromNumber?: string; + toNumber?: string; + } = {}; + if (this.assistant != null) { + data.assistant = this.assistant.toObject(); + } + if (this.metadata != null) { + data.metadata = (Object.fromEntries)((Array.from)(this.metadata).map(([key, value]) => [key, value.toObject()])); + } + if (this.args != null) { + data.args = (Object.fromEntries)((Array.from)(this.args).map(([key, value]) => [key, value.toObject()])); + } + if (this.options != null) { + data.options = (Object.fromEntries)((Array.from)(this.options).map(([key, value]) => [key, value.toObject()])); + } + if (this.fromNumber != null) { + data.fromNumber = this.fromNumber; + } + if (this.toNumber != null) { + data.toNumber = this.toNumber; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_assistant) + writer.writeMessage(1, this.assistant, () => this.assistant.serialize(writer)); + for (const [key, value] of this.metadata) { + writer.writeMessage(3, this.metadata, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + for (const [key, value] of this.args) { + writer.writeMessage(4, this.args, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + for (const [key, value] of this.options) { + writer.writeMessage(5, this.options, () => { + writer.writeString(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } + if (this.fromNumber.length) + writer.writeString(6, this.fromNumber); + if (this.toNumber.length) + writer.writeString(7, this.toNumber); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreatePhoneCallRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreatePhoneCallRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.assistant, () => message.assistant = AssistantDefinition.deserialize(reader)); + break; + case 3: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_1.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + case 4: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.args as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_1.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + case 5: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.options as any, reader, reader.readString, () => { + let value; + reader.readMessage(message, () => value = dependency_1.google.protobuf.Any.deserialize(reader)); + return value; + })); + break; + case 6: + message.fromNumber = reader.readString(); + break; + case 7: + message.toNumber = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreatePhoneCallRequest { + return CreatePhoneCallRequest.deserialize(bytes); + } + } + export class CreatePhoneCallResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_3.AssistantConversation; + error?: dependency_3.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_3.AssistantConversation, 3) as dependency_3.AssistantConversation; + } + set data(value: dependency_3.AssistantConversation) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): CreatePhoneCallResponse { + const message = new CreatePhoneCallResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = dependency_3.AssistantConversation.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreatePhoneCallResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreatePhoneCallResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = dependency_3.AssistantConversation.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreatePhoneCallResponse { + return CreatePhoneCallResponse.deserialize(bytes); + } + } + export class CreateBulkPhoneCallRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + phoneCalls?: CreatePhoneCallRequest[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("phoneCalls" in data && data.phoneCalls != undefined) { + this.phoneCalls = data.phoneCalls; + } + } + } + get phoneCalls() { + return pb_1.Message.getRepeatedWrapperField(this, CreatePhoneCallRequest, 6) as CreatePhoneCallRequest[]; + } + set phoneCalls(value: CreatePhoneCallRequest[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + static fromObject(data: { + phoneCalls?: ReturnType[]; + }): CreateBulkPhoneCallRequest { + const message = new CreateBulkPhoneCallRequest({}); + if (data.phoneCalls != null) { + message.phoneCalls = data.phoneCalls.map(item => CreatePhoneCallRequest.fromObject(item)); + } + return message; + } + toObject() { + const data: { + phoneCalls?: ReturnType[]; + } = {}; + if (this.phoneCalls != null) { + data.phoneCalls = this.phoneCalls.map((item: CreatePhoneCallRequest) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.phoneCalls.length) + writer.writeRepeatedMessage(6, this.phoneCalls, (item: CreatePhoneCallRequest) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateBulkPhoneCallRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateBulkPhoneCallRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 6: + reader.readMessage(message.phoneCalls, () => pb_1.Message.addToRepeatedWrapperField(message, 6, CreatePhoneCallRequest.deserialize(reader), CreatePhoneCallRequest)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateBulkPhoneCallRequest { + return CreateBulkPhoneCallRequest.deserialize(bytes); + } + } + export class CreateBulkPhoneCallResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_3.AssistantConversation[]; + error?: dependency_3.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.AssistantConversation, 3) as dependency_3.AssistantConversation[]; + } + set data(value: dependency_3.AssistantConversation[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + }): CreateBulkPhoneCallResponse { + const message = new CreateBulkPhoneCallResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_3.AssistantConversation.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_3.AssistantConversation) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_3.AssistantConversation) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateBulkPhoneCallResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateBulkPhoneCallResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_3.AssistantConversation.deserialize(reader), dependency_3.AssistantConversation)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateBulkPhoneCallResponse { + return CreateBulkPhoneCallResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedTalkServiceService { + static definition = { + AssistantTalk: { + path: "/talk_api.TalkService/AssistantTalk", + requestStream: true, + responseStream: true, + requestSerialize: (message: AssistantMessagingRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AssistantMessagingRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AssistantMessagingResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AssistantMessagingResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllAssistantConversation: { + path: "/talk_api.TalkService/GetAllAssistantConversation", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_3.GetAllAssistantConversationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_3.GetAllAssistantConversationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_3.GetAllAssistantConversationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_3.GetAllAssistantConversationResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllConversationMessage: { + path: "/talk_api.TalkService/GetAllConversationMessage", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_3.GetAllConversationMessageRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_3.GetAllConversationMessageRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_3.GetAllConversationMessageResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_3.GetAllConversationMessageResponse.deserialize(new Uint8Array(bytes)) + }, + CreateMessageMetric: { + path: "/talk_api.TalkService/CreateMessageMetric", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateMessageMetricRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateMessageMetricRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateMessageMetricResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateMessageMetricResponse.deserialize(new Uint8Array(bytes)) + }, + CreateConversationMetric: { + path: "/talk_api.TalkService/CreateConversationMetric", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateConversationMetricRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateConversationMetricRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateConversationMetricResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateConversationMetricResponse.deserialize(new Uint8Array(bytes)) + }, + CreatePhoneCall: { + path: "/talk_api.TalkService/CreatePhoneCall", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreatePhoneCallRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreatePhoneCallRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreatePhoneCallResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreatePhoneCallResponse.deserialize(new Uint8Array(bytes)) + }, + CreateBulkPhoneCall: { + path: "/talk_api.TalkService/CreateBulkPhoneCall", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateBulkPhoneCallRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateBulkPhoneCallRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateBulkPhoneCallResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateBulkPhoneCallResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract AssistantTalk(call: grpc_1.ServerDuplexStream): void; + abstract GetAllAssistantConversation(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllConversationMessage(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateMessageMetric(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateConversationMetric(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreatePhoneCall(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateBulkPhoneCall(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class TalkServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedTalkServiceService.definition, "TalkService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + AssistantTalk: GrpcChunkServiceInterface = (metadata?: grpc_1.Metadata | grpc_1.CallOptions, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream => { + return super.AssistantTalk(metadata, options); + }; + GetAllAssistantConversation: GrpcUnaryServiceInterface = (message: dependency_3.GetAllAssistantConversationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllAssistantConversation(message, metadata, options, callback); + }; + GetAllConversationMessage: GrpcUnaryServiceInterface = (message: dependency_3.GetAllConversationMessageRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllConversationMessage(message, metadata, options, callback); + }; + CreateMessageMetric: GrpcUnaryServiceInterface = (message: CreateMessageMetricRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateMessageMetric(message, metadata, options, callback); + }; + CreateConversationMetric: GrpcUnaryServiceInterface = (message: CreateConversationMetricRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateConversationMetric(message, metadata, options, callback); + }; + CreatePhoneCall: GrpcUnaryServiceInterface = (message: CreatePhoneCallRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreatePhoneCall(message, metadata, options, callback); + }; + CreateBulkPhoneCall: GrpcUnaryServiceInterface = (message: CreateBulkPhoneCallRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateBulkPhoneCall(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/talk-api_grpc_pb.d.ts b/src/clients/protos/talk-api_grpc_pb.d.ts deleted file mode 100644 index 43f863e..0000000 --- a/src/clients/protos/talk-api_grpc_pb.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: talk_api -// file: talk-api.proto - -import * as talk_api_pb from "./talk-api_pb"; -import * as common_pb from "./common_pb"; -import * as grpc from "grpc"; - -interface ITalkServiceService extends grpc.ServiceDefinition { - assistantTalk: grpc.MethodDefinition; - getAllAssistantConversation: grpc.MethodDefinition; - getAllConversationMessage: grpc.MethodDefinition; - createMessageMetric: grpc.MethodDefinition; - createConversationMetric: grpc.MethodDefinition; - createPhoneCall: grpc.MethodDefinition; - createBulkPhoneCall: grpc.MethodDefinition; -} - -export const TalkServiceService: ITalkServiceService; - -export interface ITalkServiceServer extends grpc.UntypedServiceImplementation { - assistantTalk: grpc.handleBidiStreamingCall; - getAllAssistantConversation: grpc.handleUnaryCall; - getAllConversationMessage: grpc.handleUnaryCall; - createMessageMetric: grpc.handleUnaryCall; - createConversationMetric: grpc.handleUnaryCall; - createPhoneCall: grpc.handleUnaryCall; - createBulkPhoneCall: grpc.handleUnaryCall; -} - -export class TalkServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - assistantTalk(metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientDuplexStream; - assistantTalk(metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientDuplexStream; - getAllAssistantConversation(argument: common_pb.GetAllAssistantConversationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantConversation(argument: common_pb.GetAllAssistantConversationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllAssistantConversation(argument: common_pb.GetAllAssistantConversationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllConversationMessage(argument: common_pb.GetAllConversationMessageRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllConversationMessage(argument: common_pb.GetAllConversationMessageRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllConversationMessage(argument: common_pb.GetAllConversationMessageRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createMessageMetric(argument: talk_api_pb.CreateMessageMetricRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createMessageMetric(argument: talk_api_pb.CreateMessageMetricRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createMessageMetric(argument: talk_api_pb.CreateMessageMetricRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createConversationMetric(argument: talk_api_pb.CreateConversationMetricRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createConversationMetric(argument: talk_api_pb.CreateConversationMetricRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createConversationMetric(argument: talk_api_pb.CreateConversationMetricRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createPhoneCall(argument: talk_api_pb.CreatePhoneCallRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createPhoneCall(argument: talk_api_pb.CreatePhoneCallRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createPhoneCall(argument: talk_api_pb.CreatePhoneCallRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createBulkPhoneCall(argument: talk_api_pb.CreateBulkPhoneCallRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createBulkPhoneCall(argument: talk_api_pb.CreateBulkPhoneCallRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createBulkPhoneCall(argument: talk_api_pb.CreateBulkPhoneCallRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/talk-api_pb.d.ts b/src/clients/protos/talk-api_pb.d.ts deleted file mode 100644 index fefddca..0000000 --- a/src/clients/protos/talk-api_pb.d.ts +++ /dev/null @@ -1,560 +0,0 @@ -// package: talk_api -// file: talk-api.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 common_pb from "./common_pb"; - -export class AssistantDefinition extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantDefinition.AsObject; - static toObject(includeInstance: boolean, msg: AssistantDefinition): AssistantDefinition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantDefinition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantDefinition; - static deserializeBinaryFromReader(message: AssistantDefinition, reader: jspb.BinaryReader): AssistantDefinition; -} - -export namespace AssistantDefinition { - export type AsObject = { - assistantid: string, - version: string, - } -} - -export class AssistantMessagingRequest extends jspb.Message { - hasAssistant(): boolean; - clearAssistant(): void; - getAssistant(): AssistantDefinition | undefined; - setAssistant(value?: AssistantDefinition): void; - - hasMessage(): boolean; - clearMessage(): void; - getMessage(): common_pb.Message | undefined; - setMessage(value?: common_pb.Message): void; - - hasAssistantconversationid(): boolean; - clearAssistantconversationid(): void; - getAssistantconversationid(): string; - setAssistantconversationid(value: string): void; - - getMetadataMap(): jspb.Map; - clearMetadataMap(): void; - getSource(): common_pb.SourceMap[keyof common_pb.SourceMap]; - setSource(value: common_pb.SourceMap[keyof common_pb.SourceMap]): void; - - getArgsMap(): jspb.Map; - clearArgsMap(): void; - getOptionsMap(): jspb.Map; - clearOptionsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantMessagingRequest.AsObject; - static toObject(includeInstance: boolean, msg: AssistantMessagingRequest): AssistantMessagingRequest.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; -} - -export namespace AssistantMessagingRequest { - export type AsObject = { - assistant?: AssistantDefinition.AsObject, - message?: common_pb.Message.AsObject, - assistantconversationid: string, - metadataMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - source: common_pb.SourceMap[keyof common_pb.SourceMap], - argsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - optionsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - } -} - -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; - - 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, - } -} - -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 AssistantConversationUserMessage extends jspb.Message { - hasMessage(): boolean; - clearMessage(): void; - getMessage(): common_pb.Message | undefined; - setMessage(value?: common_pb.Message): 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; - - 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 = { - message?: common_pb.Message.AsObject, - id: string, - completed: boolean, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class AssistantConversationAssistantMessage extends jspb.Message { - hasMessage(): boolean; - clearMessage(): void; - getMessage(): common_pb.Message | undefined; - setMessage(value?: common_pb.Message): 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; - - 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 = { - message?: common_pb.Message.AsObject, - id: string, - completed: boolean, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class AssistantMessagingResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasConfiguration(): boolean; - clearConfiguration(): void; - getConfiguration(): AssistantConversationConfiguration | undefined; - setConfiguration(value?: AssistantConversationConfiguration): void; - - hasInterruption(): boolean; - clearInterruption(): void; - getInterruption(): AssistantConversationInterruption | undefined; - setInterruption(value?: AssistantConversationInterruption): void; - - hasUser(): boolean; - clearUser(): void; - getUser(): AssistantConversationUserMessage | undefined; - setUser(value?: AssistantConversationUserMessage): void; - - hasAssistant(): boolean; - clearAssistant(): void; - getAssistant(): AssistantConversationAssistantMessage | undefined; - setAssistant(value?: AssistantConversationAssistantMessage): void; - - hasMessage(): boolean; - clearMessage(): void; - getMessage(): common_pb.AssistantConversationMessage | undefined; - setMessage(value?: common_pb.AssistantConversationMessage): void; - - getDataCase(): AssistantMessagingResponse.DataCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantMessagingResponse.AsObject; - static toObject(includeInstance: boolean, msg: AssistantMessagingResponse): AssistantMessagingResponse.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; -} - -export namespace AssistantMessagingResponse { - export type AsObject = { - code: number, - success: boolean, - error?: common_pb.Error.AsObject, - configuration?: AssistantConversationConfiguration.AsObject, - interruption?: AssistantConversationInterruption.AsObject, - user?: AssistantConversationUserMessage.AsObject, - assistant?: AssistantConversationAssistantMessage.AsObject, - message?: common_pb.AssistantConversationMessage.AsObject, - } - - export enum DataCase { - DATA_NOT_SET = 0, - CONFIGURATION = 9, - INTERRUPTION = 10, - USER = 11, - ASSISTANT = 12, - MESSAGE = 13, - } -} - -export class CreateMessageMetricRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - getAssistantconversationid(): string; - setAssistantconversationid(value: string): void; - - getMessageid(): string; - setMessageid(value: string): void; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: common_pb.Metric, index?: number): common_pb.Metric; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateMessageMetricRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateMessageMetricRequest): CreateMessageMetricRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateMessageMetricRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateMessageMetricRequest; - static deserializeBinaryFromReader(message: CreateMessageMetricRequest, reader: jspb.BinaryReader): CreateMessageMetricRequest; -} - -export namespace CreateMessageMetricRequest { - export type AsObject = { - assistantid: string, - assistantconversationid: string, - messageid: string, - metricsList: Array, - } -} - -export class CreateMessageMetricResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.Metric, index?: number): common_pb.Metric; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateMessageMetricResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateMessageMetricResponse): CreateMessageMetricResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateMessageMetricResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateMessageMetricResponse; - static deserializeBinaryFromReader(message: CreateMessageMetricResponse, reader: jspb.BinaryReader): CreateMessageMetricResponse; -} - -export namespace CreateMessageMetricResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - } -} - -export class CreateConversationMetricRequest extends jspb.Message { - getAssistantid(): string; - setAssistantid(value: string): void; - - getAssistantconversationid(): string; - setAssistantconversationid(value: string): void; - - clearMetricsList(): void; - getMetricsList(): Array; - setMetricsList(value: Array): void; - addMetrics(value?: common_pb.Metric, index?: number): common_pb.Metric; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateConversationMetricRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateConversationMetricRequest): CreateConversationMetricRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateConversationMetricRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateConversationMetricRequest; - static deserializeBinaryFromReader(message: CreateConversationMetricRequest, reader: jspb.BinaryReader): CreateConversationMetricRequest; -} - -export namespace CreateConversationMetricRequest { - export type AsObject = { - assistantid: string, - assistantconversationid: string, - metricsList: Array, - } -} - -export class CreateConversationMetricResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.Metric, index?: number): common_pb.Metric; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateConversationMetricResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateConversationMetricResponse): CreateConversationMetricResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateConversationMetricResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateConversationMetricResponse; - static deserializeBinaryFromReader(message: CreateConversationMetricResponse, reader: jspb.BinaryReader): CreateConversationMetricResponse; -} - -export namespace CreateConversationMetricResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - } -} - -export class CreatePhoneCallRequest extends jspb.Message { - hasAssistant(): boolean; - clearAssistant(): void; - getAssistant(): AssistantDefinition | undefined; - setAssistant(value?: AssistantDefinition): void; - - getMetadataMap(): jspb.Map; - clearMetadataMap(): void; - getArgsMap(): jspb.Map; - clearArgsMap(): void; - getOptionsMap(): jspb.Map; - clearOptionsMap(): void; - getFromnumber(): string; - setFromnumber(value: string): void; - - getTonumber(): string; - setTonumber(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreatePhoneCallRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreatePhoneCallRequest): CreatePhoneCallRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreatePhoneCallRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreatePhoneCallRequest; - static deserializeBinaryFromReader(message: CreatePhoneCallRequest, reader: jspb.BinaryReader): CreatePhoneCallRequest; -} - -export namespace CreatePhoneCallRequest { - export type AsObject = { - assistant?: AssistantDefinition.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]>, - fromnumber: string, - tonumber: string, - } -} - -export class CreatePhoneCallResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): common_pb.AssistantConversation | undefined; - setData(value?: common_pb.AssistantConversation): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreatePhoneCallResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreatePhoneCallResponse): CreatePhoneCallResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreatePhoneCallResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreatePhoneCallResponse; - static deserializeBinaryFromReader(message: CreatePhoneCallResponse, reader: jspb.BinaryReader): CreatePhoneCallResponse; -} - -export namespace CreatePhoneCallResponse { - export type AsObject = { - code: number, - success: boolean, - data?: common_pb.AssistantConversation.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class CreateBulkPhoneCallRequest extends jspb.Message { - clearPhonecallsList(): void; - getPhonecallsList(): Array; - setPhonecallsList(value: Array): void; - addPhonecalls(value?: CreatePhoneCallRequest, index?: number): CreatePhoneCallRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateBulkPhoneCallRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateBulkPhoneCallRequest): CreateBulkPhoneCallRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateBulkPhoneCallRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateBulkPhoneCallRequest; - static deserializeBinaryFromReader(message: CreateBulkPhoneCallRequest, reader: jspb.BinaryReader): CreateBulkPhoneCallRequest; -} - -export namespace CreateBulkPhoneCallRequest { - export type AsObject = { - phonecallsList: Array, - } -} - -export class CreateBulkPhoneCallResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.AssistantConversation, index?: number): common_pb.AssistantConversation; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateBulkPhoneCallResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateBulkPhoneCallResponse): CreateBulkPhoneCallResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateBulkPhoneCallResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateBulkPhoneCallResponse; - static deserializeBinaryFromReader(message: CreateBulkPhoneCallResponse, reader: jspb.BinaryReader): CreateBulkPhoneCallResponse; -} - -export namespace CreateBulkPhoneCallResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - } -} - diff --git a/src/clients/protos/talk-api_pb.js b/src/clients/protos/talk-api_pb.js index 09fc9c5..5adacdd 100644 --- a/src/clients/protos/talk-api_pb.js +++ b/src/clients/protos/talk-api_pb.js @@ -34,6 +34,7 @@ goog.exportSymbol('proto.talk_api.AssistantConversationInterruption.Interruption goog.exportSymbol('proto.talk_api.AssistantConversationUserMessage', null, global); goog.exportSymbol('proto.talk_api.AssistantDefinition', null, global); 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); goog.exportSymbol('proto.talk_api.CreateBulkPhoneCallRequest', null, global); @@ -75,16 +76,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.talk_api.AssistantMessagingRequest = function(opt_data) { +proto.talk_api.AssistantConversationConfiguration = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.talk_api.AssistantMessagingRequest, jspb.Message); +goog.inherits(proto.talk_api.AssistantConversationConfiguration, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.talk_api.AssistantMessagingRequest.displayName = 'proto.talk_api.AssistantMessagingRequest'; + proto.talk_api.AssistantConversationConfiguration.displayName = 'proto.talk_api.AssistantConversationConfiguration'; } /** * Generated by JsPbCodeGenerator. @@ -96,16 +97,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.talk_api.AssistantConversationConfiguration = function(opt_data) { +proto.talk_api.AssistantConversationInterruption = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.talk_api.AssistantConversationConfiguration, jspb.Message); +goog.inherits(proto.talk_api.AssistantConversationInterruption, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.talk_api.AssistantConversationConfiguration.displayName = 'proto.talk_api.AssistantConversationConfiguration'; + proto.talk_api.AssistantConversationInterruption.displayName = 'proto.talk_api.AssistantConversationInterruption'; } /** * Generated by JsPbCodeGenerator. @@ -117,16 +118,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.talk_api.AssistantConversationInterruption = function(opt_data) { +proto.talk_api.AssistantConversationUserMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.talk_api.AssistantConversationInterruption, jspb.Message); +goog.inherits(proto.talk_api.AssistantConversationUserMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.talk_api.AssistantConversationInterruption.displayName = 'proto.talk_api.AssistantConversationInterruption'; + proto.talk_api.AssistantConversationUserMessage.displayName = 'proto.talk_api.AssistantConversationUserMessage'; } /** * Generated by JsPbCodeGenerator. @@ -138,16 +139,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.talk_api.AssistantConversationUserMessage = function(opt_data) { +proto.talk_api.AssistantConversationAssistantMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.talk_api.AssistantConversationUserMessage, jspb.Message); +goog.inherits(proto.talk_api.AssistantConversationAssistantMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.talk_api.AssistantConversationUserMessage.displayName = 'proto.talk_api.AssistantConversationUserMessage'; + proto.talk_api.AssistantConversationAssistantMessage.displayName = 'proto.talk_api.AssistantConversationAssistantMessage'; } /** * Generated by JsPbCodeGenerator. @@ -159,16 +160,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.talk_api.AssistantConversationAssistantMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.talk_api.AssistantMessagingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.AssistantMessagingRequest.oneofGroups_); }; -goog.inherits(proto.talk_api.AssistantConversationAssistantMessage, jspb.Message); +goog.inherits(proto.talk_api.AssistantMessagingRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.talk_api.AssistantConversationAssistantMessage.displayName = 'proto.talk_api.AssistantConversationAssistantMessage'; + proto.talk_api.AssistantMessagingRequest.displayName = 'proto.talk_api.AssistantMessagingRequest'; } /** * Generated by JsPbCodeGenerator. @@ -535,8 +536,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.AssistantConversationConfiguration.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.AssistantConversationConfiguration.toObject(opt_includeInstance, this); }; @@ -545,17 +546,16 @@ 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.AssistantConversationConfiguration} 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.AssistantConversationConfiguration.toObject = function(includeInstance, msg) { var f, obj = { + assistantconversationid: jspb.Message.getFieldWithDefault(msg, 1, "0"), assistant: (f = msg.getAssistant()) && proto.talk_api.AssistantDefinition.toObject(includeInstance, f), - message: (f = msg.getMessage()) && common_pb.Message.toObject(includeInstance, f), - assistantconversationid: jspb.Message.getFieldWithDefault(msg, 4, "0"), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], - source: jspb.Message.getFieldWithDefault(msg, 7, 0), argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], optionsMap: (f = msg.getOptionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [] }; @@ -571,60 +571,56 @@ 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.AssistantConversationConfiguration} */ -proto.talk_api.AssistantMessagingRequest.deserializeBinary = function(bytes) { +proto.talk_api.AssistantConversationConfiguration.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.AssistantConversationConfiguration; + return proto.talk_api.AssistantConversationConfiguration.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.AssistantConversationConfiguration} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.AssistantMessagingRequest} + * @return {!proto.talk_api.AssistantConversationConfiguration} */ -proto.talk_api.AssistantMessagingRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.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.talk_api.AssistantDefinition; reader.readMessage(value,proto.talk_api.AssistantDefinition.deserializeBinaryFromReader); msg.setAssistant(value); break; case 3: - var value = new common_pb.Message; - reader.readMessage(value,common_pb.Message.deserializeBinaryFromReader); - msg.setMessage(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 = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantconversationid(value); - break; - case 6: 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 7: - var value = /** @type {!proto.Source} */ (reader.readEnum()); - msg.setSource(value); - break; - case 10: + 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 11: + 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()); @@ -643,9 +639,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.AssistantConversationConfiguration.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.AssistantMessagingRequest.serializeBinaryToWriter(this, writer); + proto.talk_api.AssistantConversationConfiguration.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -653,12 +649,19 @@ 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.AssistantConversationConfiguration} 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.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( @@ -667,48 +670,52 @@ proto.talk_api.AssistantMessagingRequest.serializeBinaryToWriter = function(mess proto.talk_api.AssistantDefinition.serializeBinaryToWriter ); } - f = message.getMessage(); + f = message.getTime(); if (f != null) { writer.writeMessage( 3, f, - common_pb.Message.serializeBinaryToWriter - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint64String( - 4, - f + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getMetadataMap(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.getSource(); - if (f !== 0.0) { - writer.writeEnum( - 7, - f - ); + 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(10, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + 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(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); } }; +/** + * optional uint64 assistantConversationId = 1; + * @return {string} + */ +proto.talk_api.AssistantConversationConfiguration.prototype.getAssistantconversationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.AssistantConversationConfiguration} returns this + */ +proto.talk_api.AssistantConversationConfiguration.prototype.setAssistantconversationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + /** * optional AssistantDefinition assistant = 2; * @return {?proto.talk_api.AssistantDefinition} */ -proto.talk_api.AssistantMessagingRequest.prototype.getAssistant = function() { +proto.talk_api.AssistantConversationConfiguration.prototype.getAssistant = function() { return /** @type{?proto.talk_api.AssistantDefinition} */ ( jspb.Message.getWrapperField(this, proto.talk_api.AssistantDefinition, 2)); }; @@ -716,18 +723,18 @@ proto.talk_api.AssistantMessagingRequest.prototype.getAssistant = function() { /** * @param {?proto.talk_api.AssistantDefinition|undefined} value - * @return {!proto.talk_api.AssistantMessagingRequest} returns this + * @return {!proto.talk_api.AssistantConversationConfiguration} returns this */ -proto.talk_api.AssistantMessagingRequest.prototype.setAssistant = function(value) { +proto.talk_api.AssistantConversationConfiguration.prototype.setAssistant = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantMessagingRequest} returns this + * @return {!proto.talk_api.AssistantConversationConfiguration} returns this */ -proto.talk_api.AssistantMessagingRequest.prototype.clearAssistant = function() { +proto.talk_api.AssistantConversationConfiguration.prototype.clearAssistant = function() { return this.setAssistant(undefined); }; @@ -736,36 +743,36 @@ proto.talk_api.AssistantMessagingRequest.prototype.clearAssistant = function() { * Returns whether this field is set. * @return {boolean} */ -proto.talk_api.AssistantMessagingRequest.prototype.hasAssistant = function() { +proto.talk_api.AssistantConversationConfiguration.prototype.hasAssistant = function() { return jspb.Message.getField(this, 2) != null; }; /** - * optional Message message = 3; - * @return {?proto.Message} + * optional google.protobuf.Timestamp time = 3; + * @return {?proto.google.protobuf.Timestamp} */ -proto.talk_api.AssistantMessagingRequest.prototype.getMessage = function() { - return /** @type{?proto.Message} */ ( - jspb.Message.getWrapperField(this, common_pb.Message, 3)); +proto.talk_api.AssistantConversationConfiguration.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; /** - * @param {?proto.Message|undefined} value - * @return {!proto.talk_api.AssistantMessagingRequest} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.talk_api.AssistantConversationConfiguration} returns this */ -proto.talk_api.AssistantMessagingRequest.prototype.setMessage = function(value) { +proto.talk_api.AssistantConversationConfiguration.prototype.setTime = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantMessagingRequest} returns this + * @return {!proto.talk_api.AssistantConversationConfiguration} returns this */ -proto.talk_api.AssistantMessagingRequest.prototype.clearMessage = function() { - return this.setMessage(undefined); +proto.talk_api.AssistantConversationConfiguration.prototype.clearTime = function() { + return this.setTime(undefined); }; @@ -773,127 +780,73 @@ proto.talk_api.AssistantMessagingRequest.prototype.clearMessage = function() { * Returns whether this field is set. * @return {boolean} */ -proto.talk_api.AssistantMessagingRequest.prototype.hasMessage = function() { +proto.talk_api.AssistantConversationConfiguration.prototype.hasTime = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional uint64 assistantConversationId = 4; - * @return {string} - */ -proto.talk_api.AssistantMessagingRequest.prototype.getAssistantconversationid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.talk_api.AssistantMessagingRequest} returns this - */ -proto.talk_api.AssistantMessagingRequest.prototype.setAssistantconversationid = function(value) { - return jspb.Message.setField(this, 4, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.talk_api.AssistantMessagingRequest} returns this - */ -proto.talk_api.AssistantMessagingRequest.prototype.clearAssistantconversationid = function() { - return jspb.Message.setField(this, 4, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.talk_api.AssistantMessagingRequest.prototype.hasAssistantconversationid = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * map metadata = 6; + * map metadata = 4; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ -proto.talk_api.AssistantMessagingRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { +proto.talk_api.AssistantConversationConfiguration.prototype.getMetadataMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 6, opt_noLazyCreate, + 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.AssistantMessagingRequest} returns this + * @return {!proto.talk_api.AssistantConversationConfiguration} returns this */ -proto.talk_api.AssistantMessagingRequest.prototype.clearMetadataMap = function() { +proto.talk_api.AssistantConversationConfiguration.prototype.clearMetadataMap = function() { this.getMetadataMap().clear(); return this;}; /** - * optional Source source = 7; - * @return {!proto.Source} - */ -proto.talk_api.AssistantMessagingRequest.prototype.getSource = function() { - return /** @type {!proto.Source} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {!proto.Source} value - * @return {!proto.talk_api.AssistantMessagingRequest} returns this - */ -proto.talk_api.AssistantMessagingRequest.prototype.setSource = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); -}; - - -/** - * map args = 10; + * map args = 5; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ -proto.talk_api.AssistantMessagingRequest.prototype.getArgsMap = function(opt_noLazyCreate) { +proto.talk_api.AssistantConversationConfiguration.prototype.getArgsMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 10, opt_noLazyCreate, + 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.AssistantMessagingRequest} returns this + * @return {!proto.talk_api.AssistantConversationConfiguration} returns this */ -proto.talk_api.AssistantMessagingRequest.prototype.clearArgsMap = function() { +proto.talk_api.AssistantConversationConfiguration.prototype.clearArgsMap = function() { this.getArgsMap().clear(); return this;}; /** - * map options = 11; + * map options = 6; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ -proto.talk_api.AssistantMessagingRequest.prototype.getOptionsMap = function(opt_noLazyCreate) { +proto.talk_api.AssistantConversationConfiguration.prototype.getOptionsMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 11, opt_noLazyCreate, + 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.AssistantMessagingRequest} returns this + * @return {!proto.talk_api.AssistantConversationConfiguration} returns this */ -proto.talk_api.AssistantMessagingRequest.prototype.clearOptionsMap = function() { +proto.talk_api.AssistantConversationConfiguration.prototype.clearOptionsMap = function() { this.getOptionsMap().clear(); return this;}; @@ -914,8 +867,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.AssistantConversationConfiguration.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.AssistantConversationConfiguration.toObject(opt_includeInstance, this); +proto.talk_api.AssistantConversationInterruption.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.AssistantConversationInterruption.toObject(opt_includeInstance, this); }; @@ -924,14 +877,14 @@ proto.talk_api.AssistantConversationConfiguration.prototype.toObject = function( * @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.AssistantConversationConfiguration} msg The msg instance to transform. + * @param {!proto.talk_api.AssistantConversationInterruption} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.AssistantConversationConfiguration.toObject = function(includeInstance, msg) { +proto.talk_api.AssistantConversationInterruption.toObject = function(includeInstance, msg) { var f, obj = { - assistantconversationid: jspb.Message.getFieldWithDefault(msg, 1, "0"), - assistant: (f = msg.getAssistant()) && proto.talk_api.AssistantDefinition.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) }; @@ -946,23 +899,23 @@ proto.talk_api.AssistantConversationConfiguration.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.AssistantConversationConfiguration} + * @return {!proto.talk_api.AssistantConversationInterruption} */ -proto.talk_api.AssistantConversationConfiguration.deserializeBinary = function(bytes) { +proto.talk_api.AssistantConversationInterruption.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.AssistantConversationConfiguration; - return proto.talk_api.AssistantConversationConfiguration.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.AssistantConversationInterruption; + return proto.talk_api.AssistantConversationInterruption.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.AssistantConversationConfiguration} msg The message object to deserialize into. + * @param {!proto.talk_api.AssistantConversationInterruption} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.AssistantConversationConfiguration} + * @return {!proto.talk_api.AssistantConversationInterruption} */ -proto.talk_api.AssistantConversationConfiguration.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.AssistantConversationInterruption.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -970,13 +923,12 @@ proto.talk_api.AssistantConversationConfiguration.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantconversationid(value); + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); break; case 2: - var value = new proto.talk_api.AssistantDefinition; - reader.readMessage(value,proto.talk_api.AssistantDefinition.deserializeBinaryFromReader); - msg.setAssistant(value); + var value = /** @type {!proto.talk_api.AssistantConversationInterruption.InterruptionType} */ (reader.readEnum()); + msg.setType(value); break; case 3: var value = new google_protobuf_timestamp_pb.Timestamp; @@ -996,9 +948,9 @@ proto.talk_api.AssistantConversationConfiguration.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.AssistantConversationConfiguration.prototype.serializeBinary = function() { +proto.talk_api.AssistantConversationInterruption.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.AssistantConversationConfiguration.serializeBinaryToWriter(this, writer); + proto.talk_api.AssistantConversationInterruption.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1006,246 +958,15 @@ proto.talk_api.AssistantConversationConfiguration.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.AssistantConversationConfiguration} message + * @param {!proto.talk_api.AssistantConversationInterruption} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.AssistantConversationConfiguration.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.AssistantConversationInterruption.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.talk_api.AssistantDefinition.serializeBinaryToWriter - ); - } - f = message.getTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 assistantConversationId = 1; - * @return {string} - */ -proto.talk_api.AssistantConversationConfiguration.prototype.getAssistantconversationid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.talk_api.AssistantConversationConfiguration} returns this - */ -proto.talk_api.AssistantConversationConfiguration.prototype.setAssistantconversationid = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional AssistantDefinition assistant = 2; - * @return {?proto.talk_api.AssistantDefinition} - */ -proto.talk_api.AssistantConversationConfiguration.prototype.getAssistant = function() { - return /** @type{?proto.talk_api.AssistantDefinition} */ ( - jspb.Message.getWrapperField(this, proto.talk_api.AssistantDefinition, 2)); -}; - - -/** - * @param {?proto.talk_api.AssistantDefinition|undefined} value - * @return {!proto.talk_api.AssistantConversationConfiguration} returns this -*/ -proto.talk_api.AssistantConversationConfiguration.prototype.setAssistant = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantConversationConfiguration} returns this - */ -proto.talk_api.AssistantConversationConfiguration.prototype.clearAssistant = function() { - return this.setAssistant(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.talk_api.AssistantConversationConfiguration.prototype.hasAssistant = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional google.protobuf.Timestamp time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.talk_api.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.talk_api.AssistantConversationConfiguration} returns this -*/ -proto.talk_api.AssistantConversationConfiguration.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantConversationConfiguration} returns this - */ -proto.talk_api.AssistantConversationConfiguration.prototype.clearTime = function() { - return this.setTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.talk_api.AssistantConversationConfiguration.prototype.hasTime = function() { - return jspb.Message.getField(this, 3) != 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.AssistantConversationInterruption.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.AssistantConversationInterruption.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.AssistantConversationInterruption} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.talk_api.AssistantConversationInterruption.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) - }; - - 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.AssistantConversationInterruption} - */ -proto.talk_api.AssistantConversationInterruption.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.AssistantConversationInterruption; - return proto.talk_api.AssistantConversationInterruption.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.talk_api.AssistantConversationInterruption} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.AssistantConversationInterruption} - */ -proto.talk_api.AssistantConversationInterruption.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.AssistantConversationInterruption.InterruptionType} */ (reader.readEnum()); - msg.setType(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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.talk_api.AssistantConversationInterruption.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.talk_api.AssistantConversationInterruption.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.AssistantConversationInterruption} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.talk_api.AssistantConversationInterruption.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( + f = message.getId(); + if (f.length > 0) { + writer.writeString( 1, f ); @@ -1875,6 +1596,234 @@ proto.talk_api.AssistantConversationAssistantMessage.prototype.hasTime = functio +/** + * 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} + */ +proto.talk_api.AssistantMessagingRequest.RequestCase = { + REQUEST_NOT_SET: 0, + CONFIGURATION: 2, + MESSAGE: 3 +}; + +/** + * @return {proto.talk_api.AssistantMessagingRequest.RequestCase} + */ +proto.talk_api.AssistantMessagingRequest.prototype.getRequestCase = function() { + return /** @type {proto.talk_api.AssistantMessagingRequest.RequestCase} */(jspb.Message.computeOneofCase(this, proto.talk_api.AssistantMessagingRequest.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.AssistantMessagingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.AssistantMessagingRequest.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.AssistantMessagingRequest} 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) { + var f, obj = { + configuration: (f = msg.getConfiguration()) && proto.talk_api.AssistantConversationConfiguration.toObject(includeInstance, f), + message: (f = msg.getMessage()) && proto.talk_api.AssistantConversationUserMessage.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.AssistantMessagingRequest} + */ +proto.talk_api.AssistantMessagingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.AssistantMessagingRequest; + return proto.talk_api.AssistantMessagingRequest.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.AssistantMessagingRequest} + */ +proto.talk_api.AssistantMessagingRequest.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.AssistantConversationConfiguration; + reader.readMessage(value,proto.talk_api.AssistantConversationConfiguration.deserializeBinaryFromReader); + msg.setConfiguration(value); + break; + case 3: + var value = new proto.talk_api.AssistantConversationUserMessage; + reader.readMessage(value,proto.talk_api.AssistantConversationUserMessage.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.AssistantMessagingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.AssistantMessagingRequest.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.AssistantMessagingRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.AssistantMessagingRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConfiguration(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.talk_api.AssistantConversationConfiguration.serializeBinaryToWriter + ); + } + f = message.getMessage(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.talk_api.AssistantConversationUserMessage.serializeBinaryToWriter + ); + } +}; + + +/** + * optional AssistantConversationConfiguration configuration = 2; + * @return {?proto.talk_api.AssistantConversationConfiguration} + */ +proto.talk_api.AssistantMessagingRequest.prototype.getConfiguration = function() { + return /** @type{?proto.talk_api.AssistantConversationConfiguration} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.AssistantConversationConfiguration, 2)); +}; + + +/** + * @param {?proto.talk_api.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantMessagingRequest} returns this + */ +proto.talk_api.AssistantMessagingRequest.prototype.clearConfiguration = function() { + return this.setConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantMessagingRequest.prototype.hasConfiguration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional AssistantConversationUserMessage message = 3; + * @return {?proto.talk_api.AssistantConversationUserMessage} + */ +proto.talk_api.AssistantMessagingRequest.prototype.getMessage = function() { + return /** @type{?proto.talk_api.AssistantConversationUserMessage} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.AssistantConversationUserMessage, 3)); +}; + + +/** + * @param {?proto.talk_api.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantMessagingRequest} returns this + */ +proto.talk_api.AssistantMessagingRequest.prototype.clearMessage = function() { + return this.setMessage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantMessagingRequest.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 diff --git a/src/clients/protos/vault-api.ts b/src/clients/protos/vault-api.ts new file mode 100644 index 0000000..2a0c3ed --- /dev/null +++ b/src/clients/protos/vault-api.ts @@ -0,0 +1,1348 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: vault-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./google/protobuf/struct"; +import * as dependency_3 from "./common"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace vault_api { + export class VaultCredential extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + value?: dependency_2.google.protobuf.Struct; + status?: string; + vaultLevel?: string; + vaultLevelId?: string; + vaultType?: string; + vaultTypeId?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + lastUsedDate?: dependency_1.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("value" in data && data.value != undefined) { + this.value = data.value; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("vaultLevel" in data && data.vaultLevel != undefined) { + this.vaultLevel = data.vaultLevel; + } + if ("vaultLevelId" in data && data.vaultLevelId != undefined) { + this.vaultLevelId = data.vaultLevelId; + } + if ("vaultType" in data && data.vaultType != undefined) { + this.vaultType = data.vaultType; + } + if ("vaultTypeId" in data && data.vaultTypeId != undefined) { + this.vaultTypeId = data.vaultTypeId; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("lastUsedDate" in data && data.lastUsedDate != undefined) { + this.lastUsedDate = data.lastUsedDate; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get value() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Struct, 3) as dependency_2.google.protobuf.Struct; + } + set value(value: dependency_2.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_value() { + return pb_1.Message.getField(this, 3) != null; + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 4, value); + } + get vaultLevel() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set vaultLevel(value: string) { + pb_1.Message.setField(this, 5, value); + } + get vaultLevelId() { + return pb_1.Message.getFieldWithDefault(this, 6, "0") as string; + } + set vaultLevelId(value: string) { + pb_1.Message.setField(this, 6, value); + } + get vaultType() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set vaultType(value: string) { + pb_1.Message.setField(this, 7, value); + } + get vaultTypeId() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set vaultTypeId(value: string) { + pb_1.Message.setField(this, 8, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 9) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 9, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 9) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 11) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 11, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 11) != null; + } + get lastUsedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 10) as dependency_1.google.protobuf.Timestamp; + } + set lastUsedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 10, value); + } + get has_lastUsedDate() { + return pb_1.Message.getField(this, 10) != null; + } + static fromObject(data: { + id?: string; + name?: string; + value?: ReturnType; + status?: string; + vaultLevel?: string; + vaultLevelId?: string; + vaultType?: string; + vaultTypeId?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + lastUsedDate?: ReturnType; + }): VaultCredential { + const message = new VaultCredential({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.value != null) { + message.value = dependency_2.google.protobuf.Struct.fromObject(data.value); + } + if (data.status != null) { + message.status = data.status; + } + if (data.vaultLevel != null) { + message.vaultLevel = data.vaultLevel; + } + if (data.vaultLevelId != null) { + message.vaultLevelId = data.vaultLevelId; + } + if (data.vaultType != null) { + message.vaultType = data.vaultType; + } + if (data.vaultTypeId != null) { + message.vaultTypeId = data.vaultTypeId; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.lastUsedDate != null) { + message.lastUsedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.lastUsedDate); + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + value?: ReturnType; + status?: string; + vaultLevel?: string; + vaultLevelId?: string; + vaultType?: string; + vaultTypeId?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + lastUsedDate?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.value != null) { + data.value = this.value.toObject(); + } + if (this.status != null) { + data.status = this.status; + } + if (this.vaultLevel != null) { + data.vaultLevel = this.vaultLevel; + } + if (this.vaultLevelId != null) { + data.vaultLevelId = this.vaultLevelId; + } + if (this.vaultType != null) { + data.vaultType = this.vaultType; + } + if (this.vaultTypeId != null) { + data.vaultTypeId = this.vaultTypeId; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.lastUsedDate != null) { + data.lastUsedDate = this.lastUsedDate.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.has_value) + writer.writeMessage(3, this.value, () => this.value.serialize(writer)); + if (this.status.length) + writer.writeString(4, this.status); + if (this.vaultLevel.length) + writer.writeString(5, this.vaultLevel); + if (this.vaultLevelId != "0") + writer.writeUint64String(6, this.vaultLevelId); + if (this.vaultType.length) + writer.writeString(7, this.vaultType); + if (this.vaultTypeId != "0") + writer.writeUint64String(8, this.vaultTypeId); + if (this.has_createdDate) + writer.writeMessage(9, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(11, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.has_lastUsedDate) + writer.writeMessage(10, this.lastUsedDate, () => this.lastUsedDate.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VaultCredential { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VaultCredential(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + reader.readMessage(message.value, () => message.value = dependency_2.google.protobuf.Struct.deserialize(reader)); + break; + case 4: + message.status = reader.readString(); + break; + case 5: + message.vaultLevel = reader.readString(); + break; + case 6: + message.vaultLevelId = reader.readUint64String(); + break; + case 7: + message.vaultType = reader.readString(); + break; + case 8: + message.vaultTypeId = reader.readUint64String(); + break; + case 9: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 11: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 10: + reader.readMessage(message.lastUsedDate, () => message.lastUsedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VaultCredential { + return VaultCredential.deserialize(bytes); + } + } + export class CreateProviderCredentialRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + providerId?: string; + credential?: dependency_2.google.protobuf.Struct; + name?: string; + providerName?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("providerId" in data && data.providerId != undefined) { + this.providerId = data.providerId; + } + if ("credential" in data && data.credential != undefined) { + this.credential = data.credential; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("providerName" in data && data.providerName != undefined) { + this.providerName = data.providerName; + } + } + } + get providerId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set providerId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get credential() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Struct, 2) as dependency_2.google.protobuf.Struct; + } + set credential(value: dependency_2.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_credential() { + return pb_1.Message.getField(this, 2) != null; + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 3, value); + } + get providerName() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set providerName(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + providerId?: string; + credential?: ReturnType; + name?: string; + providerName?: string; + }): CreateProviderCredentialRequest { + const message = new CreateProviderCredentialRequest({}); + if (data.providerId != null) { + message.providerId = data.providerId; + } + if (data.credential != null) { + message.credential = dependency_2.google.protobuf.Struct.fromObject(data.credential); + } + if (data.name != null) { + message.name = data.name; + } + if (data.providerName != null) { + message.providerName = data.providerName; + } + return message; + } + toObject() { + const data: { + providerId?: string; + credential?: ReturnType; + name?: string; + providerName?: string; + } = {}; + if (this.providerId != null) { + data.providerId = this.providerId; + } + if (this.credential != null) { + data.credential = this.credential.toObject(); + } + if (this.name != null) { + data.name = this.name; + } + if (this.providerName != null) { + data.providerName = this.providerName; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.providerId != "0") + writer.writeUint64String(1, this.providerId); + if (this.has_credential) + writer.writeMessage(2, this.credential, () => this.credential.serialize(writer)); + if (this.name.length) + writer.writeString(3, this.name); + if (this.providerName.length) + writer.writeString(4, this.providerName); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateProviderCredentialRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateProviderCredentialRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.providerId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.credential, () => message.credential = dependency_2.google.protobuf.Struct.deserialize(reader)); + break; + case 3: + message.name = reader.readString(); + break; + case 4: + message.providerName = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateProviderCredentialRequest { + return CreateProviderCredentialRequest.deserialize(bytes); + } + } + export class CreateToolCredentialRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + toolId?: string; + credential?: dependency_2.google.protobuf.Struct; + name?: string; + toolName?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("toolId" in data && data.toolId != undefined) { + this.toolId = data.toolId; + } + if ("credential" in data && data.credential != undefined) { + this.credential = data.credential; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("toolName" in data && data.toolName != undefined) { + this.toolName = data.toolName; + } + } + } + get toolId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set toolId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get credential() { + return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Struct, 2) as dependency_2.google.protobuf.Struct; + } + set credential(value: dependency_2.google.protobuf.Struct) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_credential() { + return pb_1.Message.getField(this, 2) != null; + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 3, value); + } + get toolName() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set toolName(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + toolId?: string; + credential?: ReturnType; + name?: string; + toolName?: string; + }): CreateToolCredentialRequest { + const message = new CreateToolCredentialRequest({}); + if (data.toolId != null) { + message.toolId = data.toolId; + } + if (data.credential != null) { + message.credential = dependency_2.google.protobuf.Struct.fromObject(data.credential); + } + if (data.name != null) { + message.name = data.name; + } + if (data.toolName != null) { + message.toolName = data.toolName; + } + return message; + } + toObject() { + const data: { + toolId?: string; + credential?: ReturnType; + name?: string; + toolName?: string; + } = {}; + if (this.toolId != null) { + data.toolId = this.toolId; + } + if (this.credential != null) { + data.credential = this.credential.toObject(); + } + if (this.name != null) { + data.name = this.name; + } + if (this.toolName != null) { + data.toolName = this.toolName; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.toolId != "0") + writer.writeUint64String(1, this.toolId); + if (this.has_credential) + writer.writeMessage(2, this.credential, () => this.credential.serialize(writer)); + if (this.name.length) + writer.writeString(3, this.name); + if (this.toolName.length) + writer.writeString(4, this.toolName); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateToolCredentialRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateToolCredentialRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.toolId = reader.readUint64String(); + break; + case 2: + reader.readMessage(message.credential, () => message.credential = dependency_2.google.protobuf.Struct.deserialize(reader)); + break; + case 3: + message.name = reader.readString(); + break; + case 4: + message.toolName = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateToolCredentialRequest { + return CreateToolCredentialRequest.deserialize(bytes); + } + } + export class DeleteCredentialRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + vaultId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("vaultId" in data && data.vaultId != undefined) { + this.vaultId = data.vaultId; + } + } + } + get vaultId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set vaultId(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + vaultId?: string; + }): DeleteCredentialRequest { + const message = new DeleteCredentialRequest({}); + if (data.vaultId != null) { + message.vaultId = data.vaultId; + } + return message; + } + toObject() { + const data: { + vaultId?: string; + } = {}; + if (this.vaultId != null) { + data.vaultId = this.vaultId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.vaultId != "0") + writer.writeUint64String(1, this.vaultId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeleteCredentialRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteCredentialRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.vaultId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): DeleteCredentialRequest { + return DeleteCredentialRequest.deserialize(bytes); + } + } + export class GetAllOrganizationCredentialRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_3.Paginate; + criterias?: dependency_3.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_3.Paginate, 1) as dependency_3.Paginate; + } + set paginate(value: dependency_3.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_3.Criteria, 2) as dependency_3.Criteria[]; + } + set criterias(value: dependency_3.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllOrganizationCredentialRequest { + const message = new GetAllOrganizationCredentialRequest({}); + if (data.paginate != null) { + message.paginate = dependency_3.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_3.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_3.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_3.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllOrganizationCredentialRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllOrganizationCredentialRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_3.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.Criteria.deserialize(reader), dependency_3.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllOrganizationCredentialRequest { + return GetAllOrganizationCredentialRequest.deserialize(bytes); + } + } + export class GetAllOrganizationCredentialResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: VaultCredential[]; + error?: dependency_3.Error; + paginated?: dependency_3.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, VaultCredential, 3) as VaultCredential[]; + } + set data(value: VaultCredential[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_3.Paginated, 5) as dependency_3.Paginated; + } + set paginated(value: dependency_3.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllOrganizationCredentialResponse { + const message = new GetAllOrganizationCredentialResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => VaultCredential.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_3.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: VaultCredential) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: VaultCredential) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllOrganizationCredentialResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllOrganizationCredentialResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, VaultCredential.deserialize(reader), VaultCredential)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_3.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllOrganizationCredentialResponse { + return GetAllOrganizationCredentialResponse.deserialize(bytes); + } + } + export class GetProviderCredentialRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + providerId?: string; + organizationId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("providerId" in data && data.providerId != undefined) { + this.providerId = data.providerId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + } + } + get providerId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set providerId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 4, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + providerId?: string; + organizationId?: string; + }): GetProviderCredentialRequest { + const message = new GetProviderCredentialRequest({}); + if (data.providerId != null) { + message.providerId = data.providerId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + return message; + } + toObject() { + const data: { + providerId?: string; + organizationId?: string; + } = {}; + if (this.providerId != null) { + data.providerId = this.providerId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.providerId != "0") + writer.writeUint64String(3, this.providerId); + if (this.organizationId != "0") + writer.writeUint64String(4, this.organizationId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetProviderCredentialRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetProviderCredentialRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 3: + message.providerId = reader.readUint64String(); + break; + case 4: + message.organizationId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetProviderCredentialRequest { + return GetProviderCredentialRequest.deserialize(bytes); + } + } + export class GetCredentialResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: VaultCredential; + error?: dependency_3.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, VaultCredential, 3) as VaultCredential; + } + set data(value: VaultCredential) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_3.Error, 4) as dependency_3.Error; + } + set error(value: dependency_3.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetCredentialResponse { + const message = new GetCredentialResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = VaultCredential.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_3.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetCredentialResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetCredentialResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = VaultCredential.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_3.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetCredentialResponse { + return GetCredentialResponse.deserialize(bytes); + } + } + export class GetCredentialRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + vaultId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("vaultId" in data && data.vaultId != undefined) { + this.vaultId = data.vaultId; + } + } + } + get vaultId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set vaultId(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + vaultId?: string; + }): GetCredentialRequest { + const message = new GetCredentialRequest({}); + if (data.vaultId != null) { + message.vaultId = data.vaultId; + } + return message; + } + toObject() { + const data: { + vaultId?: string; + } = {}; + if (this.vaultId != null) { + data.vaultId = this.vaultId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.vaultId != "0") + writer.writeUint64String(1, this.vaultId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetCredentialRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetCredentialRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.vaultId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetCredentialRequest { + return GetCredentialRequest.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedVaultServiceService { + static definition = { + CreateProviderCredential: { + path: "/vault_api.VaultService/CreateProviderCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateProviderCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateProviderCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetCredentialResponse.deserialize(new Uint8Array(bytes)) + }, + CreateToolCredential: { + path: "/vault_api.VaultService/CreateToolCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateToolCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateToolCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetCredentialResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllOrganizationCredential: { + path: "/vault_api.VaultService/GetAllOrganizationCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllOrganizationCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllOrganizationCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllOrganizationCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllOrganizationCredentialResponse.deserialize(new Uint8Array(bytes)) + }, + DeleteCredential: { + path: "/vault_api.VaultService/DeleteCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: DeleteCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => DeleteCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetCredentialResponse.deserialize(new Uint8Array(bytes)) + }, + GetProviderCredential: { + path: "/vault_api.VaultService/GetProviderCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetProviderCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetProviderCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetCredentialResponse.deserialize(new Uint8Array(bytes)) + }, + GetCredential: { + path: "/vault_api.VaultService/GetCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetCredentialResponse.deserialize(new Uint8Array(bytes)) + }, + GetOauth2Credential: { + path: "/vault_api.VaultService/GetOauth2Credential", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CreateProviderCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateToolCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllOrganizationCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract DeleteCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetProviderCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetOauth2Credential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class VaultServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedVaultServiceService.definition, "VaultService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CreateProviderCredential: GrpcUnaryServiceInterface = (message: CreateProviderCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateProviderCredential(message, metadata, options, callback); + }; + CreateToolCredential: GrpcUnaryServiceInterface = (message: CreateToolCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateToolCredential(message, metadata, options, callback); + }; + GetAllOrganizationCredential: GrpcUnaryServiceInterface = (message: GetAllOrganizationCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllOrganizationCredential(message, metadata, options, callback); + }; + DeleteCredential: GrpcUnaryServiceInterface = (message: DeleteCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.DeleteCredential(message, metadata, options, callback); + }; + GetProviderCredential: GrpcUnaryServiceInterface = (message: GetProviderCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetProviderCredential(message, metadata, options, callback); + }; + GetCredential: GrpcUnaryServiceInterface = (message: GetCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetCredential(message, metadata, options, callback); + }; + GetOauth2Credential: GrpcUnaryServiceInterface = (message: GetCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetOauth2Credential(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/vault-api_grpc_pb.d.ts b/src/clients/protos/vault-api_grpc_pb.d.ts deleted file mode 100644 index 922dc9f..0000000 --- a/src/clients/protos/vault-api_grpc_pb.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: vault_api -// file: vault-api.proto - -import * as vault_api_pb from "./vault-api_pb"; -import * as grpc from "grpc"; - -interface IVaultServiceService extends grpc.ServiceDefinition { - createProviderCredential: grpc.MethodDefinition; - createToolCredential: grpc.MethodDefinition; - getAllOrganizationCredential: grpc.MethodDefinition; - deleteCredential: grpc.MethodDefinition; - getProviderCredential: grpc.MethodDefinition; - getCredential: grpc.MethodDefinition; - getOauth2Credential: grpc.MethodDefinition; -} - -export const VaultServiceService: IVaultServiceService; - -export interface IVaultServiceServer extends grpc.UntypedServiceImplementation { - createProviderCredential: grpc.handleUnaryCall; - createToolCredential: grpc.handleUnaryCall; - getAllOrganizationCredential: grpc.handleUnaryCall; - deleteCredential: grpc.handleUnaryCall; - getProviderCredential: grpc.handleUnaryCall; - getCredential: grpc.handleUnaryCall; - getOauth2Credential: grpc.handleUnaryCall; -} - -export class VaultServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - createProviderCredential(argument: vault_api_pb.CreateProviderCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createProviderCredential(argument: vault_api_pb.CreateProviderCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createProviderCredential(argument: vault_api_pb.CreateProviderCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createToolCredential(argument: vault_api_pb.CreateToolCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createToolCredential(argument: vault_api_pb.CreateToolCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createToolCredential(argument: vault_api_pb.CreateToolCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllOrganizationCredential(argument: vault_api_pb.GetAllOrganizationCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllOrganizationCredential(argument: vault_api_pb.GetAllOrganizationCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllOrganizationCredential(argument: vault_api_pb.GetAllOrganizationCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteCredential(argument: vault_api_pb.DeleteCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteCredential(argument: vault_api_pb.DeleteCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deleteCredential(argument: vault_api_pb.DeleteCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getProviderCredential(argument: vault_api_pb.GetProviderCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getProviderCredential(argument: vault_api_pb.GetProviderCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getProviderCredential(argument: vault_api_pb.GetProviderCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getCredential(argument: vault_api_pb.GetCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getCredential(argument: vault_api_pb.GetCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getCredential(argument: vault_api_pb.GetCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getOauth2Credential(argument: vault_api_pb.GetCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getOauth2Credential(argument: vault_api_pb.GetCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getOauth2Credential(argument: vault_api_pb.GetCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/vault-api_pb.d.ts b/src/clients/protos/vault-api_pb.d.ts deleted file mode 100644 index cffabfa..0000000 --- a/src/clients/protos/vault-api_pb.d.ts +++ /dev/null @@ -1,314 +0,0 @@ -// package: vault_api -// file: vault-api.proto - -import * as jspb from "google-protobuf"; -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"; -import * as common_pb from "./common_pb"; - -export class VaultCredential extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - hasValue(): boolean; - clearValue(): void; - getValue(): google_protobuf_struct_pb.Struct | undefined; - setValue(value?: google_protobuf_struct_pb.Struct): void; - - getStatus(): string; - setStatus(value: string): void; - - getVaultlevel(): string; - setVaultlevel(value: string): void; - - getVaultlevelid(): string; - setVaultlevelid(value: string): void; - - getVaulttype(): string; - setVaulttype(value: string): void; - - getVaulttypeid(): string; - setVaulttypeid(value: string): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasLastuseddate(): boolean; - clearLastuseddate(): void; - getLastuseddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastuseddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultCredential.AsObject; - static toObject(includeInstance: boolean, msg: VaultCredential): VaultCredential.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultCredential, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultCredential; - static deserializeBinaryFromReader(message: VaultCredential, reader: jspb.BinaryReader): VaultCredential; -} - -export namespace VaultCredential { - export type AsObject = { - id: string, - name: string, - value?: google_protobuf_struct_pb.Struct.AsObject, - status: string, - vaultlevel: string, - vaultlevelid: string, - vaulttype: string, - vaulttypeid: string, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - lastuseddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class CreateProviderCredentialRequest extends jspb.Message { - getProviderid(): string; - setProviderid(value: string): void; - - hasCredential(): boolean; - clearCredential(): void; - getCredential(): google_protobuf_struct_pb.Struct | undefined; - setCredential(value?: google_protobuf_struct_pb.Struct): void; - - getName(): string; - setName(value: string): void; - - getProvidername(): string; - setProvidername(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateProviderCredentialRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateProviderCredentialRequest): CreateProviderCredentialRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateProviderCredentialRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateProviderCredentialRequest; - static deserializeBinaryFromReader(message: CreateProviderCredentialRequest, reader: jspb.BinaryReader): CreateProviderCredentialRequest; -} - -export namespace CreateProviderCredentialRequest { - export type AsObject = { - providerid: string, - credential?: google_protobuf_struct_pb.Struct.AsObject, - name: string, - providername: string, - } -} - -export class CreateToolCredentialRequest extends jspb.Message { - getToolid(): string; - setToolid(value: string): void; - - hasCredential(): boolean; - clearCredential(): void; - getCredential(): google_protobuf_struct_pb.Struct | undefined; - setCredential(value?: google_protobuf_struct_pb.Struct): void; - - getName(): string; - setName(value: string): void; - - getToolname(): string; - setToolname(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateToolCredentialRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateToolCredentialRequest): CreateToolCredentialRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateToolCredentialRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateToolCredentialRequest; - static deserializeBinaryFromReader(message: CreateToolCredentialRequest, reader: jspb.BinaryReader): CreateToolCredentialRequest; -} - -export namespace CreateToolCredentialRequest { - export type AsObject = { - toolid: string, - credential?: google_protobuf_struct_pb.Struct.AsObject, - name: string, - toolname: string, - } -} - -export class DeleteCredentialRequest extends jspb.Message { - getVaultid(): string; - setVaultid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteCredentialRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeleteCredentialRequest): DeleteCredentialRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteCredentialRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteCredentialRequest; - static deserializeBinaryFromReader(message: DeleteCredentialRequest, reader: jspb.BinaryReader): DeleteCredentialRequest; -} - -export namespace DeleteCredentialRequest { - export type AsObject = { - vaultid: string, - } -} - -export class GetAllOrganizationCredentialRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllOrganizationCredentialRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllOrganizationCredentialRequest): GetAllOrganizationCredentialRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllOrganizationCredentialRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllOrganizationCredentialRequest; - static deserializeBinaryFromReader(message: GetAllOrganizationCredentialRequest, reader: jspb.BinaryReader): GetAllOrganizationCredentialRequest; -} - -export namespace GetAllOrganizationCredentialRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllOrganizationCredentialResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: VaultCredential, index?: number): VaultCredential; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllOrganizationCredentialResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllOrganizationCredentialResponse): GetAllOrganizationCredentialResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllOrganizationCredentialResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllOrganizationCredentialResponse; - static deserializeBinaryFromReader(message: GetAllOrganizationCredentialResponse, reader: jspb.BinaryReader): GetAllOrganizationCredentialResponse; -} - -export namespace GetAllOrganizationCredentialResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class GetProviderCredentialRequest extends jspb.Message { - getProviderid(): string; - setProviderid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetProviderCredentialRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetProviderCredentialRequest): GetProviderCredentialRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetProviderCredentialRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetProviderCredentialRequest; - static deserializeBinaryFromReader(message: GetProviderCredentialRequest, reader: jspb.BinaryReader): GetProviderCredentialRequest; -} - -export namespace GetProviderCredentialRequest { - export type AsObject = { - providerid: string, - organizationid: string, - } -} - -export class GetCredentialResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): VaultCredential | undefined; - setData(value?: VaultCredential): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetCredentialResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetCredentialResponse): GetCredentialResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetCredentialResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetCredentialResponse; - static deserializeBinaryFromReader(message: GetCredentialResponse, reader: jspb.BinaryReader): GetCredentialResponse; -} - -export namespace GetCredentialResponse { - export type AsObject = { - code: number, - success: boolean, - data?: VaultCredential.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetCredentialRequest extends jspb.Message { - getVaultid(): string; - setVaultid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetCredentialRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetCredentialRequest): GetCredentialRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetCredentialRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetCredentialRequest; - static deserializeBinaryFromReader(message: GetCredentialRequest, reader: jspb.BinaryReader): GetCredentialRequest; -} - -export namespace GetCredentialRequest { - export type AsObject = { - vaultid: string, - } -} - diff --git a/src/clients/protos/web-api.ts b/src/clients/protos/web-api.ts new file mode 100644 index 0000000..bf85f5b --- /dev/null +++ b/src/clients/protos/web-api.ts @@ -0,0 +1,6861 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 3.19.1 + * source: web-api.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./google/protobuf/timestamp"; +import * as dependency_2 from "./common"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace web_api { + export class AuthenticateRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + email?: string; + password?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("email" in data && data.email != undefined) { + this.email = data.email; + } + if ("password" in data && data.password != undefined) { + this.password = data.password; + } + } + } + get email() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set email(value: string) { + pb_1.Message.setField(this, 1, value); + } + get password() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set password(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + email?: string; + password?: string; + }): AuthenticateRequest { + const message = new AuthenticateRequest({}); + if (data.email != null) { + message.email = data.email; + } + if (data.password != null) { + message.password = data.password; + } + return message; + } + toObject() { + const data: { + email?: string; + password?: string; + } = {}; + if (this.email != null) { + data.email = this.email; + } + if (this.password != null) { + data.password = this.password; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.email.length) + writer.writeString(1, this.email); + if (this.password.length) + writer.writeString(2, this.password); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuthenticateRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuthenticateRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.email = reader.readString(); + break; + case 2: + message.password = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AuthenticateRequest { + return AuthenticateRequest.deserialize(bytes); + } + } + export class RegisterUserRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + email?: string; + password?: string; + name?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("email" in data && data.email != undefined) { + this.email = data.email; + } + if ("password" in data && data.password != undefined) { + this.password = data.password; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + } + } + get email() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set email(value: string) { + pb_1.Message.setField(this, 1, value); + } + get password() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set password(value: string) { + pb_1.Message.setField(this, 2, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + email?: string; + password?: string; + name?: string; + }): RegisterUserRequest { + const message = new RegisterUserRequest({}); + if (data.email != null) { + message.email = data.email; + } + if (data.password != null) { + message.password = data.password; + } + if (data.name != null) { + message.name = data.name; + } + return message; + } + toObject() { + const data: { + email?: string; + password?: string; + name?: string; + } = {}; + if (this.email != null) { + data.email = this.email; + } + if (this.password != null) { + data.password = this.password; + } + if (this.name != null) { + data.name = this.name; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.email.length) + writer.writeString(1, this.email); + if (this.password.length) + writer.writeString(2, this.password); + if (this.name.length) + writer.writeString(3, this.name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RegisterUserRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RegisterUserRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.email = reader.readString(); + break; + case 2: + message.password = reader.readString(); + break; + case 3: + message.name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RegisterUserRequest { + return RegisterUserRequest.deserialize(bytes); + } + } + export class Token extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + token?: string; + tokenType?: string; + isExpired?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("token" in data && data.token != undefined) { + this.token = data.token; + } + if ("tokenType" in data && data.tokenType != undefined) { + this.tokenType = data.tokenType; + } + if ("isExpired" in data && data.isExpired != undefined) { + this.isExpired = data.isExpired; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get token() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set token(value: string) { + pb_1.Message.setField(this, 2, value); + } + get tokenType() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set tokenType(value: string) { + pb_1.Message.setField(this, 3, value); + } + get isExpired() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set isExpired(value: boolean) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + id?: string; + token?: string; + tokenType?: string; + isExpired?: boolean; + }): Token { + const message = new Token({}); + if (data.id != null) { + message.id = data.id; + } + if (data.token != null) { + message.token = data.token; + } + if (data.tokenType != null) { + message.tokenType = data.tokenType; + } + if (data.isExpired != null) { + message.isExpired = data.isExpired; + } + return message; + } + toObject() { + const data: { + id?: string; + token?: string; + tokenType?: string; + isExpired?: boolean; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.token != null) { + data.token = this.token; + } + if (this.tokenType != null) { + data.tokenType = this.tokenType; + } + if (this.isExpired != null) { + data.isExpired = this.isExpired; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.token.length) + writer.writeString(2, this.token); + if (this.tokenType.length) + writer.writeString(3, this.tokenType); + if (this.isExpired != false) + writer.writeBool(4, this.isExpired); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Token { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Token(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.token = reader.readString(); + break; + case 3: + message.tokenType = reader.readString(); + break; + case 4: + message.isExpired = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Token { + return Token.deserialize(bytes); + } + } + export class OrganizationRole extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + organizationId?: string; + role?: string; + organizationName?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("role" in data && data.role != undefined) { + this.role = data.role; + } + if ("organizationName" in data && data.organizationName != undefined) { + this.organizationName = data.organizationName; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get role() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set role(value: string) { + pb_1.Message.setField(this, 3, value); + } + get organizationName() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set organizationName(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + id?: string; + organizationId?: string; + role?: string; + organizationName?: string; + }): OrganizationRole { + const message = new OrganizationRole({}); + if (data.id != null) { + message.id = data.id; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.role != null) { + message.role = data.role; + } + if (data.organizationName != null) { + message.organizationName = data.organizationName; + } + return message; + } + toObject() { + const data: { + id?: string; + organizationId?: string; + role?: string; + organizationName?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.role != null) { + data.role = this.role; + } + if (this.organizationName != null) { + data.organizationName = this.organizationName; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.organizationId != "0") + writer.writeUint64String(2, this.organizationId); + if (this.role.length) + writer.writeString(3, this.role); + if (this.organizationName.length) + writer.writeString(4, this.organizationName); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OrganizationRole { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OrganizationRole(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.organizationId = reader.readUint64String(); + break; + case 3: + message.role = reader.readString(); + break; + case 4: + message.organizationName = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OrganizationRole { + return OrganizationRole.deserialize(bytes); + } + } + export class ProjectRole extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + projectId?: string; + role?: string; + projectName?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("role" in data && data.role != undefined) { + this.role = data.role; + } + if ("projectName" in data && data.projectName != undefined) { + this.projectName = data.projectName; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get role() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set role(value: string) { + pb_1.Message.setField(this, 3, value); + } + get projectName() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set projectName(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + id?: string; + projectId?: string; + role?: string; + projectName?: string; + }): ProjectRole { + const message = new ProjectRole({}); + if (data.id != null) { + message.id = data.id; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.role != null) { + message.role = data.role; + } + if (data.projectName != null) { + message.projectName = data.projectName; + } + return message; + } + toObject() { + const data: { + id?: string; + projectId?: string; + role?: string; + projectName?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.role != null) { + data.role = this.role; + } + if (this.projectName != null) { + data.projectName = this.projectName; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.projectId != "0") + writer.writeUint64String(2, this.projectId); + if (this.role.length) + writer.writeString(3, this.role); + if (this.projectName.length) + writer.writeString(4, this.projectName); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProjectRole { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProjectRole(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.projectId = reader.readUint64String(); + break; + case 3: + message.role = reader.readString(); + break; + case 4: + message.projectName = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProjectRole { + return ProjectRole.deserialize(bytes); + } + } + export class FeaturePermission extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + feature?: string; + isEnable?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("feature" in data && data.feature != undefined) { + this.feature = data.feature; + } + if ("isEnable" in data && data.isEnable != undefined) { + this.isEnable = data.isEnable; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get feature() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set feature(value: string) { + pb_1.Message.setField(this, 2, value); + } + get isEnable() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set isEnable(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + id?: string; + feature?: string; + isEnable?: boolean; + }): FeaturePermission { + const message = new FeaturePermission({}); + if (data.id != null) { + message.id = data.id; + } + if (data.feature != null) { + message.feature = data.feature; + } + if (data.isEnable != null) { + message.isEnable = data.isEnable; + } + return message; + } + toObject() { + const data: { + id?: string; + feature?: string; + isEnable?: boolean; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.feature != null) { + data.feature = this.feature; + } + if (this.isEnable != null) { + data.isEnable = this.isEnable; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.feature.length) + writer.writeString(2, this.feature); + if (this.isEnable != false) + writer.writeBool(3, this.isEnable); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FeaturePermission { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FeaturePermission(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.feature = reader.readString(); + break; + case 3: + message.isEnable = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FeaturePermission { + return FeaturePermission.deserialize(bytes); + } + } + export class Authentication extends pb_1.Message { + #one_of_decls: number[][] = [[3]]; + constructor(data?: any[] | ({ + user?: dependency_2.User; + token?: Token; + projectRoles?: ProjectRole[]; + featurePermissions?: FeaturePermission[]; + } & (({ + organizationRole?: OrganizationRole; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("user" in data && data.user != undefined) { + this.user = data.user; + } + if ("token" in data && data.token != undefined) { + this.token = data.token; + } + if ("organizationRole" in data && data.organizationRole != undefined) { + this.organizationRole = data.organizationRole; + } + if ("projectRoles" in data && data.projectRoles != undefined) { + this.projectRoles = data.projectRoles; + } + if ("featurePermissions" in data && data.featurePermissions != undefined) { + this.featurePermissions = data.featurePermissions; + } + } + } + get user() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 1) as dependency_2.User; + } + set user(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_user() { + return pb_1.Message.getField(this, 1) != null; + } + get token() { + return pb_1.Message.getWrapperField(this, Token, 2) as Token; + } + set token(value: Token) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_token() { + return pb_1.Message.getField(this, 2) != null; + } + get organizationRole() { + return pb_1.Message.getWrapperField(this, OrganizationRole, 3) as OrganizationRole; + } + set organizationRole(value: OrganizationRole) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_organizationRole() { + return pb_1.Message.getField(this, 3) != null; + } + get projectRoles() { + return pb_1.Message.getRepeatedWrapperField(this, ProjectRole, 4) as ProjectRole[]; + } + set projectRoles(value: ProjectRole[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get featurePermissions() { + return pb_1.Message.getRepeatedWrapperField(this, FeaturePermission, 5) as FeaturePermission[]; + } + set featurePermissions(value: FeaturePermission[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get _organizationRole() { + const cases: { + [index: number]: "none" | "organizationRole"; + } = { + 0: "none", + 3: "organizationRole" + }; + return cases[pb_1.Message.computeOneofCase(this, [3])]; + } + static fromObject(data: { + user?: ReturnType; + token?: ReturnType; + organizationRole?: ReturnType; + projectRoles?: ReturnType[]; + featurePermissions?: ReturnType[]; + }): Authentication { + const message = new Authentication({}); + if (data.user != null) { + message.user = dependency_2.User.fromObject(data.user); + } + if (data.token != null) { + message.token = Token.fromObject(data.token); + } + if (data.organizationRole != null) { + message.organizationRole = OrganizationRole.fromObject(data.organizationRole); + } + if (data.projectRoles != null) { + message.projectRoles = data.projectRoles.map(item => ProjectRole.fromObject(item)); + } + if (data.featurePermissions != null) { + message.featurePermissions = data.featurePermissions.map(item => FeaturePermission.fromObject(item)); + } + return message; + } + toObject() { + const data: { + user?: ReturnType; + token?: ReturnType; + organizationRole?: ReturnType; + projectRoles?: ReturnType[]; + featurePermissions?: ReturnType[]; + } = {}; + if (this.user != null) { + data.user = this.user.toObject(); + } + if (this.token != null) { + data.token = this.token.toObject(); + } + if (this.organizationRole != null) { + data.organizationRole = this.organizationRole.toObject(); + } + if (this.projectRoles != null) { + data.projectRoles = this.projectRoles.map((item: ProjectRole) => item.toObject()); + } + if (this.featurePermissions != null) { + data.featurePermissions = this.featurePermissions.map((item: FeaturePermission) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_user) + writer.writeMessage(1, this.user, () => this.user.serialize(writer)); + if (this.has_token) + writer.writeMessage(2, this.token, () => this.token.serialize(writer)); + if (this.has_organizationRole) + writer.writeMessage(3, this.organizationRole, () => this.organizationRole.serialize(writer)); + if (this.projectRoles.length) + writer.writeRepeatedMessage(4, this.projectRoles, (item: ProjectRole) => item.serialize(writer)); + if (this.featurePermissions.length) + writer.writeRepeatedMessage(5, this.featurePermissions, (item: FeaturePermission) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Authentication { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Authentication(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.user, () => message.user = dependency_2.User.deserialize(reader)); + break; + case 2: + reader.readMessage(message.token, () => message.token = Token.deserialize(reader)); + break; + case 3: + reader.readMessage(message.organizationRole, () => message.organizationRole = OrganizationRole.deserialize(reader)); + break; + case 4: + reader.readMessage(message.projectRoles, () => pb_1.Message.addToRepeatedWrapperField(message, 4, ProjectRole.deserialize(reader), ProjectRole)); + break; + case 5: + reader.readMessage(message.featurePermissions, () => pb_1.Message.addToRepeatedWrapperField(message, 5, FeaturePermission.deserialize(reader), FeaturePermission)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Authentication { + return Authentication.deserialize(bytes); + } + } + export class ScopedAuthentication extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + userId?: number; + organizationId?: number; + projectId?: number; + status?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("userId" in data && data.userId != undefined) { + this.userId = data.userId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get userId() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set userId(value: number) { + pb_1.Message.setField(this, 1, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set organizationId(value: number) { + pb_1.Message.setField(this, 2, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set projectId(value: number) { + pb_1.Message.setField(this, 3, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + userId?: number; + organizationId?: number; + projectId?: number; + status?: string; + }): ScopedAuthentication { + const message = new ScopedAuthentication({}); + if (data.userId != null) { + message.userId = data.userId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + userId?: number; + organizationId?: number; + projectId?: number; + status?: string; + } = {}; + if (this.userId != null) { + data.userId = this.userId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.status != null) { + data.status = this.status; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.userId != 0) + writer.writeUint64(1, this.userId); + if (this.organizationId != 0) + writer.writeUint64(2, this.organizationId); + if (this.projectId != 0) + writer.writeUint64(3, this.projectId); + if (this.status.length) + writer.writeString(4, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ScopedAuthentication { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ScopedAuthentication(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.userId = reader.readUint64(); + break; + case 2: + message.organizationId = reader.readUint64(); + break; + case 3: + message.projectId = reader.readUint64(); + break; + case 4: + message.status = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ScopedAuthentication { + return ScopedAuthentication.deserialize(bytes); + } + } + export class AuthenticationError extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + errorCode?: string; + errorMessage?: string; + humanMessage?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("errorCode" in data && data.errorCode != undefined) { + this.errorCode = data.errorCode; + } + if ("errorMessage" in data && data.errorMessage != undefined) { + this.errorMessage = data.errorMessage; + } + if ("humanMessage" in data && data.humanMessage != undefined) { + this.humanMessage = data.humanMessage; + } + } + } + get errorCode() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set errorCode(value: string) { + pb_1.Message.setField(this, 1, value); + } + get errorMessage() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set errorMessage(value: string) { + pb_1.Message.setField(this, 2, value); + } + get humanMessage() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set humanMessage(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + errorCode?: string; + errorMessage?: string; + humanMessage?: string; + }): AuthenticationError { + const message = new AuthenticationError({}); + if (data.errorCode != null) { + message.errorCode = data.errorCode; + } + if (data.errorMessage != null) { + message.errorMessage = data.errorMessage; + } + if (data.humanMessage != null) { + message.humanMessage = data.humanMessage; + } + return message; + } + toObject() { + const data: { + errorCode?: string; + errorMessage?: string; + humanMessage?: string; + } = {}; + if (this.errorCode != null) { + data.errorCode = this.errorCode; + } + if (this.errorMessage != null) { + data.errorMessage = this.errorMessage; + } + if (this.humanMessage != null) { + data.humanMessage = this.humanMessage; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.errorCode != "0") + writer.writeUint64String(1, this.errorCode); + if (this.errorMessage.length) + writer.writeString(2, this.errorMessage); + if (this.humanMessage.length) + writer.writeString(3, this.humanMessage); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuthenticationError { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuthenticationError(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.errorCode = reader.readUint64String(); + break; + case 2: + message.errorMessage = reader.readString(); + break; + case 3: + message.humanMessage = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AuthenticationError { + return AuthenticationError.deserialize(bytes); + } + } + export class AuthenticateResponse extends pb_1.Message { + #one_of_decls: number[][] = [[3], [4]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + } & (({ + data?: Authentication; + }) | ({ + error?: AuthenticationError; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, Authentication, 3) as Authentication; + } + set data(value: Authentication) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, AuthenticationError, 4) as AuthenticationError; + } + set error(value: AuthenticationError) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[1], value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get _data() { + const cases: { + [index: number]: "none" | "data"; + } = { + 0: "none", + 3: "data" + }; + return cases[pb_1.Message.computeOneofCase(this, [3])]; + } + get _error() { + const cases: { + [index: number]: "none" | "error"; + } = { + 0: "none", + 4: "error" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): AuthenticateResponse { + const message = new AuthenticateResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = Authentication.fromObject(data.data); + } + if (data.error != null) { + message.error = AuthenticationError.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuthenticateResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuthenticateResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = Authentication.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = AuthenticationError.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AuthenticateResponse { + return AuthenticateResponse.deserialize(bytes); + } + } + export class ForgotPasswordRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + email?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("email" in data && data.email != undefined) { + this.email = data.email; + } + } + } + get email() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set email(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + email?: string; + }): ForgotPasswordRequest { + const message = new ForgotPasswordRequest({}); + if (data.email != null) { + message.email = data.email; + } + return message; + } + toObject() { + const data: { + email?: string; + } = {}; + if (this.email != null) { + data.email = this.email; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.email.length) + writer.writeString(1, this.email); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ForgotPasswordRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ForgotPasswordRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.email = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ForgotPasswordRequest { + return ForgotPasswordRequest.deserialize(bytes); + } + } + export class ForgotPasswordResponse extends pb_1.Message { + #one_of_decls: number[][] = [[3]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + } & (({ + error?: AuthenticationError; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get error() { + return pb_1.Message.getWrapperField(this, AuthenticationError, 3) as AuthenticationError; + } + set error(value: AuthenticationError) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_error() { + return pb_1.Message.getField(this, 3) != null; + } + get _error() { + const cases: { + [index: number]: "none" | "error"; + } = { + 0: "none", + 3: "error" + }; + return cases[pb_1.Message.computeOneofCase(this, [3])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + error?: ReturnType; + }): ForgotPasswordResponse { + const message = new ForgotPasswordResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.error != null) { + message.error = AuthenticationError.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_error) + writer.writeMessage(3, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ForgotPasswordResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ForgotPasswordResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.error, () => message.error = AuthenticationError.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ForgotPasswordResponse { + return ForgotPasswordResponse.deserialize(bytes); + } + } + export class CreatePasswordRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + token?: string; + password?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("token" in data && data.token != undefined) { + this.token = data.token; + } + if ("password" in data && data.password != undefined) { + this.password = data.password; + } + } + } + get token() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set token(value: string) { + pb_1.Message.setField(this, 1, value); + } + get password() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set password(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + token?: string; + password?: string; + }): CreatePasswordRequest { + const message = new CreatePasswordRequest({}); + if (data.token != null) { + message.token = data.token; + } + if (data.password != null) { + message.password = data.password; + } + return message; + } + toObject() { + const data: { + token?: string; + password?: string; + } = {}; + if (this.token != null) { + data.token = this.token; + } + if (this.password != null) { + data.password = this.password; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.token.length) + writer.writeString(1, this.token); + if (this.password.length) + writer.writeString(2, this.password); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreatePasswordRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreatePasswordRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.token = reader.readString(); + break; + case 2: + message.password = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreatePasswordRequest { + return CreatePasswordRequest.deserialize(bytes); + } + } + export class CreatePasswordResponse extends pb_1.Message { + #one_of_decls: number[][] = [[3]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + } & (({ + error?: AuthenticationError; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get error() { + return pb_1.Message.getWrapperField(this, AuthenticationError, 3) as AuthenticationError; + } + set error(value: AuthenticationError) { + pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); + } + get has_error() { + return pb_1.Message.getField(this, 3) != null; + } + get _error() { + const cases: { + [index: number]: "none" | "error"; + } = { + 0: "none", + 3: "error" + }; + return cases[pb_1.Message.computeOneofCase(this, [3])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + error?: ReturnType; + }): CreatePasswordResponse { + const message = new CreatePasswordResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.error != null) { + message.error = AuthenticationError.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_error) + writer.writeMessage(3, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreatePasswordResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreatePasswordResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.error, () => message.error = AuthenticationError.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreatePasswordResponse { + return CreatePasswordResponse.deserialize(bytes); + } + } + export class VerifyTokenRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + tokenType?: string; + token?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("tokenType" in data && data.tokenType != undefined) { + this.tokenType = data.tokenType; + } + if ("token" in data && data.token != undefined) { + this.token = data.token; + } + } + } + get tokenType() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set tokenType(value: string) { + pb_1.Message.setField(this, 1, value); + } + get token() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set token(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + tokenType?: string; + token?: string; + }): VerifyTokenRequest { + const message = new VerifyTokenRequest({}); + if (data.tokenType != null) { + message.tokenType = data.tokenType; + } + if (data.token != null) { + message.token = data.token; + } + return message; + } + toObject() { + const data: { + tokenType?: string; + token?: string; + } = {}; + if (this.tokenType != null) { + data.tokenType = this.tokenType; + } + if (this.token != null) { + data.token = this.token; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.tokenType.length) + writer.writeString(1, this.tokenType); + if (this.token.length) + writer.writeString(2, this.token); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VerifyTokenRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VerifyTokenRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.tokenType = reader.readString(); + break; + case 2: + message.token = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VerifyTokenRequest { + return VerifyTokenRequest.deserialize(bytes); + } + } + export class VerifyTokenResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Token; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, Token, 3) as Token; + } + set data(value: Token) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + }): VerifyTokenResponse { + const message = new VerifyTokenResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = Token.fromObject(data.data); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VerifyTokenResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VerifyTokenResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = Token.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VerifyTokenResponse { + return VerifyTokenResponse.deserialize(bytes); + } + } + export class AuthorizeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | {}) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { } + } + static fromObject(data: {}): AuthorizeRequest { + const message = new AuthorizeRequest({}); + return message; + } + toObject() { + const data: {} = {}; + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuthorizeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuthorizeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AuthorizeRequest { + return AuthorizeRequest.deserialize(bytes); + } + } + export class ScopeAuthorizeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + scope?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("scope" in data && data.scope != undefined) { + this.scope = data.scope; + } + } + } + get scope() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set scope(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + scope?: string; + }): ScopeAuthorizeRequest { + const message = new ScopeAuthorizeRequest({}); + if (data.scope != null) { + message.scope = data.scope; + } + return message; + } + toObject() { + const data: { + scope?: string; + } = {}; + if (this.scope != null) { + data.scope = this.scope; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.scope.length) + writer.writeString(1, this.scope); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ScopeAuthorizeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ScopeAuthorizeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.scope = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ScopeAuthorizeRequest { + return ScopeAuthorizeRequest.deserialize(bytes); + } + } + export class ScopedAuthenticationResponse extends pb_1.Message { + #one_of_decls: number[][] = [[4]]; + constructor(data?: any[] | ({ + code?: number; + success?: boolean; + data?: ScopedAuthentication; + } & (({ + error?: AuthenticationError; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, ScopedAuthentication, 3) as ScopedAuthentication; + } + set data(value: ScopedAuthentication) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, AuthenticationError, 4) as AuthenticationError; + } + set error(value: AuthenticationError) { + pb_1.Message.setOneofWrapperField(this, 4, this.#one_of_decls[0], value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get _error() { + const cases: { + [index: number]: "none" | "error"; + } = { + 0: "none", + 4: "error" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): ScopedAuthenticationResponse { + const message = new ScopedAuthenticationResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = ScopedAuthentication.fromObject(data.data); + } + if (data.error != null) { + message.error = AuthenticationError.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ScopedAuthenticationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ScopedAuthenticationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = ScopedAuthentication.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = AuthenticationError.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ScopedAuthenticationResponse { + return ScopedAuthenticationResponse.deserialize(bytes); + } + } + export class GetUserRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | {}) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { } + } + static fromObject(data: {}): GetUserRequest { + const message = new GetUserRequest({}); + return message; + } + toObject() { + const data: {} = {}; + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetUserRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetUserRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetUserRequest { + return GetUserRequest.deserialize(bytes); + } + } + export class GetUserResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.User; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 3) as dependency_2.User; + } + set data(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + }): GetUserResponse { + const message = new GetUserResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = dependency_2.User.fromObject(data.data); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetUserResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetUserResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = dependency_2.User.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetUserResponse { + return GetUserResponse.deserialize(bytes); + } + } + export class UpdateUserRequest extends pb_1.Message { + #one_of_decls: number[][] = [[1], [2]]; + constructor(data?: any[] | ({} & (({ + email?: string; + }) | ({ + name?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("email" in data && data.email != undefined) { + this.email = data.email; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + } + } + get email() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set email(value: string) { + pb_1.Message.setOneofField(this, 1, this.#one_of_decls[0], value); + } + get has_email() { + return pb_1.Message.getField(this, 1) != null; + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setOneofField(this, 2, this.#one_of_decls[1], value); + } + get has_name() { + return pb_1.Message.getField(this, 2) != null; + } + get _email() { + const cases: { + [index: number]: "none" | "email"; + } = { + 0: "none", + 1: "email" + }; + return cases[pb_1.Message.computeOneofCase(this, [1])]; + } + get _name() { + const cases: { + [index: number]: "none" | "name"; + } = { + 0: "none", + 2: "name" + }; + return cases[pb_1.Message.computeOneofCase(this, [2])]; + } + static fromObject(data: { + email?: string; + name?: string; + }): UpdateUserRequest { + const message = new UpdateUserRequest({}); + if (data.email != null) { + message.email = data.email; + } + if (data.name != null) { + message.name = data.name; + } + return message; + } + toObject() { + const data: { + email?: string; + name?: string; + } = {}; + if (this.email != null) { + data.email = this.email; + } + if (this.name != null) { + data.name = this.name; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_email) + writer.writeString(1, this.email); + if (this.has_name) + writer.writeString(2, this.name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateUserRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateUserRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.email = reader.readString(); + break; + case 2: + message.name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateUserRequest { + return UpdateUserRequest.deserialize(bytes); + } + } + export class UpdateUserResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.User; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 3) as dependency_2.User; + } + set data(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + }): UpdateUserResponse { + const message = new UpdateUserResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = dependency_2.User.fromObject(data.data); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateUserResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateUserResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = dependency_2.User.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateUserResponse { + return UpdateUserResponse.deserialize(bytes); + } + } + export class SocialAuthenticationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + state?: string; + code?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("state" in data && data.state != undefined) { + this.state = data.state; + } + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + } + } + get state() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set state(value: string) { + pb_1.Message.setField(this, 1, value); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set code(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + state?: string; + code?: string; + }): SocialAuthenticationRequest { + const message = new SocialAuthenticationRequest({}); + if (data.state != null) { + message.state = data.state; + } + if (data.code != null) { + message.code = data.code; + } + return message; + } + toObject() { + const data: { + state?: string; + code?: string; + } = {}; + if (this.state != null) { + data.state = this.state; + } + if (this.code != null) { + data.code = this.code; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.state.length) + writer.writeString(1, this.state); + if (this.code.length) + writer.writeString(2, this.code); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SocialAuthenticationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SocialAuthenticationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.state = reader.readString(); + break; + case 2: + message.code = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SocialAuthenticationRequest { + return SocialAuthenticationRequest.deserialize(bytes); + } + } + export class GetAllUserRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllUserRequest { + const message = new GetAllUserRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllUserRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllUserRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllUserRequest { + return GetAllUserRequest.deserialize(bytes); + } + } + export class GetAllUserResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.User[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.User, 3) as dependency_2.User[]; + } + set data(value: dependency_2.User[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllUserResponse { + const message = new GetAllUserResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => dependency_2.User.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: dependency_2.User) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: dependency_2.User) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllUserResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllUserResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.User.deserialize(reader), dependency_2.User)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllUserResponse { + return GetAllUserResponse.deserialize(bytes); + } + } + export class OrganizationError extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + errorCode?: string; + errorMessage?: string; + humanMessage?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("errorCode" in data && data.errorCode != undefined) { + this.errorCode = data.errorCode; + } + if ("errorMessage" in data && data.errorMessage != undefined) { + this.errorMessage = data.errorMessage; + } + if ("humanMessage" in data && data.humanMessage != undefined) { + this.humanMessage = data.humanMessage; + } + } + } + get errorCode() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set errorCode(value: string) { + pb_1.Message.setField(this, 1, value); + } + get errorMessage() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set errorMessage(value: string) { + pb_1.Message.setField(this, 2, value); + } + get humanMessage() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set humanMessage(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + errorCode?: string; + errorMessage?: string; + humanMessage?: string; + }): OrganizationError { + const message = new OrganizationError({}); + if (data.errorCode != null) { + message.errorCode = data.errorCode; + } + if (data.errorMessage != null) { + message.errorMessage = data.errorMessage; + } + if (data.humanMessage != null) { + message.humanMessage = data.humanMessage; + } + return message; + } + toObject() { + const data: { + errorCode?: string; + errorMessage?: string; + humanMessage?: string; + } = {}; + if (this.errorCode != null) { + data.errorCode = this.errorCode; + } + if (this.errorMessage != null) { + data.errorMessage = this.errorMessage; + } + if (this.humanMessage != null) { + data.humanMessage = this.humanMessage; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.errorCode != "0") + writer.writeUint64String(1, this.errorCode); + if (this.errorMessage.length) + writer.writeString(2, this.errorMessage); + if (this.humanMessage.length) + writer.writeString(3, this.humanMessage); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OrganizationError { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OrganizationError(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.errorCode = reader.readUint64String(); + break; + case 2: + message.errorMessage = reader.readString(); + break; + case 3: + message.humanMessage = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OrganizationError { + return OrganizationError.deserialize(bytes); + } + } + export class CreateOrganizationRequest extends pb_1.Message { + #one_of_decls: number[][] = [[4]]; + constructor(data?: any[] | ({ + organizationName?: string; + organizationSize?: string; + organizationIndustry?: string; + } & (({ + organizationContact?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("organizationName" in data && data.organizationName != undefined) { + this.organizationName = data.organizationName; + } + if ("organizationSize" in data && data.organizationSize != undefined) { + this.organizationSize = data.organizationSize; + } + if ("organizationIndustry" in data && data.organizationIndustry != undefined) { + this.organizationIndustry = data.organizationIndustry; + } + if ("organizationContact" in data && data.organizationContact != undefined) { + this.organizationContact = data.organizationContact; + } + } + } + get organizationName() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set organizationName(value: string) { + pb_1.Message.setField(this, 1, value); + } + get organizationSize() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set organizationSize(value: string) { + pb_1.Message.setField(this, 2, value); + } + get organizationIndustry() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set organizationIndustry(value: string) { + pb_1.Message.setField(this, 3, value); + } + get organizationContact() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set organizationContact(value: string) { + pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value); + } + get has_organizationContact() { + return pb_1.Message.getField(this, 4) != null; + } + get _organizationContact() { + const cases: { + [index: number]: "none" | "organizationContact"; + } = { + 0: "none", + 4: "organizationContact" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + static fromObject(data: { + organizationName?: string; + organizationSize?: string; + organizationIndustry?: string; + organizationContact?: string; + }): CreateOrganizationRequest { + const message = new CreateOrganizationRequest({}); + if (data.organizationName != null) { + message.organizationName = data.organizationName; + } + if (data.organizationSize != null) { + message.organizationSize = data.organizationSize; + } + if (data.organizationIndustry != null) { + message.organizationIndustry = data.organizationIndustry; + } + if (data.organizationContact != null) { + message.organizationContact = data.organizationContact; + } + return message; + } + toObject() { + const data: { + organizationName?: string; + organizationSize?: string; + organizationIndustry?: string; + organizationContact?: string; + } = {}; + if (this.organizationName != null) { + data.organizationName = this.organizationName; + } + if (this.organizationSize != null) { + data.organizationSize = this.organizationSize; + } + if (this.organizationIndustry != null) { + data.organizationIndustry = this.organizationIndustry; + } + if (this.organizationContact != null) { + data.organizationContact = this.organizationContact; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.organizationName.length) + writer.writeString(1, this.organizationName); + if (this.organizationSize.length) + writer.writeString(2, this.organizationSize); + if (this.organizationIndustry.length) + writer.writeString(3, this.organizationIndustry); + if (this.has_organizationContact) + writer.writeString(4, this.organizationContact); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateOrganizationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateOrganizationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.organizationName = reader.readString(); + break; + case 2: + message.organizationSize = reader.readString(); + break; + case 3: + message.organizationIndustry = reader.readString(); + break; + case 4: + message.organizationContact = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateOrganizationRequest { + return CreateOrganizationRequest.deserialize(bytes); + } + } + export class UpdateOrganizationRequest extends pb_1.Message { + #one_of_decls: number[][] = [[2], [3], [4]]; + constructor(data?: any[] | ({ + organizationId?: string; + } & (({ + organizationName?: string; + }) | ({ + organizationIndustry?: string; + }) | ({ + organizationContact?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("organizationName" in data && data.organizationName != undefined) { + this.organizationName = data.organizationName; + } + if ("organizationIndustry" in data && data.organizationIndustry != undefined) { + this.organizationIndustry = data.organizationIndustry; + } + if ("organizationContact" in data && data.organizationContact != undefined) { + this.organizationContact = data.organizationContact; + } + } + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get organizationName() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set organizationName(value: string) { + pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value); + } + get has_organizationName() { + return pb_1.Message.getField(this, 2) != null; + } + get organizationIndustry() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set organizationIndustry(value: string) { + pb_1.Message.setOneofField(this, 3, this.#one_of_decls[1], value); + } + get has_organizationIndustry() { + return pb_1.Message.getField(this, 3) != null; + } + get organizationContact() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set organizationContact(value: string) { + pb_1.Message.setOneofField(this, 4, this.#one_of_decls[2], value); + } + get has_organizationContact() { + return pb_1.Message.getField(this, 4) != null; + } + get _organizationName() { + const cases: { + [index: number]: "none" | "organizationName"; + } = { + 0: "none", + 2: "organizationName" + }; + return cases[pb_1.Message.computeOneofCase(this, [2])]; + } + get _organizationIndustry() { + const cases: { + [index: number]: "none" | "organizationIndustry"; + } = { + 0: "none", + 3: "organizationIndustry" + }; + return cases[pb_1.Message.computeOneofCase(this, [3])]; + } + get _organizationContact() { + const cases: { + [index: number]: "none" | "organizationContact"; + } = { + 0: "none", + 4: "organizationContact" + }; + return cases[pb_1.Message.computeOneofCase(this, [4])]; + } + static fromObject(data: { + organizationId?: string; + organizationName?: string; + organizationIndustry?: string; + organizationContact?: string; + }): UpdateOrganizationRequest { + const message = new UpdateOrganizationRequest({}); + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.organizationName != null) { + message.organizationName = data.organizationName; + } + if (data.organizationIndustry != null) { + message.organizationIndustry = data.organizationIndustry; + } + if (data.organizationContact != null) { + message.organizationContact = data.organizationContact; + } + return message; + } + toObject() { + const data: { + organizationId?: string; + organizationName?: string; + organizationIndustry?: string; + organizationContact?: string; + } = {}; + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.organizationName != null) { + data.organizationName = this.organizationName; + } + if (this.organizationIndustry != null) { + data.organizationIndustry = this.organizationIndustry; + } + if (this.organizationContact != null) { + data.organizationContact = this.organizationContact; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.organizationId != "0") + writer.writeUint64String(1, this.organizationId); + if (this.has_organizationName) + writer.writeString(2, this.organizationName); + if (this.has_organizationIndustry) + writer.writeString(3, this.organizationIndustry); + if (this.has_organizationContact) + writer.writeString(4, this.organizationContact); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateOrganizationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateOrganizationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.organizationId = reader.readUint64String(); + break; + case 2: + message.organizationName = reader.readString(); + break; + case 3: + message.organizationIndustry = reader.readString(); + break; + case 4: + message.organizationContact = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateOrganizationRequest { + return UpdateOrganizationRequest.deserialize(bytes); + } + } + export class GetOrganizationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | {}) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { } + } + static fromObject(data: {}): GetOrganizationRequest { + const message = new GetOrganizationRequest({}); + return message; + } + toObject() { + const data: {} = {}; + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetOrganizationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetOrganizationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetOrganizationRequest { + return GetOrganizationRequest.deserialize(bytes); + } + } + export class GetOrganizationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.Organization; + role?: OrganizationRole; + error?: OrganizationError; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("role" in data && data.role != undefined) { + this.role = data.role; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_2.Organization, 3) as dependency_2.Organization; + } + set data(value: dependency_2.Organization) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get role() { + return pb_1.Message.getWrapperField(this, OrganizationRole, 4) as OrganizationRole; + } + set role(value: OrganizationRole) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_role() { + return pb_1.Message.getField(this, 4) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, OrganizationError, 5) as OrganizationError; + } + set error(value: OrganizationError) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_error() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + role?: ReturnType; + error?: ReturnType; + }): GetOrganizationResponse { + const message = new GetOrganizationResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = dependency_2.Organization.fromObject(data.data); + } + if (data.role != null) { + message.role = OrganizationRole.fromObject(data.role); + } + if (data.error != null) { + message.error = OrganizationError.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + role?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.role != null) { + data.role = this.role.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_role) + writer.writeMessage(4, this.role, () => this.role.serialize(writer)); + if (this.has_error) + writer.writeMessage(5, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetOrganizationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetOrganizationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = dependency_2.Organization.deserialize(reader)); + break; + case 4: + reader.readMessage(message.role, () => message.role = OrganizationRole.deserialize(reader)); + break; + case 5: + reader.readMessage(message.error, () => message.error = OrganizationError.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetOrganizationResponse { + return GetOrganizationResponse.deserialize(bytes); + } + } + export class CreateOrganizationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: dependency_2.Organization; + role?: OrganizationRole; + error?: OrganizationError; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("role" in data && data.role != undefined) { + this.role = data.role; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, dependency_2.Organization, 3) as dependency_2.Organization; + } + set data(value: dependency_2.Organization) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get role() { + return pb_1.Message.getWrapperField(this, OrganizationRole, 4) as OrganizationRole; + } + set role(value: OrganizationRole) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_role() { + return pb_1.Message.getField(this, 4) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, OrganizationError, 5) as OrganizationError; + } + set error(value: OrganizationError) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_error() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + role?: ReturnType; + error?: ReturnType; + }): CreateOrganizationResponse { + const message = new CreateOrganizationResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = dependency_2.Organization.fromObject(data.data); + } + if (data.role != null) { + message.role = OrganizationRole.fromObject(data.role); + } + if (data.error != null) { + message.error = OrganizationError.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + role?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.role != null) { + data.role = this.role.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_role) + writer.writeMessage(4, this.role, () => this.role.serialize(writer)); + if (this.has_error) + writer.writeMessage(5, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateOrganizationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateOrganizationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = dependency_2.Organization.deserialize(reader)); + break; + case 4: + reader.readMessage(message.role, () => message.role = OrganizationRole.deserialize(reader)); + break; + case 5: + reader.readMessage(message.error, () => message.error = OrganizationError.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateOrganizationResponse { + return CreateOrganizationResponse.deserialize(bytes); + } + } + export class UpdateOrganizationResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + error?: OrganizationError; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get error() { + return pb_1.Message.getWrapperField(this, OrganizationError, 5) as OrganizationError; + } + set error(value: OrganizationError) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_error() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + error?: ReturnType; + }): UpdateOrganizationResponse { + const message = new UpdateOrganizationResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.error != null) { + message.error = OrganizationError.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_error) + writer.writeMessage(5, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateOrganizationResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateOrganizationResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 5: + reader.readMessage(message.error, () => message.error = OrganizationError.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateOrganizationResponse { + return UpdateOrganizationResponse.deserialize(bytes); + } + } + export class UpdateBillingInformationRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paymentMethod?: string; + billingInterval?: UpdateBillingInformationRequest.BillingInterval; + taxInformation?: string; + address?: string; + email?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paymentMethod" in data && data.paymentMethod != undefined) { + this.paymentMethod = data.paymentMethod; + } + if ("billingInterval" in data && data.billingInterval != undefined) { + this.billingInterval = data.billingInterval; + } + if ("taxInformation" in data && data.taxInformation != undefined) { + this.taxInformation = data.taxInformation; + } + if ("address" in data && data.address != undefined) { + this.address = data.address; + } + if ("email" in data && data.email != undefined) { + this.email = data.email; + } + } + } + get paymentMethod() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set paymentMethod(value: string) { + pb_1.Message.setField(this, 1, value); + } + get billingInterval() { + return pb_1.Message.getFieldWithDefault(this, 2, UpdateBillingInformationRequest.BillingInterval.Annually) as UpdateBillingInformationRequest.BillingInterval; + } + set billingInterval(value: UpdateBillingInformationRequest.BillingInterval) { + pb_1.Message.setField(this, 2, value); + } + get taxInformation() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set taxInformation(value: string) { + pb_1.Message.setField(this, 3, value); + } + get address() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set address(value: string) { + pb_1.Message.setField(this, 4, value); + } + get email() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set email(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + paymentMethod?: string; + billingInterval?: UpdateBillingInformationRequest.BillingInterval; + taxInformation?: string; + address?: string; + email?: string; + }): UpdateBillingInformationRequest { + const message = new UpdateBillingInformationRequest({}); + if (data.paymentMethod != null) { + message.paymentMethod = data.paymentMethod; + } + if (data.billingInterval != null) { + message.billingInterval = data.billingInterval; + } + if (data.taxInformation != null) { + message.taxInformation = data.taxInformation; + } + if (data.address != null) { + message.address = data.address; + } + if (data.email != null) { + message.email = data.email; + } + return message; + } + toObject() { + const data: { + paymentMethod?: string; + billingInterval?: UpdateBillingInformationRequest.BillingInterval; + taxInformation?: string; + address?: string; + email?: string; + } = {}; + if (this.paymentMethod != null) { + data.paymentMethod = this.paymentMethod; + } + if (this.billingInterval != null) { + data.billingInterval = this.billingInterval; + } + if (this.taxInformation != null) { + data.taxInformation = this.taxInformation; + } + if (this.address != null) { + data.address = this.address; + } + if (this.email != null) { + data.email = this.email; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.paymentMethod.length) + writer.writeString(1, this.paymentMethod); + if (this.billingInterval != UpdateBillingInformationRequest.BillingInterval.Annually) + writer.writeEnum(2, this.billingInterval); + if (this.taxInformation.length) + writer.writeString(3, this.taxInformation); + if (this.address.length) + writer.writeString(4, this.address); + if (this.email.length) + writer.writeString(5, this.email); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateBillingInformationRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateBillingInformationRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.paymentMethod = reader.readString(); + break; + case 2: + message.billingInterval = reader.readEnum(); + break; + case 3: + message.taxInformation = reader.readString(); + break; + case 4: + message.address = reader.readString(); + break; + case 5: + message.email = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateBillingInformationRequest { + return UpdateBillingInformationRequest.deserialize(bytes); + } + } + export namespace UpdateBillingInformationRequest { + export enum BillingInterval { + Annually = 0, + Monthly = 1 + } + } + export class Project extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + name?: string; + description?: string; + members?: dependency_2.User[]; + status?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("members" in data && data.members != undefined) { + this.members = data.members; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get members() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.User, 4) as dependency_2.User[]; + } + set members(value: dependency_2.User[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 5, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 6) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 6) != null; + } + static fromObject(data: { + id?: string; + name?: string; + description?: string; + members?: ReturnType[]; + status?: string; + createdDate?: ReturnType; + }): Project { + const message = new Project({}); + if (data.id != null) { + message.id = data.id; + } + if (data.name != null) { + message.name = data.name; + } + if (data.description != null) { + message.description = data.description; + } + if (data.members != null) { + message.members = data.members.map(item => dependency_2.User.fromObject(item)); + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + return message; + } + toObject() { + const data: { + id?: string; + name?: string; + description?: string; + members?: ReturnType[]; + status?: string; + createdDate?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.name != null) { + data.name = this.name; + } + if (this.description != null) { + data.description = this.description; + } + if (this.members != null) { + data.members = this.members.map((item: dependency_2.User) => item.toObject()); + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.name.length) + writer.writeString(2, this.name); + if (this.description.length) + writer.writeString(3, this.description); + if (this.members.length) + writer.writeRepeatedMessage(4, this.members, (item: dependency_2.User) => item.serialize(writer)); + if (this.status.length) + writer.writeString(5, this.status); + if (this.has_createdDate) + writer.writeMessage(6, this.createdDate, () => this.createdDate.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Project { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Project(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + reader.readMessage(message.members, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.User.deserialize(reader), dependency_2.User)); + break; + case 5: + message.status = reader.readString(); + break; + case 6: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Project { + return Project.deserialize(bytes); + } + } + export class CreateProjectRequest extends pb_1.Message { + #one_of_decls: number[][] = [[2]]; + constructor(data?: any[] | ({ + projectName?: string; + } & (({ + projectDescription?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("projectName" in data && data.projectName != undefined) { + this.projectName = data.projectName; + } + if ("projectDescription" in data && data.projectDescription != undefined) { + this.projectDescription = data.projectDescription; + } + } + } + get projectName() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set projectName(value: string) { + pb_1.Message.setField(this, 1, value); + } + get projectDescription() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set projectDescription(value: string) { + pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value); + } + get has_projectDescription() { + return pb_1.Message.getField(this, 2) != null; + } + get _projectDescription() { + const cases: { + [index: number]: "none" | "projectDescription"; + } = { + 0: "none", + 2: "projectDescription" + }; + return cases[pb_1.Message.computeOneofCase(this, [2])]; + } + static fromObject(data: { + projectName?: string; + projectDescription?: string; + }): CreateProjectRequest { + const message = new CreateProjectRequest({}); + if (data.projectName != null) { + message.projectName = data.projectName; + } + if (data.projectDescription != null) { + message.projectDescription = data.projectDescription; + } + return message; + } + toObject() { + const data: { + projectName?: string; + projectDescription?: string; + } = {}; + if (this.projectName != null) { + data.projectName = this.projectName; + } + if (this.projectDescription != null) { + data.projectDescription = this.projectDescription; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.projectName.length) + writer.writeString(1, this.projectName); + if (this.has_projectDescription) + writer.writeString(2, this.projectDescription); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateProjectRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateProjectRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.projectName = reader.readString(); + break; + case 2: + message.projectDescription = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateProjectRequest { + return CreateProjectRequest.deserialize(bytes); + } + } + export class CreateProjectResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Project; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, Project, 3) as Project; + } + set data(value: Project) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): CreateProjectResponse { + const message = new CreateProjectResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = Project.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateProjectResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateProjectResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = Project.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateProjectResponse { + return CreateProjectResponse.deserialize(bytes); + } + } + export class UpdateProjectRequest extends pb_1.Message { + #one_of_decls: number[][] = [[2], [3]]; + constructor(data?: any[] | ({ + projectId?: string; + } & (({ + projectName?: string; + }) | ({ + projectDescription?: string; + })))) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("projectName" in data && data.projectName != undefined) { + this.projectName = data.projectName; + } + if ("projectDescription" in data && data.projectDescription != undefined) { + this.projectDescription = data.projectDescription; + } + } + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get projectName() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set projectName(value: string) { + pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value); + } + get has_projectName() { + return pb_1.Message.getField(this, 2) != null; + } + get projectDescription() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set projectDescription(value: string) { + pb_1.Message.setOneofField(this, 3, this.#one_of_decls[1], value); + } + get has_projectDescription() { + return pb_1.Message.getField(this, 3) != null; + } + get _projectName() { + const cases: { + [index: number]: "none" | "projectName"; + } = { + 0: "none", + 2: "projectName" + }; + return cases[pb_1.Message.computeOneofCase(this, [2])]; + } + get _projectDescription() { + const cases: { + [index: number]: "none" | "projectDescription"; + } = { + 0: "none", + 3: "projectDescription" + }; + return cases[pb_1.Message.computeOneofCase(this, [3])]; + } + static fromObject(data: { + projectId?: string; + projectName?: string; + projectDescription?: string; + }): UpdateProjectRequest { + const message = new UpdateProjectRequest({}); + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.projectName != null) { + message.projectName = data.projectName; + } + if (data.projectDescription != null) { + message.projectDescription = data.projectDescription; + } + return message; + } + toObject() { + const data: { + projectId?: string; + projectName?: string; + projectDescription?: string; + } = {}; + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.projectName != null) { + data.projectName = this.projectName; + } + if (this.projectDescription != null) { + data.projectDescription = this.projectDescription; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.projectId != "0") + writer.writeUint64String(1, this.projectId); + if (this.has_projectName) + writer.writeString(2, this.projectName); + if (this.has_projectDescription) + writer.writeString(3, this.projectDescription); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateProjectRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateProjectRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.projectId = reader.readUint64String(); + break; + case 2: + message.projectName = reader.readString(); + break; + case 3: + message.projectDescription = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateProjectRequest { + return UpdateProjectRequest.deserialize(bytes); + } + } + export class UpdateProjectResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Project; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, Project, 3) as Project; + } + set data(value: Project) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): UpdateProjectResponse { + const message = new UpdateProjectResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = Project.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateProjectResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateProjectResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = Project.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): UpdateProjectResponse { + return UpdateProjectResponse.deserialize(bytes); + } + } + export class GetProjectRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + projectId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + } + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + projectId?: string; + }): GetProjectRequest { + const message = new GetProjectRequest({}); + if (data.projectId != null) { + message.projectId = data.projectId; + } + return message; + } + toObject() { + const data: { + projectId?: string; + } = {}; + if (this.projectId != null) { + data.projectId = this.projectId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.projectId != "0") + writer.writeUint64String(1, this.projectId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetProjectRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetProjectRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.projectId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetProjectRequest { + return GetProjectRequest.deserialize(bytes); + } + } + export class GetProjectResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Project; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, Project, 3) as Project; + } + set data(value: Project) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): GetProjectResponse { + const message = new GetProjectResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = Project.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetProjectResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetProjectResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = Project.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetProjectResponse { + return GetProjectResponse.deserialize(bytes); + } + } + export class GetAllProjectRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + }): GetAllProjectRequest { + const message = new GetAllProjectRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllProjectRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllProjectRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllProjectRequest { + return GetAllProjectRequest.deserialize(bytes); + } + } + export class GetAllProjectResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Project[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, Project, 3) as Project[]; + } + set data(value: Project[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllProjectResponse { + const message = new GetAllProjectResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => Project.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: Project) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: Project) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllProjectResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllProjectResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Project.deserialize(reader), Project)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllProjectResponse { + return GetAllProjectResponse.deserialize(bytes); + } + } + export class AddUsersToProjectRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + email?: string; + role?: string; + projectIds?: string[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("email" in data && data.email != undefined) { + this.email = data.email; + } + if ("role" in data && data.role != undefined) { + this.role = data.role; + } + if ("projectIds" in data && data.projectIds != undefined) { + this.projectIds = data.projectIds; + } + } + } + get email() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set email(value: string) { + pb_1.Message.setField(this, 1, value); + } + get role() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set role(value: string) { + pb_1.Message.setField(this, 2, value); + } + get projectIds() { + return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; + } + set projectIds(value: string[]) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + email?: string; + role?: string; + projectIds?: string[]; + }): AddUsersToProjectRequest { + const message = new AddUsersToProjectRequest({}); + if (data.email != null) { + message.email = data.email; + } + if (data.role != null) { + message.role = data.role; + } + if (data.projectIds != null) { + message.projectIds = data.projectIds; + } + return message; + } + toObject() { + const data: { + email?: string; + role?: string; + projectIds?: string[]; + } = {}; + if (this.email != null) { + data.email = this.email; + } + if (this.role != null) { + data.role = this.role; + } + if (this.projectIds != null) { + data.projectIds = this.projectIds; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.email.length) + writer.writeString(1, this.email); + if (this.role.length) + writer.writeString(2, this.role); + if (this.projectIds.length) + writer.writePackedUint64String(3, this.projectIds); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AddUsersToProjectRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AddUsersToProjectRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.email = reader.readString(); + break; + case 2: + message.role = reader.readString(); + break; + case 3: + message.projectIds = reader.readPackedUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AddUsersToProjectRequest { + return AddUsersToProjectRequest.deserialize(bytes); + } + } + export class ArchiveProjectRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + id?: string; + }): ArchiveProjectRequest { + const message = new ArchiveProjectRequest({}); + if (data.id != null) { + message.id = data.id; + } + return message; + } + toObject() { + const data: { + id?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ArchiveProjectRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ArchiveProjectRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ArchiveProjectRequest { + return ArchiveProjectRequest.deserialize(bytes); + } + } + export class ArchiveProjectResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + id?: string; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + id?: string; + error?: ReturnType; + }): ArchiveProjectResponse { + const message = new ArchiveProjectResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.id != null) { + message.id = data.id; + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + id?: string; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.id != null) { + data.id = this.id; + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.id != "0") + writer.writeUint64String(3, this.id); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ArchiveProjectResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ArchiveProjectResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + message.id = reader.readUint64String(); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ArchiveProjectResponse { + return ArchiveProjectResponse.deserialize(bytes); + } + } + export class AddUsersToProjectResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: Project[]; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, Project, 3) as Project[]; + } + set data(value: Project[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + }): AddUsersToProjectResponse { + const message = new AddUsersToProjectResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => Project.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: Project) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: Project) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AddUsersToProjectResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AddUsersToProjectResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Project.deserialize(reader), Project)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AddUsersToProjectResponse { + return AddUsersToProjectResponse.deserialize(bytes); + } + } + export class ProjectCredential extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + projectId?: string; + organizationId?: string; + name?: string; + key?: string; + status?: string; + createdBy?: string; + updatedBy?: string; + createdDate?: dependency_1.google.protobuf.Timestamp; + updatedDate?: dependency_1.google.protobuf.Timestamp; + createdUser?: dependency_2.User; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("organizationId" in data && data.organizationId != undefined) { + this.organizationId = data.organizationId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + if ("key" in data && data.key != undefined) { + this.key = data.key; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("createdBy" in data && data.createdBy != undefined) { + this.createdBy = data.createdBy; + } + if ("updatedBy" in data && data.updatedBy != undefined) { + this.updatedBy = data.updatedBy; + } + if ("createdDate" in data && data.createdDate != undefined) { + this.createdDate = data.createdDate; + } + if ("updatedDate" in data && data.updatedDate != undefined) { + this.updatedDate = data.updatedDate; + } + if ("createdUser" in data && data.createdUser != undefined) { + this.createdUser = data.createdUser; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 2, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 2, value); + } + get organizationId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set organizationId(value: string) { + pb_1.Message.setField(this, 3, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 4, value); + } + get key() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set key(value: string) { + pb_1.Message.setField(this, 5, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set status(value: string) { + pb_1.Message.setField(this, 6, value); + } + get createdBy() { + return pb_1.Message.getFieldWithDefault(this, 7, "0") as string; + } + set createdBy(value: string) { + pb_1.Message.setField(this, 7, value); + } + get updatedBy() { + return pb_1.Message.getFieldWithDefault(this, 8, "0") as string; + } + set updatedBy(value: string) { + pb_1.Message.setField(this, 8, value); + } + get createdDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 9) as dependency_1.google.protobuf.Timestamp; + } + set createdDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 9, value); + } + get has_createdDate() { + return pb_1.Message.getField(this, 9) != null; + } + get updatedDate() { + return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Timestamp, 10) as dependency_1.google.protobuf.Timestamp; + } + set updatedDate(value: dependency_1.google.protobuf.Timestamp) { + pb_1.Message.setWrapperField(this, 10, value); + } + get has_updatedDate() { + return pb_1.Message.getField(this, 10) != null; + } + get createdUser() { + return pb_1.Message.getWrapperField(this, dependency_2.User, 11) as dependency_2.User; + } + set createdUser(value: dependency_2.User) { + pb_1.Message.setWrapperField(this, 11, value); + } + get has_createdUser() { + return pb_1.Message.getField(this, 11) != null; + } + static fromObject(data: { + id?: string; + projectId?: string; + organizationId?: string; + name?: string; + key?: string; + status?: string; + createdBy?: string; + updatedBy?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + createdUser?: ReturnType; + }): ProjectCredential { + const message = new ProjectCredential({}); + if (data.id != null) { + message.id = data.id; + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.organizationId != null) { + message.organizationId = data.organizationId; + } + if (data.name != null) { + message.name = data.name; + } + if (data.key != null) { + message.key = data.key; + } + if (data.status != null) { + message.status = data.status; + } + if (data.createdBy != null) { + message.createdBy = data.createdBy; + } + if (data.updatedBy != null) { + message.updatedBy = data.updatedBy; + } + if (data.createdDate != null) { + message.createdDate = dependency_1.google.protobuf.Timestamp.fromObject(data.createdDate); + } + if (data.updatedDate != null) { + message.updatedDate = dependency_1.google.protobuf.Timestamp.fromObject(data.updatedDate); + } + if (data.createdUser != null) { + message.createdUser = dependency_2.User.fromObject(data.createdUser); + } + return message; + } + toObject() { + const data: { + id?: string; + projectId?: string; + organizationId?: string; + name?: string; + key?: string; + status?: string; + createdBy?: string; + updatedBy?: string; + createdDate?: ReturnType; + updatedDate?: ReturnType; + createdUser?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.organizationId != null) { + data.organizationId = this.organizationId; + } + if (this.name != null) { + data.name = this.name; + } + if (this.key != null) { + data.key = this.key; + } + if (this.status != null) { + data.status = this.status; + } + if (this.createdBy != null) { + data.createdBy = this.createdBy; + } + if (this.updatedBy != null) { + data.updatedBy = this.updatedBy; + } + if (this.createdDate != null) { + data.createdDate = this.createdDate.toObject(); + } + if (this.updatedDate != null) { + data.updatedDate = this.updatedDate.toObject(); + } + if (this.createdUser != null) { + data.createdUser = this.createdUser.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != "0") + writer.writeUint64String(1, this.id); + if (this.projectId != "0") + writer.writeUint64String(2, this.projectId); + if (this.organizationId != "0") + writer.writeUint64String(3, this.organizationId); + if (this.name.length) + writer.writeString(4, this.name); + if (this.key.length) + writer.writeString(5, this.key); + if (this.status.length) + writer.writeString(6, this.status); + if (this.createdBy != "0") + writer.writeUint64String(7, this.createdBy); + if (this.updatedBy != "0") + writer.writeUint64String(8, this.updatedBy); + if (this.has_createdDate) + writer.writeMessage(9, this.createdDate, () => this.createdDate.serialize(writer)); + if (this.has_updatedDate) + writer.writeMessage(10, this.updatedDate, () => this.updatedDate.serialize(writer)); + if (this.has_createdUser) + writer.writeMessage(11, this.createdUser, () => this.createdUser.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProjectCredential { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProjectCredential(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readUint64String(); + break; + case 2: + message.projectId = reader.readUint64String(); + break; + case 3: + message.organizationId = reader.readUint64String(); + break; + case 4: + message.name = reader.readString(); + break; + case 5: + message.key = reader.readString(); + break; + case 6: + message.status = reader.readString(); + break; + case 7: + message.createdBy = reader.readUint64String(); + break; + case 8: + message.updatedBy = reader.readUint64String(); + break; + case 9: + reader.readMessage(message.createdDate, () => message.createdDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 10: + reader.readMessage(message.updatedDate, () => message.updatedDate = dependency_1.google.protobuf.Timestamp.deserialize(reader)); + break; + case 11: + reader.readMessage(message.createdUser, () => message.createdUser = dependency_2.User.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ProjectCredential { + return ProjectCredential.deserialize(bytes); + } + } + export class CreateProjectCredentialRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + projectId?: string; + name?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + if ("name" in data && data.name != undefined) { + this.name = data.name; + } + } + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 1, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 1, value); + } + get name() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set name(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + projectId?: string; + name?: string; + }): CreateProjectCredentialRequest { + const message = new CreateProjectCredentialRequest({}); + if (data.projectId != null) { + message.projectId = data.projectId; + } + if (data.name != null) { + message.name = data.name; + } + return message; + } + toObject() { + const data: { + projectId?: string; + name?: string; + } = {}; + if (this.projectId != null) { + data.projectId = this.projectId; + } + if (this.name != null) { + data.name = this.name; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.projectId != "0") + writer.writeUint64String(1, this.projectId); + if (this.name.length) + writer.writeString(2, this.name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateProjectCredentialRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateProjectCredentialRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.projectId = reader.readUint64String(); + break; + case 2: + message.name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateProjectCredentialRequest { + return CreateProjectCredentialRequest.deserialize(bytes); + } + } + export class GetAllProjectCredentialRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + paginate?: dependency_2.Paginate; + criterias?: dependency_2.Criteria[]; + projectId?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("paginate" in data && data.paginate != undefined) { + this.paginate = data.paginate; + } + if ("criterias" in data && data.criterias != undefined) { + this.criterias = data.criterias; + } + if ("projectId" in data && data.projectId != undefined) { + this.projectId = data.projectId; + } + } + } + get paginate() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginate, 1) as dependency_2.Paginate; + } + set paginate(value: dependency_2.Paginate) { + pb_1.Message.setWrapperField(this, 1, value); + } + get has_paginate() { + return pb_1.Message.getField(this, 1) != null; + } + get criterias() { + return pb_1.Message.getRepeatedWrapperField(this, dependency_2.Criteria, 2) as dependency_2.Criteria[]; + } + set criterias(value: dependency_2.Criteria[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get projectId() { + return pb_1.Message.getFieldWithDefault(this, 3, "0") as string; + } + set projectId(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + projectId?: string; + }): GetAllProjectCredentialRequest { + const message = new GetAllProjectCredentialRequest({}); + if (data.paginate != null) { + message.paginate = dependency_2.Paginate.fromObject(data.paginate); + } + if (data.criterias != null) { + message.criterias = data.criterias.map(item => dependency_2.Criteria.fromObject(item)); + } + if (data.projectId != null) { + message.projectId = data.projectId; + } + return message; + } + toObject() { + const data: { + paginate?: ReturnType; + criterias?: ReturnType[]; + projectId?: string; + } = {}; + if (this.paginate != null) { + data.paginate = this.paginate.toObject(); + } + if (this.criterias != null) { + data.criterias = this.criterias.map((item: dependency_2.Criteria) => item.toObject()); + } + if (this.projectId != null) { + data.projectId = this.projectId; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.has_paginate) + writer.writeMessage(1, this.paginate, () => this.paginate.serialize(writer)); + if (this.criterias.length) + writer.writeRepeatedMessage(2, this.criterias, (item: dependency_2.Criteria) => item.serialize(writer)); + if (this.projectId != "0") + writer.writeUint64String(3, this.projectId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllProjectCredentialRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllProjectCredentialRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.paginate, () => message.paginate = dependency_2.Paginate.deserialize(reader)); + break; + case 2: + reader.readMessage(message.criterias, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.Criteria.deserialize(reader), dependency_2.Criteria)); + break; + case 3: + message.projectId = reader.readUint64String(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllProjectCredentialRequest { + return GetAllProjectCredentialRequest.deserialize(bytes); + } + } + export class CreateProjectCredentialResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: ProjectCredential; + error?: dependency_2.Error; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getWrapperField(this, ProjectCredential, 3) as ProjectCredential; + } + set data(value: ProjectCredential) { + pb_1.Message.setWrapperField(this, 3, value); + } + get has_data() { + return pb_1.Message.getField(this, 3) != null; + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + }): CreateProjectCredentialResponse { + const message = new CreateProjectCredentialResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = ProjectCredential.fromObject(data.data); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType; + error?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.toObject(); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.has_data) + writer.writeMessage(3, this.data, () => this.data.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateProjectCredentialResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateProjectCredentialResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => message.data = ProjectCredential.deserialize(reader)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CreateProjectCredentialResponse { + return CreateProjectCredentialResponse.deserialize(bytes); + } + } + export class GetAllProjectCredentialResponse extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + success?: boolean; + data?: ProjectCredential[]; + error?: dependency_2.Error; + paginated?: dependency_2.Paginated; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("success" in data && data.success != undefined) { + this.success = data.success; + } + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("error" in data && data.error != undefined) { + this.error = data.error; + } + if ("paginated" in data && data.paginated != undefined) { + this.paginated = data.paginated; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get success() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set success(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, ProjectCredential, 3) as ProjectCredential[]; + } + set data(value: ProjectCredential[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get error() { + return pb_1.Message.getWrapperField(this, dependency_2.Error, 4) as dependency_2.Error; + } + set error(value: dependency_2.Error) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_error() { + return pb_1.Message.getField(this, 4) != null; + } + get paginated() { + return pb_1.Message.getWrapperField(this, dependency_2.Paginated, 5) as dependency_2.Paginated; + } + set paginated(value: dependency_2.Paginated) { + pb_1.Message.setWrapperField(this, 5, value); + } + get has_paginated() { + return pb_1.Message.getField(this, 5) != null; + } + static fromObject(data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + }): GetAllProjectCredentialResponse { + const message = new GetAllProjectCredentialResponse({}); + if (data.code != null) { + message.code = data.code; + } + if (data.success != null) { + message.success = data.success; + } + if (data.data != null) { + message.data = data.data.map(item => ProjectCredential.fromObject(item)); + } + if (data.error != null) { + message.error = dependency_2.Error.fromObject(data.error); + } + if (data.paginated != null) { + message.paginated = dependency_2.Paginated.fromObject(data.paginated); + } + return message; + } + toObject() { + const data: { + code?: number; + success?: boolean; + data?: ReturnType[]; + error?: ReturnType; + paginated?: ReturnType; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.success != null) { + data.success = this.success; + } + if (this.data != null) { + data.data = this.data.map((item: ProjectCredential) => item.toObject()); + } + if (this.error != null) { + data.error = this.error.toObject(); + } + if (this.paginated != null) { + data.paginated = this.paginated.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (this.success != false) + writer.writeBool(2, this.success); + if (this.data.length) + writer.writeRepeatedMessage(3, this.data, (item: ProjectCredential) => item.serialize(writer)); + if (this.has_error) + writer.writeMessage(4, this.error, () => this.error.serialize(writer)); + if (this.has_paginated) + writer.writeMessage(5, this.paginated, () => this.paginated.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAllProjectCredentialResponse { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetAllProjectCredentialResponse(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + case 2: + message.success = reader.readBool(); + break; + case 3: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, ProjectCredential.deserialize(reader), ProjectCredential)); + break; + case 4: + reader.readMessage(message.error, () => message.error = dependency_2.Error.deserialize(reader)); + break; + case 5: + reader.readMessage(message.paginated, () => message.paginated = dependency_2.Paginated.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetAllProjectCredentialResponse { + return GetAllProjectCredentialResponse.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedAuthenticationServiceService { + static definition = { + Authenticate: { + path: "/web_api.AuthenticationService/Authenticate", + requestStream: false, + responseStream: false, + requestSerialize: (message: AuthenticateRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AuthenticateRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AuthenticateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AuthenticateResponse.deserialize(new Uint8Array(bytes)) + }, + RegisterUser: { + path: "/web_api.AuthenticationService/RegisterUser", + requestStream: false, + responseStream: false, + requestSerialize: (message: RegisterUserRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RegisterUserRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AuthenticateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AuthenticateResponse.deserialize(new Uint8Array(bytes)) + }, + Authorize: { + path: "/web_api.AuthenticationService/Authorize", + requestStream: false, + responseStream: false, + requestSerialize: (message: AuthorizeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AuthorizeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AuthenticateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AuthenticateResponse.deserialize(new Uint8Array(bytes)) + }, + ScopeAuthorize: { + path: "/web_api.AuthenticationService/ScopeAuthorize", + requestStream: false, + responseStream: false, + requestSerialize: (message: ScopeAuthorizeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ScopeAuthorizeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ScopedAuthenticationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ScopedAuthenticationResponse.deserialize(new Uint8Array(bytes)) + }, + VerifyToken: { + path: "/web_api.AuthenticationService/VerifyToken", + requestStream: false, + responseStream: false, + requestSerialize: (message: VerifyTokenRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => VerifyTokenRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: VerifyTokenResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => VerifyTokenResponse.deserialize(new Uint8Array(bytes)) + }, + ForgotPassword: { + path: "/web_api.AuthenticationService/ForgotPassword", + requestStream: false, + responseStream: false, + requestSerialize: (message: ForgotPasswordRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ForgotPasswordRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ForgotPasswordResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ForgotPasswordResponse.deserialize(new Uint8Array(bytes)) + }, + CreatePassword: { + path: "/web_api.AuthenticationService/CreatePassword", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreatePasswordRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreatePasswordRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreatePasswordResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreatePasswordResponse.deserialize(new Uint8Array(bytes)) + }, + GetUser: { + path: "/web_api.AuthenticationService/GetUser", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetUserRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetUserRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetUserResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetUserResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateUser: { + path: "/web_api.AuthenticationService/UpdateUser", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateUserRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateUserRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: UpdateUserResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => UpdateUserResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllUser: { + path: "/web_api.AuthenticationService/GetAllUser", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllUserRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllUserRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllUserResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllUserResponse.deserialize(new Uint8Array(bytes)) + }, + Linkedin: { + path: "/web_api.AuthenticationService/Linkedin", + requestStream: false, + responseStream: false, + requestSerialize: (message: SocialAuthenticationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => SocialAuthenticationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AuthenticateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AuthenticateResponse.deserialize(new Uint8Array(bytes)) + }, + Google: { + path: "/web_api.AuthenticationService/Google", + requestStream: false, + responseStream: false, + requestSerialize: (message: SocialAuthenticationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => SocialAuthenticationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AuthenticateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AuthenticateResponse.deserialize(new Uint8Array(bytes)) + }, + Github: { + path: "/web_api.AuthenticationService/Github", + requestStream: false, + responseStream: false, + requestSerialize: (message: SocialAuthenticationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => SocialAuthenticationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AuthenticateResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AuthenticateResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Authenticate(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RegisterUser(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Authorize(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ScopeAuthorize(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract VerifyToken(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ForgotPassword(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreatePassword(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetUser(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateUser(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllUser(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Linkedin(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Google(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Github(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class AuthenticationServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedAuthenticationServiceService.definition, "AuthenticationService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Authenticate: GrpcUnaryServiceInterface = (message: AuthenticateRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Authenticate(message, metadata, options, callback); + }; + RegisterUser: GrpcUnaryServiceInterface = (message: RegisterUserRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RegisterUser(message, metadata, options, callback); + }; + Authorize: GrpcUnaryServiceInterface = (message: AuthorizeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Authorize(message, metadata, options, callback); + }; + ScopeAuthorize: GrpcUnaryServiceInterface = (message: ScopeAuthorizeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ScopeAuthorize(message, metadata, options, callback); + }; + VerifyToken: GrpcUnaryServiceInterface = (message: VerifyTokenRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.VerifyToken(message, metadata, options, callback); + }; + ForgotPassword: GrpcUnaryServiceInterface = (message: ForgotPasswordRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ForgotPassword(message, metadata, options, callback); + }; + CreatePassword: GrpcUnaryServiceInterface = (message: CreatePasswordRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreatePassword(message, metadata, options, callback); + }; + GetUser: GrpcUnaryServiceInterface = (message: GetUserRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetUser(message, metadata, options, callback); + }; + UpdateUser: GrpcUnaryServiceInterface = (message: UpdateUserRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateUser(message, metadata, options, callback); + }; + GetAllUser: GrpcUnaryServiceInterface = (message: GetAllUserRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllUser(message, metadata, options, callback); + }; + Linkedin: GrpcUnaryServiceInterface = (message: SocialAuthenticationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Linkedin(message, metadata, options, callback); + }; + Google: GrpcUnaryServiceInterface = (message: SocialAuthenticationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Google(message, metadata, options, callback); + }; + Github: GrpcUnaryServiceInterface = (message: SocialAuthenticationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Github(message, metadata, options, callback); + }; + } + export abstract class UnimplementedOrganizationServiceService { + static definition = { + CreateOrganization: { + path: "/web_api.OrganizationService/CreateOrganization", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateOrganizationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateOrganizationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateOrganizationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateOrganizationResponse.deserialize(new Uint8Array(bytes)) + }, + GetOrganization: { + path: "/web_api.OrganizationService/GetOrganization", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetOrganizationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetOrganizationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetOrganizationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetOrganizationResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateOrganization: { + path: "/web_api.OrganizationService/UpdateOrganization", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateOrganizationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateOrganizationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: UpdateOrganizationResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => UpdateOrganizationResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateBillingInformation: { + path: "/web_api.OrganizationService/UpdateBillingInformation", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateBillingInformationRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateBillingInformationRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_2.BaseResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_2.BaseResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CreateOrganization(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetOrganization(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateOrganization(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateBillingInformation(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class OrganizationServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedOrganizationServiceService.definition, "OrganizationService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CreateOrganization: GrpcUnaryServiceInterface = (message: CreateOrganizationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateOrganization(message, metadata, options, callback); + }; + GetOrganization: GrpcUnaryServiceInterface = (message: GetOrganizationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetOrganization(message, metadata, options, callback); + }; + UpdateOrganization: GrpcUnaryServiceInterface = (message: UpdateOrganizationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateOrganization(message, metadata, options, callback); + }; + UpdateBillingInformation: GrpcUnaryServiceInterface = (message: UpdateBillingInformationRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateBillingInformation(message, metadata, options, callback); + }; + } + export abstract class UnimplementedProjectServiceService { + static definition = { + CreateProject: { + path: "/web_api.ProjectService/CreateProject", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateProjectRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateProjectRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateProjectResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateProjectResponse.deserialize(new Uint8Array(bytes)) + }, + UpdateProject: { + path: "/web_api.ProjectService/UpdateProject", + requestStream: false, + responseStream: false, + requestSerialize: (message: UpdateProjectRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => UpdateProjectRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: UpdateProjectResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => UpdateProjectResponse.deserialize(new Uint8Array(bytes)) + }, + GetProject: { + path: "/web_api.ProjectService/GetProject", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetProjectRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetProjectRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetProjectResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetProjectResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllProject: { + path: "/web_api.ProjectService/GetAllProject", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllProjectRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllProjectRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllProjectResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllProjectResponse.deserialize(new Uint8Array(bytes)) + }, + AddUsersToProject: { + path: "/web_api.ProjectService/AddUsersToProject", + requestStream: false, + responseStream: false, + requestSerialize: (message: AddUsersToProjectRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AddUsersToProjectRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AddUsersToProjectResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AddUsersToProjectResponse.deserialize(new Uint8Array(bytes)) + }, + ArchiveProject: { + path: "/web_api.ProjectService/ArchiveProject", + requestStream: false, + responseStream: false, + requestSerialize: (message: ArchiveProjectRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ArchiveProjectRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: ArchiveProjectResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => ArchiveProjectResponse.deserialize(new Uint8Array(bytes)) + }, + CreateProjectCredential: { + path: "/web_api.ProjectService/CreateProjectCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: CreateProjectCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CreateProjectCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CreateProjectCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CreateProjectCredentialResponse.deserialize(new Uint8Array(bytes)) + }, + GetAllProjectCredential: { + path: "/web_api.ProjectService/GetAllProjectCredential", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetAllProjectCredentialRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetAllProjectCredentialRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetAllProjectCredentialResponse) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetAllProjectCredentialResponse.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract CreateProject(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract UpdateProject(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetProject(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllProject(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AddUsersToProject(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ArchiveProject(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract CreateProjectCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetAllProjectCredential(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class ProjectServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedProjectServiceService.definition, "ProjectService", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + CreateProject: GrpcUnaryServiceInterface = (message: CreateProjectRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateProject(message, metadata, options, callback); + }; + UpdateProject: GrpcUnaryServiceInterface = (message: UpdateProjectRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.UpdateProject(message, metadata, options, callback); + }; + GetProject: GrpcUnaryServiceInterface = (message: GetProjectRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetProject(message, metadata, options, callback); + }; + GetAllProject: GrpcUnaryServiceInterface = (message: GetAllProjectRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllProject(message, metadata, options, callback); + }; + AddUsersToProject: GrpcUnaryServiceInterface = (message: AddUsersToProjectRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AddUsersToProject(message, metadata, options, callback); + }; + ArchiveProject: GrpcUnaryServiceInterface = (message: ArchiveProjectRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ArchiveProject(message, metadata, options, callback); + }; + CreateProjectCredential: GrpcUnaryServiceInterface = (message: CreateProjectCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.CreateProjectCredential(message, metadata, options, callback); + }; + GetAllProjectCredential: GrpcUnaryServiceInterface = (message: GetAllProjectCredentialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetAllProjectCredential(message, metadata, options, callback); + }; + } +} diff --git a/src/clients/protos/web-api_grpc_pb.d.ts b/src/clients/protos/web-api_grpc_pb.d.ts deleted file mode 100644 index 8327c03..0000000 --- a/src/clients/protos/web-api_grpc_pb.d.ts +++ /dev/null @@ -1,169 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// package: web_api -// file: web-api.proto - -import * as web_api_pb from "./web-api_pb"; -import * as common_pb from "./common_pb"; -import * as grpc from "grpc"; - -interface IAuthenticationServiceService extends grpc.ServiceDefinition { - authenticate: grpc.MethodDefinition; - registerUser: grpc.MethodDefinition; - authorize: grpc.MethodDefinition; - scopeAuthorize: grpc.MethodDefinition; - verifyToken: grpc.MethodDefinition; - forgotPassword: grpc.MethodDefinition; - createPassword: grpc.MethodDefinition; - getUser: grpc.MethodDefinition; - updateUser: grpc.MethodDefinition; - getAllUser: grpc.MethodDefinition; - linkedin: grpc.MethodDefinition; - google: grpc.MethodDefinition; - github: grpc.MethodDefinition; -} - -export const AuthenticationServiceService: IAuthenticationServiceService; - -export interface IAuthenticationServiceServer extends grpc.UntypedServiceImplementation { - authenticate: grpc.handleUnaryCall; - registerUser: grpc.handleUnaryCall; - authorize: grpc.handleUnaryCall; - scopeAuthorize: grpc.handleUnaryCall; - verifyToken: grpc.handleUnaryCall; - forgotPassword: grpc.handleUnaryCall; - createPassword: grpc.handleUnaryCall; - getUser: grpc.handleUnaryCall; - updateUser: grpc.handleUnaryCall; - getAllUser: grpc.handleUnaryCall; - linkedin: grpc.handleUnaryCall; - google: grpc.handleUnaryCall; - github: grpc.handleUnaryCall; -} - -export class AuthenticationServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - authenticate(argument: web_api_pb.AuthenticateRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - authenticate(argument: web_api_pb.AuthenticateRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - authenticate(argument: web_api_pb.AuthenticateRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - registerUser(argument: web_api_pb.RegisterUserRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - registerUser(argument: web_api_pb.RegisterUserRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - registerUser(argument: web_api_pb.RegisterUserRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - authorize(argument: web_api_pb.AuthorizeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - authorize(argument: web_api_pb.AuthorizeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - authorize(argument: web_api_pb.AuthorizeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - scopeAuthorize(argument: web_api_pb.ScopeAuthorizeRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - scopeAuthorize(argument: web_api_pb.ScopeAuthorizeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - scopeAuthorize(argument: web_api_pb.ScopeAuthorizeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyToken(argument: web_api_pb.VerifyTokenRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyToken(argument: web_api_pb.VerifyTokenRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verifyToken(argument: web_api_pb.VerifyTokenRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - forgotPassword(argument: web_api_pb.ForgotPasswordRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - forgotPassword(argument: web_api_pb.ForgotPasswordRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - forgotPassword(argument: web_api_pb.ForgotPasswordRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createPassword(argument: web_api_pb.CreatePasswordRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createPassword(argument: web_api_pb.CreatePasswordRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createPassword(argument: web_api_pb.CreatePasswordRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getUser(argument: web_api_pb.GetUserRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getUser(argument: web_api_pb.GetUserRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getUser(argument: web_api_pb.GetUserRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateUser(argument: web_api_pb.UpdateUserRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateUser(argument: web_api_pb.UpdateUserRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateUser(argument: web_api_pb.UpdateUserRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllUser(argument: web_api_pb.GetAllUserRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllUser(argument: web_api_pb.GetAllUserRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllUser(argument: web_api_pb.GetAllUserRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - linkedin(argument: web_api_pb.SocialAuthenticationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - linkedin(argument: web_api_pb.SocialAuthenticationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - linkedin(argument: web_api_pb.SocialAuthenticationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - google(argument: web_api_pb.SocialAuthenticationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - google(argument: web_api_pb.SocialAuthenticationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - google(argument: web_api_pb.SocialAuthenticationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - github(argument: web_api_pb.SocialAuthenticationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - github(argument: web_api_pb.SocialAuthenticationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - github(argument: web_api_pb.SocialAuthenticationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IOrganizationServiceService extends grpc.ServiceDefinition { - createOrganization: grpc.MethodDefinition; - getOrganization: grpc.MethodDefinition; - updateOrganization: grpc.MethodDefinition; - updateBillingInformation: grpc.MethodDefinition; -} - -export const OrganizationServiceService: IOrganizationServiceService; - -export interface IOrganizationServiceServer extends grpc.UntypedServiceImplementation { - createOrganization: grpc.handleUnaryCall; - getOrganization: grpc.handleUnaryCall; - updateOrganization: grpc.handleUnaryCall; - updateBillingInformation: grpc.handleUnaryCall; -} - -export class OrganizationServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - createOrganization(argument: web_api_pb.CreateOrganizationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createOrganization(argument: web_api_pb.CreateOrganizationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createOrganization(argument: web_api_pb.CreateOrganizationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getOrganization(argument: web_api_pb.GetOrganizationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getOrganization(argument: web_api_pb.GetOrganizationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getOrganization(argument: web_api_pb.GetOrganizationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateOrganization(argument: web_api_pb.UpdateOrganizationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateOrganization(argument: web_api_pb.UpdateOrganizationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateOrganization(argument: web_api_pb.UpdateOrganizationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateBillingInformation(argument: web_api_pb.UpdateBillingInformationRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateBillingInformation(argument: web_api_pb.UpdateBillingInformationRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateBillingInformation(argument: web_api_pb.UpdateBillingInformationRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} - -interface IProjectServiceService extends grpc.ServiceDefinition { - createProject: grpc.MethodDefinition; - updateProject: grpc.MethodDefinition; - getProject: grpc.MethodDefinition; - getAllProject: grpc.MethodDefinition; - addUsersToProject: grpc.MethodDefinition; - archiveProject: grpc.MethodDefinition; - createProjectCredential: grpc.MethodDefinition; - getAllProjectCredential: grpc.MethodDefinition; -} - -export const ProjectServiceService: IProjectServiceService; - -export interface IProjectServiceServer extends grpc.UntypedServiceImplementation { - createProject: grpc.handleUnaryCall; - updateProject: grpc.handleUnaryCall; - getProject: grpc.handleUnaryCall; - getAllProject: grpc.handleUnaryCall; - addUsersToProject: grpc.handleUnaryCall; - archiveProject: grpc.handleUnaryCall; - createProjectCredential: grpc.handleUnaryCall; - getAllProjectCredential: grpc.handleUnaryCall; -} - -export class ProjectServiceClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - createProject(argument: web_api_pb.CreateProjectRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createProject(argument: web_api_pb.CreateProjectRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createProject(argument: web_api_pb.CreateProjectRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateProject(argument: web_api_pb.UpdateProjectRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateProject(argument: web_api_pb.UpdateProjectRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - updateProject(argument: web_api_pb.UpdateProjectRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getProject(argument: web_api_pb.GetProjectRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getProject(argument: web_api_pb.GetProjectRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getProject(argument: web_api_pb.GetProjectRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllProject(argument: web_api_pb.GetAllProjectRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllProject(argument: web_api_pb.GetAllProjectRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllProject(argument: web_api_pb.GetAllProjectRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - addUsersToProject(argument: web_api_pb.AddUsersToProjectRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - addUsersToProject(argument: web_api_pb.AddUsersToProjectRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - addUsersToProject(argument: web_api_pb.AddUsersToProjectRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - archiveProject(argument: web_api_pb.ArchiveProjectRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - archiveProject(argument: web_api_pb.ArchiveProjectRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - archiveProject(argument: web_api_pb.ArchiveProjectRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createProjectCredential(argument: web_api_pb.CreateProjectCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createProjectCredential(argument: web_api_pb.CreateProjectCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - createProjectCredential(argument: web_api_pb.CreateProjectCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllProjectCredential(argument: web_api_pb.GetAllProjectCredentialRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllProjectCredential(argument: web_api_pb.GetAllProjectCredentialRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAllProjectCredential(argument: web_api_pb.GetAllProjectCredentialRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; -} diff --git a/src/clients/protos/web-api_pb.d.ts b/src/clients/protos/web-api_pb.d.ts deleted file mode 100644 index 43d1d29..0000000 --- a/src/clients/protos/web-api_pb.d.ts +++ /dev/null @@ -1,1646 +0,0 @@ -// package: web_api -// file: web-api.proto - -import * as jspb from "google-protobuf"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as common_pb from "./common_pb"; - -export class AuthenticateRequest extends jspb.Message { - getEmail(): string; - setEmail(value: string): void; - - getPassword(): string; - setPassword(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AuthenticateRequest.AsObject; - static toObject(includeInstance: boolean, msg: AuthenticateRequest): AuthenticateRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AuthenticateRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AuthenticateRequest; - static deserializeBinaryFromReader(message: AuthenticateRequest, reader: jspb.BinaryReader): AuthenticateRequest; -} - -export namespace AuthenticateRequest { - export type AsObject = { - email: string, - password: string, - } -} - -export class RegisterUserRequest extends jspb.Message { - getEmail(): string; - setEmail(value: string): void; - - getPassword(): string; - setPassword(value: string): void; - - getName(): string; - setName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RegisterUserRequest.AsObject; - static toObject(includeInstance: boolean, msg: RegisterUserRequest): RegisterUserRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RegisterUserRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RegisterUserRequest; - static deserializeBinaryFromReader(message: RegisterUserRequest, reader: jspb.BinaryReader): RegisterUserRequest; -} - -export namespace RegisterUserRequest { - export type AsObject = { - email: string, - password: string, - name: string, - } -} - -export class Token extends jspb.Message { - getId(): string; - setId(value: string): void; - - getToken(): string; - setToken(value: string): void; - - getTokentype(): string; - setTokentype(value: string): void; - - getIsexpired(): boolean; - setIsexpired(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Token.AsObject; - static toObject(includeInstance: boolean, msg: Token): Token.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Token, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Token; - static deserializeBinaryFromReader(message: Token, reader: jspb.BinaryReader): Token; -} - -export namespace Token { - export type AsObject = { - id: string, - token: string, - tokentype: string, - isexpired: boolean, - } -} - -export class OrganizationRole extends jspb.Message { - getId(): string; - setId(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - getRole(): string; - setRole(value: string): void; - - getOrganizationname(): string; - setOrganizationname(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrganizationRole.AsObject; - static toObject(includeInstance: boolean, msg: OrganizationRole): OrganizationRole.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrganizationRole, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrganizationRole; - static deserializeBinaryFromReader(message: OrganizationRole, reader: jspb.BinaryReader): OrganizationRole; -} - -export namespace OrganizationRole { - export type AsObject = { - id: string, - organizationid: string, - role: string, - organizationname: string, - } -} - -export class ProjectRole extends jspb.Message { - getId(): string; - setId(value: string): void; - - getProjectid(): string; - setProjectid(value: string): void; - - getRole(): string; - setRole(value: string): void; - - getProjectname(): string; - setProjectname(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProjectRole.AsObject; - static toObject(includeInstance: boolean, msg: ProjectRole): ProjectRole.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProjectRole, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProjectRole; - static deserializeBinaryFromReader(message: ProjectRole, reader: jspb.BinaryReader): ProjectRole; -} - -export namespace ProjectRole { - export type AsObject = { - id: string, - projectid: string, - role: string, - projectname: string, - } -} - -export class FeaturePermission extends jspb.Message { - getId(): string; - setId(value: string): void; - - getFeature(): string; - setFeature(value: string): void; - - getIsenable(): boolean; - setIsenable(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FeaturePermission.AsObject; - static toObject(includeInstance: boolean, msg: FeaturePermission): FeaturePermission.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FeaturePermission, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FeaturePermission; - static deserializeBinaryFromReader(message: FeaturePermission, reader: jspb.BinaryReader): FeaturePermission; -} - -export namespace FeaturePermission { - export type AsObject = { - id: string, - feature: string, - isenable: boolean, - } -} - -export class Authentication extends jspb.Message { - hasUser(): boolean; - clearUser(): void; - getUser(): common_pb.User | undefined; - setUser(value?: common_pb.User): void; - - hasToken(): boolean; - clearToken(): void; - getToken(): Token | undefined; - setToken(value?: Token): void; - - hasOrganizationrole(): boolean; - clearOrganizationrole(): void; - getOrganizationrole(): OrganizationRole | undefined; - setOrganizationrole(value?: OrganizationRole): void; - - clearProjectrolesList(): void; - getProjectrolesList(): Array; - setProjectrolesList(value: Array): void; - addProjectroles(value?: ProjectRole, index?: number): ProjectRole; - - clearFeaturepermissionsList(): void; - getFeaturepermissionsList(): Array; - setFeaturepermissionsList(value: Array): void; - addFeaturepermissions(value?: FeaturePermission, index?: number): FeaturePermission; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Authentication.AsObject; - static toObject(includeInstance: boolean, msg: Authentication): Authentication.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Authentication, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Authentication; - static deserializeBinaryFromReader(message: Authentication, reader: jspb.BinaryReader): Authentication; -} - -export namespace Authentication { - export type AsObject = { - user?: common_pb.User.AsObject, - token?: Token.AsObject, - organizationrole?: OrganizationRole.AsObject, - projectrolesList: Array, - featurepermissionsList: Array, - } -} - -export class ScopedAuthentication extends jspb.Message { - getUserid(): number; - setUserid(value: number): void; - - getOrganizationid(): number; - setOrganizationid(value: number): void; - - getProjectid(): number; - setProjectid(value: number): void; - - getStatus(): string; - setStatus(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ScopedAuthentication.AsObject; - static toObject(includeInstance: boolean, msg: ScopedAuthentication): ScopedAuthentication.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ScopedAuthentication, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ScopedAuthentication; - static deserializeBinaryFromReader(message: ScopedAuthentication, reader: jspb.BinaryReader): ScopedAuthentication; -} - -export namespace ScopedAuthentication { - export type AsObject = { - userid: number, - organizationid: number, - projectid: number, - status: string, - } -} - -export class AuthenticationError extends jspb.Message { - getErrorcode(): string; - setErrorcode(value: string): void; - - getErrormessage(): string; - setErrormessage(value: string): void; - - getHumanmessage(): string; - setHumanmessage(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AuthenticationError.AsObject; - static toObject(includeInstance: boolean, msg: AuthenticationError): AuthenticationError.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AuthenticationError, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AuthenticationError; - static deserializeBinaryFromReader(message: AuthenticationError, reader: jspb.BinaryReader): AuthenticationError; -} - -export namespace AuthenticationError { - export type AsObject = { - errorcode: string, - errormessage: string, - humanmessage: string, - } -} - -export class AuthenticateResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): Authentication | undefined; - setData(value?: Authentication): void; - - hasError(): boolean; - clearError(): void; - getError(): AuthenticationError | undefined; - setError(value?: AuthenticationError): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AuthenticateResponse.AsObject; - static toObject(includeInstance: boolean, msg: AuthenticateResponse): AuthenticateResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AuthenticateResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AuthenticateResponse; - static deserializeBinaryFromReader(message: AuthenticateResponse, reader: jspb.BinaryReader): AuthenticateResponse; -} - -export namespace AuthenticateResponse { - export type AsObject = { - code: number, - success: boolean, - data?: Authentication.AsObject, - error?: AuthenticationError.AsObject, - } -} - -export class ForgotPasswordRequest extends jspb.Message { - getEmail(): string; - setEmail(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForgotPasswordRequest.AsObject; - static toObject(includeInstance: boolean, msg: ForgotPasswordRequest): ForgotPasswordRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForgotPasswordRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForgotPasswordRequest; - static deserializeBinaryFromReader(message: ForgotPasswordRequest, reader: jspb.BinaryReader): ForgotPasswordRequest; -} - -export namespace ForgotPasswordRequest { - export type AsObject = { - email: string, - } -} - -export class ForgotPasswordResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasError(): boolean; - clearError(): void; - getError(): AuthenticationError | undefined; - setError(value?: AuthenticationError): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForgotPasswordResponse.AsObject; - static toObject(includeInstance: boolean, msg: ForgotPasswordResponse): ForgotPasswordResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForgotPasswordResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForgotPasswordResponse; - static deserializeBinaryFromReader(message: ForgotPasswordResponse, reader: jspb.BinaryReader): ForgotPasswordResponse; -} - -export namespace ForgotPasswordResponse { - export type AsObject = { - code: number, - success: boolean, - error?: AuthenticationError.AsObject, - } -} - -export class CreatePasswordRequest extends jspb.Message { - getToken(): string; - setToken(value: string): void; - - getPassword(): string; - setPassword(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreatePasswordRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreatePasswordRequest): CreatePasswordRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreatePasswordRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreatePasswordRequest; - static deserializeBinaryFromReader(message: CreatePasswordRequest, reader: jspb.BinaryReader): CreatePasswordRequest; -} - -export namespace CreatePasswordRequest { - export type AsObject = { - token: string, - password: string, - } -} - -export class CreatePasswordResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasError(): boolean; - clearError(): void; - getError(): AuthenticationError | undefined; - setError(value?: AuthenticationError): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreatePasswordResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreatePasswordResponse): CreatePasswordResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreatePasswordResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreatePasswordResponse; - static deserializeBinaryFromReader(message: CreatePasswordResponse, reader: jspb.BinaryReader): CreatePasswordResponse; -} - -export namespace CreatePasswordResponse { - export type AsObject = { - code: number, - success: boolean, - error?: AuthenticationError.AsObject, - } -} - -export class VerifyTokenRequest extends jspb.Message { - getTokentype(): string; - setTokentype(value: string): void; - - getToken(): string; - setToken(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyTokenRequest.AsObject; - static toObject(includeInstance: boolean, msg: VerifyTokenRequest): VerifyTokenRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyTokenRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyTokenRequest; - static deserializeBinaryFromReader(message: VerifyTokenRequest, reader: jspb.BinaryReader): VerifyTokenRequest; -} - -export namespace VerifyTokenRequest { - export type AsObject = { - tokentype: string, - token: string, - } -} - -export class VerifyTokenResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): Token | undefined; - setData(value?: Token): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyTokenResponse.AsObject; - static toObject(includeInstance: boolean, msg: VerifyTokenResponse): VerifyTokenResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyTokenResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyTokenResponse; - static deserializeBinaryFromReader(message: VerifyTokenResponse, reader: jspb.BinaryReader): VerifyTokenResponse; -} - -export namespace VerifyTokenResponse { - export type AsObject = { - code: number, - success: boolean, - data?: Token.AsObject, - } -} - -export class AuthorizeRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AuthorizeRequest.AsObject; - static toObject(includeInstance: boolean, msg: AuthorizeRequest): AuthorizeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AuthorizeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AuthorizeRequest; - static deserializeBinaryFromReader(message: AuthorizeRequest, reader: jspb.BinaryReader): AuthorizeRequest; -} - -export namespace AuthorizeRequest { - export type AsObject = { - } -} - -export class ScopeAuthorizeRequest extends jspb.Message { - getScope(): string; - setScope(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ScopeAuthorizeRequest.AsObject; - static toObject(includeInstance: boolean, msg: ScopeAuthorizeRequest): ScopeAuthorizeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ScopeAuthorizeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ScopeAuthorizeRequest; - static deserializeBinaryFromReader(message: ScopeAuthorizeRequest, reader: jspb.BinaryReader): ScopeAuthorizeRequest; -} - -export namespace ScopeAuthorizeRequest { - export type AsObject = { - scope: string, - } -} - -export class ScopedAuthenticationResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): ScopedAuthentication | undefined; - setData(value?: ScopedAuthentication): void; - - hasError(): boolean; - clearError(): void; - getError(): AuthenticationError | undefined; - setError(value?: AuthenticationError): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ScopedAuthenticationResponse.AsObject; - static toObject(includeInstance: boolean, msg: ScopedAuthenticationResponse): ScopedAuthenticationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ScopedAuthenticationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ScopedAuthenticationResponse; - static deserializeBinaryFromReader(message: ScopedAuthenticationResponse, reader: jspb.BinaryReader): ScopedAuthenticationResponse; -} - -export namespace ScopedAuthenticationResponse { - export type AsObject = { - code: number, - success: boolean, - data?: ScopedAuthentication.AsObject, - error?: AuthenticationError.AsObject, - } -} - -export class GetUserRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetUserRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetUserRequest): GetUserRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetUserRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetUserRequest; - static deserializeBinaryFromReader(message: GetUserRequest, reader: jspb.BinaryReader): GetUserRequest; -} - -export namespace GetUserRequest { - export type AsObject = { - } -} - -export class GetUserResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): common_pb.User | undefined; - setData(value?: common_pb.User): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetUserResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetUserResponse): GetUserResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetUserResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetUserResponse; - static deserializeBinaryFromReader(message: GetUserResponse, reader: jspb.BinaryReader): GetUserResponse; -} - -export namespace GetUserResponse { - export type AsObject = { - code: number, - success: boolean, - data?: common_pb.User.AsObject, - } -} - -export class UpdateUserRequest extends jspb.Message { - hasEmail(): boolean; - clearEmail(): void; - getEmail(): string; - setEmail(value: string): void; - - hasName(): boolean; - clearName(): void; - getName(): string; - setName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateUserRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateUserRequest): UpdateUserRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateUserRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateUserRequest; - static deserializeBinaryFromReader(message: UpdateUserRequest, reader: jspb.BinaryReader): UpdateUserRequest; -} - -export namespace UpdateUserRequest { - export type AsObject = { - email: string, - name: string, - } -} - -export class UpdateUserResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): common_pb.User | undefined; - setData(value?: common_pb.User): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateUserResponse.AsObject; - static toObject(includeInstance: boolean, msg: UpdateUserResponse): UpdateUserResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateUserResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateUserResponse; - static deserializeBinaryFromReader(message: UpdateUserResponse, reader: jspb.BinaryReader): UpdateUserResponse; -} - -export namespace UpdateUserResponse { - export type AsObject = { - code: number, - success: boolean, - data?: common_pb.User.AsObject, - } -} - -export class SocialAuthenticationRequest extends jspb.Message { - getState(): string; - setState(value: string): void; - - getCode(): string; - setCode(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SocialAuthenticationRequest.AsObject; - static toObject(includeInstance: boolean, msg: SocialAuthenticationRequest): SocialAuthenticationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SocialAuthenticationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SocialAuthenticationRequest; - static deserializeBinaryFromReader(message: SocialAuthenticationRequest, reader: jspb.BinaryReader): SocialAuthenticationRequest; -} - -export namespace SocialAuthenticationRequest { - export type AsObject = { - state: string, - code: string, - } -} - -export class GetAllUserRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllUserRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllUserRequest): GetAllUserRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllUserRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllUserRequest; - static deserializeBinaryFromReader(message: GetAllUserRequest, reader: jspb.BinaryReader): GetAllUserRequest; -} - -export namespace GetAllUserRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllUserResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.User, index?: number): common_pb.User; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllUserResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllUserResponse): GetAllUserResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllUserResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllUserResponse; - static deserializeBinaryFromReader(message: GetAllUserResponse, reader: jspb.BinaryReader): GetAllUserResponse; -} - -export namespace GetAllUserResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class OrganizationError extends jspb.Message { - getErrorcode(): string; - setErrorcode(value: string): void; - - getErrormessage(): string; - setErrormessage(value: string): void; - - getHumanmessage(): string; - setHumanmessage(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrganizationError.AsObject; - static toObject(includeInstance: boolean, msg: OrganizationError): OrganizationError.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrganizationError, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrganizationError; - static deserializeBinaryFromReader(message: OrganizationError, reader: jspb.BinaryReader): OrganizationError; -} - -export namespace OrganizationError { - export type AsObject = { - errorcode: string, - errormessage: string, - humanmessage: string, - } -} - -export class CreateOrganizationRequest extends jspb.Message { - getOrganizationname(): string; - setOrganizationname(value: string): void; - - getOrganizationsize(): string; - setOrganizationsize(value: string): void; - - getOrganizationindustry(): string; - setOrganizationindustry(value: string): void; - - hasOrganizationcontact(): boolean; - clearOrganizationcontact(): void; - getOrganizationcontact(): string; - setOrganizationcontact(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateOrganizationRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateOrganizationRequest): CreateOrganizationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateOrganizationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateOrganizationRequest; - static deserializeBinaryFromReader(message: CreateOrganizationRequest, reader: jspb.BinaryReader): CreateOrganizationRequest; -} - -export namespace CreateOrganizationRequest { - export type AsObject = { - organizationname: string, - organizationsize: string, - organizationindustry: string, - organizationcontact: string, - } -} - -export class UpdateOrganizationRequest extends jspb.Message { - getOrganizationid(): string; - setOrganizationid(value: string): void; - - hasOrganizationname(): boolean; - clearOrganizationname(): void; - getOrganizationname(): string; - setOrganizationname(value: string): void; - - hasOrganizationindustry(): boolean; - clearOrganizationindustry(): void; - getOrganizationindustry(): string; - setOrganizationindustry(value: string): void; - - hasOrganizationcontact(): boolean; - clearOrganizationcontact(): void; - getOrganizationcontact(): string; - setOrganizationcontact(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateOrganizationRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateOrganizationRequest): UpdateOrganizationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateOrganizationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateOrganizationRequest; - static deserializeBinaryFromReader(message: UpdateOrganizationRequest, reader: jspb.BinaryReader): UpdateOrganizationRequest; -} - -export namespace UpdateOrganizationRequest { - export type AsObject = { - organizationid: string, - organizationname: string, - organizationindustry: string, - organizationcontact: string, - } -} - -export class GetOrganizationRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetOrganizationRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetOrganizationRequest): GetOrganizationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetOrganizationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetOrganizationRequest; - static deserializeBinaryFromReader(message: GetOrganizationRequest, reader: jspb.BinaryReader): GetOrganizationRequest; -} - -export namespace GetOrganizationRequest { - export type AsObject = { - } -} - -export class GetOrganizationResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): common_pb.Organization | undefined; - setData(value?: common_pb.Organization): void; - - hasRole(): boolean; - clearRole(): void; - getRole(): OrganizationRole | undefined; - setRole(value?: OrganizationRole): void; - - hasError(): boolean; - clearError(): void; - getError(): OrganizationError | undefined; - setError(value?: OrganizationError): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetOrganizationResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetOrganizationResponse): GetOrganizationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetOrganizationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetOrganizationResponse; - static deserializeBinaryFromReader(message: GetOrganizationResponse, reader: jspb.BinaryReader): GetOrganizationResponse; -} - -export namespace GetOrganizationResponse { - export type AsObject = { - code: number, - success: boolean, - data?: common_pb.Organization.AsObject, - role?: OrganizationRole.AsObject, - error?: OrganizationError.AsObject, - } -} - -export class CreateOrganizationResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): common_pb.Organization | undefined; - setData(value?: common_pb.Organization): void; - - hasRole(): boolean; - clearRole(): void; - getRole(): OrganizationRole | undefined; - setRole(value?: OrganizationRole): void; - - hasError(): boolean; - clearError(): void; - getError(): OrganizationError | undefined; - setError(value?: OrganizationError): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateOrganizationResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateOrganizationResponse): CreateOrganizationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateOrganizationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateOrganizationResponse; - static deserializeBinaryFromReader(message: CreateOrganizationResponse, reader: jspb.BinaryReader): CreateOrganizationResponse; -} - -export namespace CreateOrganizationResponse { - export type AsObject = { - code: number, - success: boolean, - data?: common_pb.Organization.AsObject, - role?: OrganizationRole.AsObject, - error?: OrganizationError.AsObject, - } -} - -export class UpdateOrganizationResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasError(): boolean; - clearError(): void; - getError(): OrganizationError | undefined; - setError(value?: OrganizationError): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateOrganizationResponse.AsObject; - static toObject(includeInstance: boolean, msg: UpdateOrganizationResponse): UpdateOrganizationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateOrganizationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateOrganizationResponse; - static deserializeBinaryFromReader(message: UpdateOrganizationResponse, reader: jspb.BinaryReader): UpdateOrganizationResponse; -} - -export namespace UpdateOrganizationResponse { - export type AsObject = { - code: number, - success: boolean, - error?: OrganizationError.AsObject, - } -} - -export class UpdateBillingInformationRequest extends jspb.Message { - getPaymentmethod(): string; - setPaymentmethod(value: string): void; - - getBillinginterval(): UpdateBillingInformationRequest.BillingIntervalMap[keyof UpdateBillingInformationRequest.BillingIntervalMap]; - setBillinginterval(value: UpdateBillingInformationRequest.BillingIntervalMap[keyof UpdateBillingInformationRequest.BillingIntervalMap]): void; - - getTaxinformation(): string; - setTaxinformation(value: string): void; - - getAddress(): string; - setAddress(value: string): void; - - getEmail(): string; - setEmail(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateBillingInformationRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateBillingInformationRequest): UpdateBillingInformationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateBillingInformationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateBillingInformationRequest; - static deserializeBinaryFromReader(message: UpdateBillingInformationRequest, reader: jspb.BinaryReader): UpdateBillingInformationRequest; -} - -export namespace UpdateBillingInformationRequest { - export type AsObject = { - paymentmethod: string, - billinginterval: UpdateBillingInformationRequest.BillingIntervalMap[keyof UpdateBillingInformationRequest.BillingIntervalMap], - taxinformation: string, - address: string, - email: string, - } - - export interface BillingIntervalMap { - ANNUALLY: 0; - MONTHLY: 1; - } - - export const BillingInterval: BillingIntervalMap; -} - -export class Project extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getDescription(): string; - setDescription(value: string): void; - - clearMembersList(): void; - getMembersList(): Array; - setMembersList(value: Array): void; - addMembers(value?: common_pb.User, index?: number): common_pb.User; - - getStatus(): string; - setStatus(value: string): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Project.AsObject; - static toObject(includeInstance: boolean, msg: Project): Project.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Project, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Project; - static deserializeBinaryFromReader(message: Project, reader: jspb.BinaryReader): Project; -} - -export namespace Project { - export type AsObject = { - id: string, - name: string, - description: string, - membersList: Array, - status: string, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class CreateProjectRequest extends jspb.Message { - getProjectname(): string; - setProjectname(value: string): void; - - hasProjectdescription(): boolean; - clearProjectdescription(): void; - getProjectdescription(): string; - setProjectdescription(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateProjectRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateProjectRequest): CreateProjectRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateProjectRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateProjectRequest; - static deserializeBinaryFromReader(message: CreateProjectRequest, reader: jspb.BinaryReader): CreateProjectRequest; -} - -export namespace CreateProjectRequest { - export type AsObject = { - projectname: string, - projectdescription: string, - } -} - -export class CreateProjectResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): Project | undefined; - setData(value?: Project): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateProjectResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateProjectResponse): CreateProjectResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateProjectResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateProjectResponse; - static deserializeBinaryFromReader(message: CreateProjectResponse, reader: jspb.BinaryReader): CreateProjectResponse; -} - -export namespace CreateProjectResponse { - export type AsObject = { - code: number, - success: boolean, - data?: Project.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class UpdateProjectRequest extends jspb.Message { - getProjectid(): string; - setProjectid(value: string): void; - - hasProjectname(): boolean; - clearProjectname(): void; - getProjectname(): string; - setProjectname(value: string): void; - - hasProjectdescription(): boolean; - clearProjectdescription(): void; - getProjectdescription(): string; - setProjectdescription(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateProjectRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateProjectRequest): UpdateProjectRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateProjectRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateProjectRequest; - static deserializeBinaryFromReader(message: UpdateProjectRequest, reader: jspb.BinaryReader): UpdateProjectRequest; -} - -export namespace UpdateProjectRequest { - export type AsObject = { - projectid: string, - projectname: string, - projectdescription: string, - } -} - -export class UpdateProjectResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): Project | undefined; - setData(value?: Project): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateProjectResponse.AsObject; - static toObject(includeInstance: boolean, msg: UpdateProjectResponse): UpdateProjectResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateProjectResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateProjectResponse; - static deserializeBinaryFromReader(message: UpdateProjectResponse, reader: jspb.BinaryReader): UpdateProjectResponse; -} - -export namespace UpdateProjectResponse { - export type AsObject = { - code: number, - success: boolean, - data?: Project.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetProjectRequest extends jspb.Message { - getProjectid(): string; - setProjectid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetProjectRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetProjectRequest): GetProjectRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetProjectRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetProjectRequest; - static deserializeBinaryFromReader(message: GetProjectRequest, reader: jspb.BinaryReader): GetProjectRequest; -} - -export namespace GetProjectRequest { - export type AsObject = { - projectid: string, - } -} - -export class GetProjectResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): Project | undefined; - setData(value?: Project): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetProjectResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetProjectResponse): GetProjectResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetProjectResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetProjectResponse; - static deserializeBinaryFromReader(message: GetProjectResponse, reader: jspb.BinaryReader): GetProjectResponse; -} - -export namespace GetProjectResponse { - export type AsObject = { - code: number, - success: boolean, - data?: Project.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAllProjectRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllProjectRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllProjectRequest): GetAllProjectRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllProjectRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllProjectRequest; - static deserializeBinaryFromReader(message: GetAllProjectRequest, reader: jspb.BinaryReader): GetAllProjectRequest; -} - -export namespace GetAllProjectRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - } -} - -export class GetAllProjectResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: Project, index?: number): Project; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllProjectResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllProjectResponse): GetAllProjectResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllProjectResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllProjectResponse; - static deserializeBinaryFromReader(message: GetAllProjectResponse, reader: jspb.BinaryReader): GetAllProjectResponse; -} - -export namespace GetAllProjectResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} - -export class AddUsersToProjectRequest extends jspb.Message { - getEmail(): string; - setEmail(value: string): void; - - getRole(): string; - setRole(value: string): void; - - clearProjectidsList(): void; - getProjectidsList(): Array; - setProjectidsList(value: Array): void; - addProjectids(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddUsersToProjectRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddUsersToProjectRequest): AddUsersToProjectRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddUsersToProjectRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddUsersToProjectRequest; - static deserializeBinaryFromReader(message: AddUsersToProjectRequest, reader: jspb.BinaryReader): AddUsersToProjectRequest; -} - -export namespace AddUsersToProjectRequest { - export type AsObject = { - email: string, - role: string, - projectidsList: Array, - } -} - -export class ArchiveProjectRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ArchiveProjectRequest.AsObject; - static toObject(includeInstance: boolean, msg: ArchiveProjectRequest): ArchiveProjectRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ArchiveProjectRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ArchiveProjectRequest; - static deserializeBinaryFromReader(message: ArchiveProjectRequest, reader: jspb.BinaryReader): ArchiveProjectRequest; -} - -export namespace ArchiveProjectRequest { - export type AsObject = { - id: string, - } -} - -export class ArchiveProjectResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getId(): string; - setId(value: string): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ArchiveProjectResponse.AsObject; - static toObject(includeInstance: boolean, msg: ArchiveProjectResponse): ArchiveProjectResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ArchiveProjectResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ArchiveProjectResponse; - static deserializeBinaryFromReader(message: ArchiveProjectResponse, reader: jspb.BinaryReader): ArchiveProjectResponse; -} - -export namespace ArchiveProjectResponse { - export type AsObject = { - code: number, - success: boolean, - id: string, - error?: common_pb.Error.AsObject, - } -} - -export class AddUsersToProjectResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: Project, index?: number): Project; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddUsersToProjectResponse.AsObject; - static toObject(includeInstance: boolean, msg: AddUsersToProjectResponse): AddUsersToProjectResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddUsersToProjectResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddUsersToProjectResponse; - static deserializeBinaryFromReader(message: AddUsersToProjectResponse, reader: jspb.BinaryReader): AddUsersToProjectResponse; -} - -export namespace AddUsersToProjectResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - } -} - -export class ProjectCredential extends jspb.Message { - getId(): string; - setId(value: string): void; - - getProjectid(): string; - setProjectid(value: string): void; - - getOrganizationid(): string; - setOrganizationid(value: string): void; - - getName(): string; - setName(value: string): void; - - getKey(): string; - setKey(value: string): void; - - getStatus(): string; - setStatus(value: string): void; - - getCreatedby(): string; - setCreatedby(value: string): void; - - getUpdatedby(): string; - setUpdatedby(value: string): void; - - hasCreateddate(): boolean; - clearCreateddate(): void; - getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasUpdateddate(): boolean; - clearUpdateddate(): void; - getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasCreateduser(): boolean; - clearCreateduser(): void; - getCreateduser(): common_pb.User | undefined; - setCreateduser(value?: common_pb.User): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProjectCredential.AsObject; - static toObject(includeInstance: boolean, msg: ProjectCredential): ProjectCredential.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProjectCredential, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProjectCredential; - static deserializeBinaryFromReader(message: ProjectCredential, reader: jspb.BinaryReader): ProjectCredential; -} - -export namespace ProjectCredential { - export type AsObject = { - id: string, - projectid: string, - organizationid: string, - name: string, - key: string, - status: string, - createdby: string, - updatedby: string, - createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - createduser?: common_pb.User.AsObject, - } -} - -export class CreateProjectCredentialRequest extends jspb.Message { - getProjectid(): string; - setProjectid(value: string): void; - - getName(): string; - setName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateProjectCredentialRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateProjectCredentialRequest): CreateProjectCredentialRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateProjectCredentialRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateProjectCredentialRequest; - static deserializeBinaryFromReader(message: CreateProjectCredentialRequest, reader: jspb.BinaryReader): CreateProjectCredentialRequest; -} - -export namespace CreateProjectCredentialRequest { - export type AsObject = { - projectid: string, - name: string, - } -} - -export class GetAllProjectCredentialRequest extends jspb.Message { - hasPaginate(): boolean; - clearPaginate(): void; - getPaginate(): common_pb.Paginate | undefined; - setPaginate(value?: common_pb.Paginate): void; - - clearCriteriasList(): void; - getCriteriasList(): Array; - setCriteriasList(value: Array): void; - addCriterias(value?: common_pb.Criteria, index?: number): common_pb.Criteria; - - getProjectid(): string; - setProjectid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllProjectCredentialRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllProjectCredentialRequest): GetAllProjectCredentialRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllProjectCredentialRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllProjectCredentialRequest; - static deserializeBinaryFromReader(message: GetAllProjectCredentialRequest, reader: jspb.BinaryReader): GetAllProjectCredentialRequest; -} - -export namespace GetAllProjectCredentialRequest { - export type AsObject = { - paginate?: common_pb.Paginate.AsObject, - criteriasList: Array, - projectid: string, - } -} - -export class CreateProjectCredentialResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - hasData(): boolean; - clearData(): void; - getData(): ProjectCredential | undefined; - setData(value?: ProjectCredential): void; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateProjectCredentialResponse.AsObject; - static toObject(includeInstance: boolean, msg: CreateProjectCredentialResponse): CreateProjectCredentialResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateProjectCredentialResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateProjectCredentialResponse; - static deserializeBinaryFromReader(message: CreateProjectCredentialResponse, reader: jspb.BinaryReader): CreateProjectCredentialResponse; -} - -export namespace CreateProjectCredentialResponse { - export type AsObject = { - code: number, - success: boolean, - data?: ProjectCredential.AsObject, - error?: common_pb.Error.AsObject, - } -} - -export class GetAllProjectCredentialResponse extends jspb.Message { - getCode(): number; - setCode(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: ProjectCredential, index?: number): ProjectCredential; - - hasError(): boolean; - clearError(): void; - getError(): common_pb.Error | undefined; - setError(value?: common_pb.Error): void; - - hasPaginated(): boolean; - clearPaginated(): void; - getPaginated(): common_pb.Paginated | undefined; - setPaginated(value?: common_pb.Paginated): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllProjectCredentialResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetAllProjectCredentialResponse): GetAllProjectCredentialResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllProjectCredentialResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllProjectCredentialResponse; - static deserializeBinaryFromReader(message: GetAllProjectCredentialResponse, reader: jspb.BinaryReader): GetAllProjectCredentialResponse; -} - -export namespace GetAllProjectCredentialResponse { - export type AsObject = { - code: number, - success: boolean, - dataList: Array, - error?: common_pb.Error.AsObject, - paginated?: common_pb.Paginated.AsObject, - } -} -