diff --git a/scripts/proto-generate.sh b/scripts/proto-generate.sh index 41ef864a3..3412bc720 100755 --- a/scripts/proto-generate.sh +++ b/scripts/proto-generate.sh @@ -8,10 +8,12 @@ while [ -h "$source" ]; do # resolve $source until the file is no longer a symli done script_dir="$(cd -P "$(dirname "$source" )" >/dev/null && pwd)" +shopt -qs globstar + exec protoc \ --proto_path="${script_dir}/../src/proto/schemas" \ --plugin=protoc-gen-grpc="$(which grpc_node_plugin)" \ --js_out=import_style=commonjs,binary:src/proto/js \ --ts_out="grpc_js:${script_dir}/../src/proto/js" \ --grpc_out="grpc_js:${script_dir}/../src/proto/js" \ - "${script_dir}/../src/proto/schemas/"*.proto + "${script_dir}/../src/proto/schemas/"**/*.proto diff --git a/src/PolykeyAgent.ts b/src/PolykeyAgent.ts index 6f2ad2994..0b1054df0 100644 --- a/src/PolykeyAgent.ts +++ b/src/PolykeyAgent.ts @@ -22,10 +22,10 @@ import { SessionManager } from './sessions'; import { certNodeId } from './network/utils'; import { IdentitiesManager } from './identities'; import { ForwardProxy, ReverseProxy } from './network'; -import { IAgentServer } from './proto/js/Agent_grpc_pb'; -import { IClientServer } from './proto/js/Client_grpc_pb'; -import { createAgentService, AgentService } from './agent'; -import { createClientService, ClientService } from './client'; +import { IAgentServiceServer } from './proto/js/polykey/v1/agent_service_grpc_pb'; +import { IClientServiceServer } from './proto/js/polykey/v1/client_service_grpc_pb'; +import { createAgentService, AgentServiceService } from './agent'; +import { createClientService, ClientServiceService } from './client'; import { GithubProvider } from './identities/providers'; import config from './config'; import { ErrorStateVersionMismatch } from './errors'; @@ -58,12 +58,12 @@ class Polykey { public readonly clientGrpcServer: GRPCServer; public readonly clientGrpcHost: string; public readonly clientGrpcPort: number; - protected clientService: IClientServer; + protected clientService: IClientServiceServer; // Agent server public readonly agentGrpcServer: GRPCServer; public readonly agentGrpcHost: string; public readonly agentGrpcPort: number; - protected agentService: IAgentServer; + protected agentService: IAgentServiceServer; // Proxies public readonly fwdProxy: ForwardProxy; @@ -529,7 +529,7 @@ class Polykey { // GRPC Server // Client server await this.clientGrpcServer.start({ - services: [[ClientService, this.clientService]], + services: [[ClientServiceService, this.clientService]], host: this.clientGrpcHost as Host, port: this.clientGrpcPort as Port, tlsConfig: { @@ -539,7 +539,7 @@ class Polykey { }); // Agent server await this.agentGrpcServer.start({ - services: [[AgentService, this.agentService]], + services: [[AgentServiceService, this.agentService]], host: this.agentGrpcHost as Host, port: this.agentGrpcPort as Port, }); diff --git a/src/agent/GRPCClientAgent.ts b/src/agent/GRPCClientAgent.ts index 0b7183d01..0fa147c93 100644 --- a/src/agent/GRPCClientAgent.ts +++ b/src/agent/GRPCClientAgent.ts @@ -1,16 +1,18 @@ +import type { Host, Port, ProxyConfig } from '../network/types'; +import type { NodeId } from '../nodes/types'; import type { TLSConfig } from '../network/types'; -import { GRPCClient, utils as grpcUtils } from '../grpc'; -import * as agentPB from '../proto/js/Agent_pb'; -import { AgentClient } from '../proto/js/Agent_grpc_pb'; -import { NodeId } from '../nodes/types'; -import { Host, Port, ProxyConfig } from '../network/types'; import Logger from '@matrixai/logger'; import { CreateDestroyStartStop, ready, } from '@matrixai/async-init/dist/CreateDestroyStartStop'; -import { errors as grpcErrors } from '../grpc'; +import { GRPCClient, utils as grpcUtils, errors as grpcErrors } from '../grpc'; +import { AgentServiceClient } from '../proto/js/polykey/v1/agent_service_grpc_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as vaultsPB from '../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; +import * as notificationsPB from '../proto/js/polykey/v1/notifications/notifications_pb'; /** * GRPC Agent Endpoints. @@ -20,7 +22,7 @@ import { errors as grpcErrors } from '../grpc'; new grpcErrors.ErrorGRPCClientNotStarted(), new grpcErrors.ErrorGRPCClientDestroyed(), ) -class GRPCClientAgent extends GRPCClient { +class GRPCClientAgent extends GRPCClient { static async createGRPCClientAgent({ nodeId, host, @@ -55,7 +57,7 @@ class GRPCClientAgent extends GRPCClient { timeout?: number; } = {}): Promise { await super.start({ - clientConstructor: AgentClient, + clientConstructor: AgentServiceClient, tlsConfig, timeout, }); @@ -63,7 +65,7 @@ class GRPCClientAgent extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public echo(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.echo, )(...args); @@ -71,7 +73,7 @@ class GRPCClientAgent extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsGitInfoGet(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.vaultsGitInfoGet, )(...args); @@ -84,7 +86,7 @@ class GRPCClientAgent extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsScan(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.vaultsScan, )(...args); @@ -92,7 +94,7 @@ class GRPCClientAgent extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public nodesClosestLocalNodesGet(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.nodesClosestLocalNodesGet, )(...args); @@ -100,7 +102,7 @@ class GRPCClientAgent extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public nodesClaimsGet(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.nodesClaimsGet, )(...args); @@ -108,7 +110,7 @@ class GRPCClientAgent extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public nodesChainDataGet(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.nodesChainDataGet, )(...args); @@ -116,7 +118,7 @@ class GRPCClientAgent extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public nodesHolePunchMessageSend(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.nodesHolePunchMessageSend, )(...args); @@ -124,7 +126,7 @@ class GRPCClientAgent extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public notificationsSend(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.notificationsSend, )(...args); @@ -132,7 +134,7 @@ class GRPCClientAgent extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsPermisssionsCheck(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsPermisssionsCheck, )(...args); @@ -141,8 +143,8 @@ class GRPCClientAgent extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public nodesCrossSignClaim(...args) { return grpcUtils.promisifyDuplexStreamCall< - agentPB.CrossSignMessage, - agentPB.CrossSignMessage + nodesPB.CrossSign, + nodesPB.CrossSign >( this.client, this.client.nodesCrossSignClaim, diff --git a/src/agent/agentService.ts b/src/agent/agentService.ts index e19c19de1..5b1fb52e7 100644 --- a/src/agent/agentService.ts +++ b/src/agent/agentService.ts @@ -14,9 +14,14 @@ import { Sigchain } from '../sigchain'; import { KeyManager } from '../keys'; import { NotificationsManager } from '../notifications'; import { ErrorGRPC } from '../grpc/errors'; -import { AgentService, IAgentServer } from '../proto/js/Agent_grpc_pb'; - -import * as agentPB from '../proto/js/Agent_pb'; +import { + AgentServiceService, + IAgentServiceServer, +} from '../proto/js/polykey/v1/agent_service_grpc_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as vaultsPB from '../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; +import * as notificationsPB from '../proto/js/polykey/v1/notifications/notifications_pb'; import * as grpcUtils from '../grpc/utils'; import { utils as notificationsUtils, @@ -45,22 +50,22 @@ function createAgentService({ nodeManager: NodeManager; sigchain: Sigchain; notificationsManager: NotificationsManager; -}): IAgentServer { - const agentService: IAgentServer = { +}): IAgentServiceServer { + const agentService: IAgentServiceServer = { echo: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new agentPB.EchoMessage(); + const response = new utilsPB.EchoMessage(); response.setChallenge(call.request.getChallenge()); callback(null, response); }, vaultsGitInfoGet: async ( - call: grpc.ServerWritableStream, + call: grpc.ServerWritableStream, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); const request = call.request; - const vaultNameOrId = request.getVaultId(); + const vaultNameOrId = request.getNameOrId(); let vaultId, vaultName; try { vaultId = makeVaultId(idUtils.fromString(vaultNameOrId)); @@ -80,7 +85,7 @@ function createAgentService({ meta.set('vaultName', vaultName); meta.set('vaultId', makeVaultIdPretty(vaultId)); genWritable.stream.sendMetadata(meta); - const response = new agentPB.PackChunk(); + const response = new vaultsPB.PackChunk(); const responseGen = vaultManager.handleInfoRequest(vaultId); for await (const byte of responseGen) { if (byte !== null) { @@ -93,7 +98,7 @@ function createAgentService({ await genWritable.next(null); }, vaultsGitPackGet: async ( - call: grpc.ServerDuplexStream, + call: grpc.ServerDuplexStream, ) => { const write = promisify(call.write).bind(call); const clientBodyBuffers: Buffer[] = []; @@ -123,7 +128,7 @@ function createAgentService({ } } // TODO: Check the permissions here - const response = new agentPB.PackChunk(); + const response = new vaultsPB.PackChunk(); const [sideBand, progressStream] = await vaultManager.handlePackRequest( vaultId, Buffer.from(body), @@ -150,13 +155,10 @@ function createAgentService({ }); }, vaultsScan: async ( - call: grpc.ServerWritableStream< - agentPB.NodeIdMessage, - agentPB.VaultListMessage - >, + call: grpc.ServerWritableStream, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); - const response = new agentPB.VaultListMessage(); + const response = new vaultsPB.Vault(); const id = makeNodeId(call.request.getNodeId()); try { throw Error('Not implemented'); @@ -165,7 +167,7 @@ function createAgentService({ let listResponse; for await (const vault of listResponse) { if (vault !== null) { - response.setVault(vault); + response.setNameOrId(vault); await genWritable.next(response); } else { await genWritable.next(null); @@ -183,13 +185,10 @@ function createAgentService({ * @param callback */ nodesClosestLocalNodesGet: async ( - call: grpc.ServerUnaryCall< - agentPB.NodeIdMessage, - agentPB.NodeTableMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new agentPB.NodeTableMessage(); + const response = new nodesPB.NodeTable(); try { const targetNodeId = makeNodeId(call.request.getNodeId()); // Get all local nodes that are closest to the target node from the request @@ -197,8 +196,8 @@ function createAgentService({ targetNodeId, ); for (const node of closestNodes) { - const addressMessage = new agentPB.NodeAddressMessage(); - addressMessage.setIp(node.address.ip); + const addressMessage = new nodesPB.Address(); + addressMessage.setHost(node.address.ip); addressMessage.setPort(node.address.port); // Add the node to the response's map (mapping of node ID -> node address) response.getNodeTableMap().set(node.id, addressMessage); @@ -214,13 +213,10 @@ function createAgentService({ * claims we desire from the sigchain (e.g. in discoverGestalt). */ nodesClaimsGet: async ( - call: grpc.ServerUnaryCall< - agentPB.ClaimTypeMessage, - agentPB.ClaimsMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new agentPB.ClaimsMessage(); + const response = new nodesPB.Claims(); // Response.setClaimsList( // await sigchain.getClaims(call.request.getClaimtype() as ClaimType) // ); @@ -230,25 +226,22 @@ function createAgentService({ * Retrieves the ChainDataEncoded of this node. */ nodesChainDataGet: async ( - call: grpc.ServerUnaryCall< - agentPB.EmptyMessage, - agentPB.ChainDataMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new agentPB.ChainDataMessage(); + const response = new nodesPB.ChainData(); try { const chainData = await nodeManager.getChainData(); // Iterate through each claim in the chain, and serialize for transport for (const c in chainData) { const claimId = c as ClaimIdString; const claim = chainData[claimId]; - const claimMessage = new agentPB.ClaimMessage(); + const claimMessage = new nodesPB.AgentClaim(); // Will always have a payload (never undefined) so cast as string claimMessage.setPayload(claim.payload as string); // Add the signatures for (const signatureData of claim.signatures) { - const signature = new agentPB.SignatureMessage(); + const signature = new nodesPB.Signature(); // Will always have a protected header (never undefined) so cast as string signature.setProtected(signatureData.protected as string); signature.setSignature(signatureData.signature); @@ -263,10 +256,10 @@ function createAgentService({ callback(null, response); }, nodesHolePunchMessageSend: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new agentPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { // Firstly, check if this node is the desired node // If so, then we want to make this node start sending hole punching packets @@ -292,12 +285,12 @@ function createAgentService({ }, notificationsSend: async ( call: grpc.ServerUnaryCall< - agentPB.NotificationMessage, - agentPB.EmptyMessage + notificationsPB.AgentNotification, + utilsPB.EmptyMessage >, - callback: grpc.sendUnaryData, + callback: grpc.sendUnaryData, ): Promise => { - const response = new agentPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { const jwt = call.request.getContent(); const notification = await notificationsUtils.verifyAndDecodeNotif(jwt); @@ -313,12 +306,12 @@ function createAgentService({ }, vaultsPermisssionsCheck: async ( call: grpc.ServerUnaryCall< - agentPB.VaultPermMessage, - agentPB.PermissionMessage + vaultsPB.NodePermission, + vaultsPB.NodePermissionAllowed >, - callback: grpc.sendUnaryData, + callback: grpc.sendUnaryData, ): Promise => { - const response = new agentPB.PermissionMessage(); + const response = new vaultsPB.NodePermissionAllowed(); try { const nodeId = makeNodeId(call.request.getNodeId()); const vaultId = makeVaultId(call.request.getVaultId()); @@ -339,10 +332,7 @@ function createAgentService({ } }, nodesCrossSignClaim: async ( - call: grpc.ServerDuplexStream< - agentPB.CrossSignMessage, - agentPB.CrossSignMessage - >, + call: grpc.ServerDuplexStream, ) => { // TODO: Move all "await genClaims.throw" to a final catch(). Wrap this // entire thing in a try block. And re-throw whatever error is caught @@ -480,4 +470,4 @@ function createAgentService({ export default createAgentService; -export { AgentService }; +export { AgentServiceService }; diff --git a/src/agent/index.ts b/src/agent/index.ts index 7d6591dc5..8a9bebd20 100644 --- a/src/agent/index.ts +++ b/src/agent/index.ts @@ -1,4 +1,6 @@ -export { default as createAgentService, AgentService } from './agentService'; +export { + default as createAgentService, + AgentServiceService, +} from './agentService'; export { default as GRPCClientAgent } from './GRPCClientAgent'; export * as errors from './errors'; -export * as agentPB from '../proto/js/Agent_pb'; diff --git a/src/bin/agent/lockall.ts b/src/bin/agent/lockall.ts index 2a1d474db..7a396a2d9 100644 --- a/src/bin/agent/lockall.ts +++ b/src/bin/agent/lockall.ts @@ -5,7 +5,7 @@ import * as grpcErrors from '../../grpc/errors'; import PolykeyClient from '../../PolykeyClient'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB } from '../../client'; +import * as utilsPB from '../../proto/js/polykey/v1/utils/utils_pb'; const lockall = binUtils.createCommand('lockall', { description: @@ -29,7 +29,7 @@ lockall.action(async (options) => { clientConfig['nodePath'] = nodePath; const client = await PolykeyClient.createPolykeyClient(clientConfig); - const m = new clientPB.EmptyMessage(); + const m = new utilsPB.EmptyMessage(); try { await client.start({}); diff --git a/src/bin/agent/stop.ts b/src/bin/agent/stop.ts index 4cba99405..c533fbb16 100644 --- a/src/bin/agent/stop.ts +++ b/src/bin/agent/stop.ts @@ -1,5 +1,5 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB } from '../../client'; +import * as utilsPB from '../../proto/js/polykey/v1/utils/utils_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -27,7 +27,7 @@ stop.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); try { await client.start({}); diff --git a/src/bin/agent/unlock.ts b/src/bin/agent/unlock.ts index c57be2d97..0ab7c9e8e 100644 --- a/src/bin/agent/unlock.ts +++ b/src/bin/agent/unlock.ts @@ -6,8 +6,7 @@ import * as grpcErrors from '../../grpc/errors'; import PolykeyClient from '../../PolykeyClient'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; - -import { clientPB } from '../../client'; +import * as sessionsPB from '../../proto/js/polykey/v1/sessions/sessions_pb'; const unlock = binUtils.createCommand('unlock', { description: @@ -19,7 +18,7 @@ const unlock = binUtils.createCommand('unlock', { }); unlock.arguments('[password]'); unlock.action(async (password, options) => { - const sessionPasswordMessage = new clientPB.PasswordMessage(); + const sessionPasswordMessage = new sessionsPB.Password(); const clientConfig = {}; clientConfig['logger'] = new Logger('CLI Logger', LogLevel.WARN, [ diff --git a/src/bin/echo/echo.ts b/src/bin/echo/echo.ts index 6d4416c0f..aa1dfb443 100644 --- a/src/bin/echo/echo.ts +++ b/src/bin/echo/echo.ts @@ -1,7 +1,8 @@ import PolykeyClient from '../../PolykeyClient'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import { createCommand, outputFormatter } from '../utils'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as utilsPB from '../../proto/js/polykey/v1/utils/utils_pb'; import * as utils from '../../utils'; const echo = createCommand('echo', { @@ -34,7 +35,7 @@ echo.action(async (text, options) => { await client.start({}); const grpcClient = client.grpcClient; - const echoMessage = new clientPB.EchoMessage(); + const echoMessage = new utilsPB.EchoMessage(); echoMessage.setChallenge(text); const pCall = grpcClient.echo(echoMessage); diff --git a/src/bin/identities/allow.ts b/src/bin/identities/allow.ts index a5115f55c..f8c0b4c10 100644 --- a/src/bin/identities/allow.ts +++ b/src/bin/identities/allow.ts @@ -1,6 +1,10 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; +import * as gestaltsPB from '../../proto/js/polykey/v1/gestalts/gestalts_pb'; +import * as identitiesPB from '../../proto/js/polykey/v1/identities/identities_pb'; +import * as permissionsPB from '../../proto/js/polykey/v1/permissions/permissions_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import { parseId } from './utils'; @@ -38,18 +42,18 @@ allow.action(async (id, permissions, options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const gestaltTrustMessage = new clientPB.GestaltTrustMessage(); + const gestaltTrustMessage = new gestaltsPB.Trust(); gestaltTrustMessage.setSet(options.trust); try { await client.start({}); const grpcClient = client.grpcClient; - const setActionMessage = new clientPB.SetActionsMessage(); + const setActionMessage = new permissionsPB.ActionSet(); setActionMessage.setAction(permissions); let name: string; if (nodeId) { // Setting by Node. - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); setActionMessage.setNode(nodeMessage); name = `${nodeId}`; @@ -64,7 +68,7 @@ allow.action(async (id, permissions, options) => { await p; } else { // Setting by Identity - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(providerId!); providerMessage.setMessage(identityId!); setActionMessage.setIdentity(providerMessage); diff --git a/src/bin/identities/authenticate.ts b/src/bin/identities/authenticate.ts index 16dcccf90..8f598e9dd 100644 --- a/src/bin/identities/authenticate.ts +++ b/src/bin/identities/authenticate.ts @@ -1,4 +1,5 @@ -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as identitiesPB from '../../proto/js/polykey/v1/identities/identities_pb'; import { createCommand, outputFormatter } from '../utils'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; @@ -39,7 +40,7 @@ commandAugmentKeynode.action(async (providerId, identitiyId, options) => { const grpcClient = client.grpcClient; //Constructing message. - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(providerId); providerMessage.setMessage(identitiyId); diff --git a/src/bin/identities/claim.ts b/src/bin/identities/claim.ts index 8a9ab273e..c08e75337 100644 --- a/src/bin/identities/claim.ts +++ b/src/bin/identities/claim.ts @@ -1,4 +1,5 @@ -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as identitiesPB from '../../proto/js/polykey/v1/identities/identities_pb'; import { createCommand, outputFormatter } from '../utils'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; @@ -39,7 +40,7 @@ claim.action(async (providerId, identitiyId, options) => { const grpcClient = client.grpcClient; //Constructing message. - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(providerId); providerMessage.setMessage(identitiyId); diff --git a/src/bin/identities/disallow.ts b/src/bin/identities/disallow.ts index e0782648e..4fcbb3755 100644 --- a/src/bin/identities/disallow.ts +++ b/src/bin/identities/disallow.ts @@ -1,6 +1,10 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; +import * as gestaltsPB from '../../proto/js/polykey/v1/gestalts/gestalts_pb'; +import * as identitiesPB from '../../proto/js/polykey/v1/identities/identities_pb'; +import * as permissionsPB from '../../proto/js/polykey/v1/permissions/permissions_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import { parseId } from './utils'; @@ -38,18 +42,18 @@ commandAllowGestalts.action(async (id, permissions, options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const gestaltTrustMessage = new clientPB.GestaltTrustMessage(); + const gestaltTrustMessage = new gestaltsPB.Trust(); gestaltTrustMessage.setSet(options.trust); try { await client.start({}); const grpcClient = client.grpcClient; - const setActionMessage = new clientPB.SetActionsMessage(); + const setActionMessage = new permissionsPB.ActionSet(); setActionMessage.setAction(permissions); let name: string; if (nodeId) { // Setting by Node. - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); setActionMessage.setNode(nodeMessage); name = `${nodeId}`; @@ -64,7 +68,7 @@ commandAllowGestalts.action(async (id, permissions, options) => { await p; } else { // Setting by Identity - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(providerId!); providerMessage.setMessage(identityId!); setActionMessage.setIdentity(providerMessage); diff --git a/src/bin/identities/discover.ts b/src/bin/identities/discover.ts index d34194d5b..4c896d8e9 100644 --- a/src/bin/identities/discover.ts +++ b/src/bin/identities/discover.ts @@ -1,6 +1,8 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; +import * as identitiesPB from '../../proto/js/polykey/v1/identities/identities_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import { parseId } from './utils'; @@ -42,7 +44,7 @@ commandTrustGestalts.action(async (id, options) => { const grpcClient = client.grpcClient; if (nodeId) { // Discovery by Node. - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); const pCall = grpcClient.gestaltsDiscoveryByNode(nodeMessage); const { p, resolveP } = utils.promise(); @@ -54,7 +56,7 @@ commandTrustGestalts.action(async (id, options) => { await p; } else { // Discovery by Identity - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(providerId!); providerMessage.setMessage(identityId!); const pCall = grpcClient.gestaltsDiscoveryByIdentity(providerMessage); diff --git a/src/bin/identities/get.ts b/src/bin/identities/get.ts index 3c33e811a..461e84b44 100644 --- a/src/bin/identities/get.ts +++ b/src/bin/identities/get.ts @@ -1,6 +1,9 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; +import * as gestaltsPB from '../../proto/js/polykey/v1/gestalts/gestalts_pb'; +import * as identitiesPB from '../../proto/js/polykey/v1/identities/identities_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import * as utils from '../../utils'; @@ -40,11 +43,11 @@ get.action(async (id, options) => { await client.start({}); const grpcClient = client.grpcClient; - let res: clientPB.GestaltGraphMessage; + let res: gestaltsPB.Graph; if (nodeId) { //Getting from node. - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); const pCall = grpcClient.gestaltsGestaltGetByNode(nodeMessage); const { p, resolveP } = utils.promise(); @@ -56,7 +59,7 @@ get.action(async (id, options) => { await p; } else { //Getting from identity. - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(providerId!); providerMessage.setMessage(identityId!); const pCall = grpcClient.gestaltsGestaltGetByIdentity(providerMessage); diff --git a/src/bin/identities/list.ts b/src/bin/identities/list.ts index e5c5516d6..288366c90 100644 --- a/src/bin/identities/list.ts +++ b/src/bin/identities/list.ts @@ -1,6 +1,8 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as utilsPB from '../../proto/js/polykey/v1/utils/utils_pb'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import * as utils from '../../utils'; @@ -28,7 +30,7 @@ list.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); let output: any; const gestalts: any = []; try { @@ -61,7 +63,7 @@ list.action(async (options) => { }); } //Getting the permissions for the gestalt. - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(newGestalt.nodes[0].id); const actionsMessage = await grpcClient.gestaltsActionsGetByNode( nodeMessage, diff --git a/src/bin/identities/permissions.ts b/src/bin/identities/permissions.ts index 3848e719f..d38c5922d 100644 --- a/src/bin/identities/permissions.ts +++ b/src/bin/identities/permissions.ts @@ -1,6 +1,8 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; +import * as identitiesPB from '../../proto/js/polykey/v1/identities/identities_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import { parseId } from './utils'; @@ -41,7 +43,7 @@ commandTrustGestalts.action(async (id, options) => { let actions; if (nodeId) { //Getting by Node. - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); const pCall = grpcClient.gestaltsActionsGetByNode(nodeMessage); const { p, resolveP } = utils.promise(); @@ -54,7 +56,7 @@ commandTrustGestalts.action(async (id, options) => { actions = res.getActionList(); } else { //Getting by Identity - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(providerId!); providerMessage.setMessage(identityId!); const pCall = grpcClient.gestaltsActionsGetByIdentity(providerMessage); diff --git a/src/bin/identities/search.ts b/src/bin/identities/search.ts index a16d6a68c..4555cf151 100644 --- a/src/bin/identities/search.ts +++ b/src/bin/identities/search.ts @@ -1,6 +1,7 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as identitiesPB from '../../proto/js/polykey/v1/identities/identities_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import * as utils from '../../utils'; @@ -34,7 +35,7 @@ commandTrustGestalts.action(async (providerId, options) => { try { await client.start({}); const grpcClient = client.grpcClient; - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(providerId); const pCall = grpcClient.identitiesInfoGet(providerMessage); diff --git a/src/bin/identities/trust.ts b/src/bin/identities/trust.ts index ed8a04d6d..cac9be956 100644 --- a/src/bin/identities/trust.ts +++ b/src/bin/identities/trust.ts @@ -1,6 +1,9 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; +import * as identitiesPB from '../../proto/js/polykey/v1/identities/identities_pb'; +import * as permissionsPB from '../../proto/js/polykey/v1/permissions/permissions_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import { parseId } from './utils'; @@ -40,11 +43,11 @@ trust.action(async (id, options) => { try { await client.start({}); const grpcClient = client.grpcClient; - const setActionMessage = new clientPB.SetActionsMessage(); + const setActionMessage = new permissionsPB.ActionSet(); setActionMessage.setAction(action); if (nodeId) { // Setting by Node. - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); setActionMessage.setNode(nodeMessage); const pCall = grpcClient.gestaltsActionsSetByNode(setActionMessage); @@ -57,7 +60,7 @@ trust.action(async (id, options) => { await p; } else { // Setting by Identity - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(providerId!); providerMessage.setMessage(identityId!); setActionMessage.setIdentity(providerMessage); diff --git a/src/bin/identities/untrust.ts b/src/bin/identities/untrust.ts index 385cc9c8b..77ce12d4e 100644 --- a/src/bin/identities/untrust.ts +++ b/src/bin/identities/untrust.ts @@ -1,6 +1,9 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; +import * as identitiesPB from '../../proto/js/polykey/v1/identities/identities_pb'; +import * as permissionsPB from '../../proto/js/polykey/v1/permissions/permissions_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import { parseId } from './utils'; @@ -40,11 +43,11 @@ commandTrustGestalts.action(async (id, options) => { try { await client.start({}); const grpcClient = client.grpcClient; - const setActionMessage = new clientPB.SetActionsMessage(); + const setActionMessage = new permissionsPB.ActionSet(); setActionMessage.setAction(action); if (nodeId) { // Setting by Node. - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); setActionMessage.setNode(nodeMessage); const pCall = grpcClient.gestaltsActionsUnsetByNode(setActionMessage); @@ -57,7 +60,7 @@ commandTrustGestalts.action(async (id, options) => { await p; } else { // Setting by Identity - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(providerId!); providerMessage.setMessage(identityId!); setActionMessage.setIdentity(providerMessage); diff --git a/src/bin/keys/cert.ts b/src/bin/keys/cert.ts index 9af0d1aaf..ee4cb5327 100644 --- a/src/bin/keys/cert.ts +++ b/src/bin/keys/cert.ts @@ -1,6 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as utilsPB from '../../proto/js/polykey/v1/utils/utils_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -24,7 +25,7 @@ cert.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); try { await client.start({}); diff --git a/src/bin/keys/certchain.ts b/src/bin/keys/certchain.ts index 5ec46d506..10aea9837 100644 --- a/src/bin/keys/certchain.ts +++ b/src/bin/keys/certchain.ts @@ -1,6 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as utilsPB from '../../proto/js/polykey/v1/utils/utils_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -24,7 +25,7 @@ certchain.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); try { await client.start({}); diff --git a/src/bin/keys/decrypt.ts b/src/bin/keys/decrypt.ts index c0c827fe7..3551218bc 100644 --- a/src/bin/keys/decrypt.ts +++ b/src/bin/keys/decrypt.ts @@ -1,7 +1,8 @@ import fs from 'fs'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as keysPB from '../../proto/js/polykey/v1/keys/keys_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -29,7 +30,7 @@ decrypt.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const cryptoMessage = new clientPB.CryptoMessage(); + const cryptoMessage = new keysPB.Crypto(); try { await client.start({}); diff --git a/src/bin/keys/encrypt.ts b/src/bin/keys/encrypt.ts index 38ab9cdb2..7b4a5f11d 100644 --- a/src/bin/keys/encrypt.ts +++ b/src/bin/keys/encrypt.ts @@ -1,7 +1,8 @@ import fs from 'fs'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as keysPB from '../../proto/js/polykey/v1/keys/keys_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -29,7 +30,7 @@ encrypt.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const cryptoMessage = new clientPB.CryptoMessage(); + const cryptoMessage = new keysPB.Crypto(); try { await client.start({}); diff --git a/src/bin/keys/password.ts b/src/bin/keys/password.ts index be3f9d4ed..995075000 100644 --- a/src/bin/keys/password.ts +++ b/src/bin/keys/password.ts @@ -1,7 +1,8 @@ import fs from 'fs'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as sessionsPB from '../../proto/js/polykey/v1/sessions/sessions_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -29,7 +30,7 @@ password.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const passwordMessage = new clientPB.PasswordMessage(); + const passwordMessage = new sessionsPB.Password(); try { await client.start({}); diff --git a/src/bin/keys/renew.ts b/src/bin/keys/renew.ts index d56d4b9f9..1bc783971 100644 --- a/src/bin/keys/renew.ts +++ b/src/bin/keys/renew.ts @@ -1,7 +1,8 @@ import fs from 'fs'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as keysPB from '../../proto/js/polykey/v1/keys/keys_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -30,7 +31,7 @@ renew.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const keyMessage = new clientPB.KeyMessage(); + const keyMessage = new keysPB.Key(); try { await client.start({}); diff --git a/src/bin/keys/reset.ts b/src/bin/keys/reset.ts index e9745d965..722670a29 100644 --- a/src/bin/keys/reset.ts +++ b/src/bin/keys/reset.ts @@ -1,7 +1,8 @@ import fs from 'fs'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as keysPB from '../../proto/js/polykey/v1/keys/keys_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -29,7 +30,7 @@ reset.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const keyMessage = new clientPB.KeyMessage(); + const keyMessage = new keysPB.Key(); try { await client.start({}); diff --git a/src/bin/keys/root.ts b/src/bin/keys/root.ts index b423a82e2..d7a28bdbf 100644 --- a/src/bin/keys/root.ts +++ b/src/bin/keys/root.ts @@ -1,6 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as utilsPB from '../../proto/js/polykey/v1/utils/utils_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -25,7 +26,7 @@ root.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); try { await client.start({}); diff --git a/src/bin/keys/sign.ts b/src/bin/keys/sign.ts index e8a9d3fe1..1d5749906 100644 --- a/src/bin/keys/sign.ts +++ b/src/bin/keys/sign.ts @@ -1,7 +1,8 @@ import fs from 'fs'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as keysPB from '../../proto/js/polykey/v1/keys/keys_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -29,7 +30,7 @@ sign.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const cryptoMessage = new clientPB.CryptoMessage(); + const cryptoMessage = new keysPB.Crypto(); try { await client.start({}); diff --git a/src/bin/keys/verify.ts b/src/bin/keys/verify.ts index c07f51317..05e990b97 100644 --- a/src/bin/keys/verify.ts +++ b/src/bin/keys/verify.ts @@ -1,7 +1,8 @@ import fs from 'fs'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as keysPB from '../../proto/js/polykey/v1/keys/keys_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -33,7 +34,7 @@ verify.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const cryptoMessage = new clientPB.CryptoMessage(); + const cryptoMessage = new keysPB.Crypto(); try { await client.start({}); diff --git a/src/bin/nodes/add.ts b/src/bin/nodes/add.ts index 9dde67375..1ac7260ef 100644 --- a/src/bin/nodes/add.ts +++ b/src/bin/nodes/add.ts @@ -1,6 +1,7 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import * as utils from '../../utils'; @@ -32,14 +33,15 @@ add.action(async (node, host, port, options) => { } const client = await PolykeyClient.createPolykeyClient(clientConfig); - const nodeAddressMessage = new clientPB.NodeAddressMessage(); + const nodeAddressMessage = new nodesPB.NodeAddress(); try { await client.start({}); const grpcClient = client.grpcClient; nodeAddressMessage.setNodeId(node); - nodeAddressMessage.setHost(host); - nodeAddressMessage.setPort(port); + nodeAddressMessage.setAddress( + new nodesPB.Address().setHost(host).setPort(port), + ); const pCall = grpcClient.nodesAdd(nodeAddressMessage); const { p, resolveP } = utils.promise(); diff --git a/src/bin/nodes/claim.ts b/src/bin/nodes/claim.ts index 7f6186c71..98709d9b2 100644 --- a/src/bin/nodes/claim.ts +++ b/src/bin/nodes/claim.ts @@ -1,6 +1,7 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import * as utils from '../../utils'; @@ -45,7 +46,7 @@ claim.action(async (nodeId, options) => { const grpcClient = client.grpcClient; //Claiming the node. - const nodeClaimMessage = new clientPB.NodeClaimMessage(); + const nodeClaimMessage = new nodesPB.Claim(); nodeClaimMessage.setNodeId(nodeId); if (options.forceInvite) { nodeClaimMessage.setForceInvite(true); diff --git a/src/bin/nodes/find.ts b/src/bin/nodes/find.ts index 9184e4590..3758e80c3 100644 --- a/src/bin/nodes/find.ts +++ b/src/bin/nodes/find.ts @@ -1,7 +1,8 @@ import type { Host, Port } from '../../network/types'; import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import { ErrorNodeGraphNodeNotFound } from '../../errors'; @@ -47,7 +48,7 @@ find.action(async (node, options) => { await client.start({}); const grpcClient = client.grpcClient; - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(node); const result = { success: false, message: '', id: '', host: '', port: 0 }; @@ -63,8 +64,8 @@ find.action(async (node, options) => { result.success = true; result.id = res.getNodeId(); - result.host = res.getHost(); - result.port = res.getPort(); + result.host = res.getAddress()!.getHost(); + result.port = res.getAddress()!.getPort(); result.message = `Found node at ${buildAddress( result.host as Host, result.port as Port, diff --git a/src/bin/nodes/ping.ts b/src/bin/nodes/ping.ts index 80e4a9387..ea76de003 100644 --- a/src/bin/nodes/ping.ts +++ b/src/bin/nodes/ping.ts @@ -1,6 +1,7 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; import { ErrorNodeGraphNodeNotFound } from '../../errors'; @@ -47,7 +48,7 @@ ping.action(async (node, options) => { const grpcClient = client.grpcClient; //Pinging a specific node. - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(node); let statusMessage; let error; diff --git a/src/bin/nodes/unclaim.ts b/src/bin/nodes/unclaim.ts index 51e212a6a..5c51a29b4 100644 --- a/src/bin/nodes/unclaim.ts +++ b/src/bin/nodes/unclaim.ts @@ -1,6 +1,6 @@ import { errors } from '../../grpc'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB } from '../../client'; +import * as utilsPB from '../../proto/js/polykey/v1/utils/utils_pb'; import PolykeyClient from '../../PolykeyClient'; import { createCommand, outputFormatter } from '../utils'; @@ -34,13 +34,13 @@ unclaim.action(async (node, options) => { await client.start({}); const grpcClient = client.grpcClient; - const echoMessage = new clientPB.EchoMessage(); + const echoMessage = new utilsPB.EchoMessage(); echoMessage.setChallenge('Hello world!'); grpcClient.echo(echoMessage); //Claiming the node. //FIXME: Placeholder, not currently supported. - // const nodeMessage = new clientPB.NodeMessage(); + // const nodeMessage = new nodesPB.Node(); // nodeMessage.setName(node); // const res = await grpcClient.nodesAdd(nodeMessage); // console.log(JSON.stringify(res.toObject())); diff --git a/src/bin/notifications/clear.ts b/src/bin/notifications/clear.ts index dcd377117..cbf3839b1 100644 --- a/src/bin/notifications/clear.ts +++ b/src/bin/notifications/clear.ts @@ -1,7 +1,8 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import { createCommand, outputFormatter } from '../utils'; import { errors } from '../../grpc'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as utilsPB from '../../proto/js/polykey/v1/utils/utils_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; @@ -27,7 +28,7 @@ clear.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); try { await client.start({}); diff --git a/src/bin/notifications/read.ts b/src/bin/notifications/read.ts index b7f3e0cd8..393ffa2c0 100644 --- a/src/bin/notifications/read.ts +++ b/src/bin/notifications/read.ts @@ -2,7 +2,8 @@ import type { Notification } from '../../notifications/types'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import { createCommand, outputFormatter } from '../utils'; import { errors } from '../../grpc'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as notificationsPB from '../../proto/js/polykey/v1/notifications/notifications_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as notificationsUtils from '../../notifications/utils'; @@ -48,7 +49,7 @@ read.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const notificationsReadMessage = new clientPB.NotificationsReadMessage(); + const notificationsReadMessage = new notificationsPB.Read(); try { await client.start({}); @@ -77,20 +78,20 @@ read.action(async (options) => { for (const message of notificationMessages) { let data; switch (message.getDataCase()) { - case clientPB.NotificationsMessage.DataCase.GENERAL: { + case notificationsPB.Notification.DataCase.GENERAL: { data = { type: 'General', message: message.getGeneral()!.getMessage(), }; break; } - case clientPB.NotificationsMessage.DataCase.GESTALT_INVITE: { + case notificationsPB.Notification.DataCase.GESTALT_INVITE: { data = { type: 'GestaltInvite', }; break; } - case clientPB.NotificationsMessage.DataCase.VAULT_SHARE: { + case notificationsPB.Notification.DataCase.VAULT_SHARE: { const actions = message.getVaultShare()!.getActionsList(); data = { type: 'VaultShare', diff --git a/src/bin/notifications/send.ts b/src/bin/notifications/send.ts index ff7ca9274..4738fdcb6 100644 --- a/src/bin/notifications/send.ts +++ b/src/bin/notifications/send.ts @@ -1,7 +1,8 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import { createCommand, outputFormatter } from '../utils'; import { errors } from '../../grpc'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as notificationsPB from '../../proto/js/polykey/v1/notifications/notifications_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; @@ -32,8 +33,8 @@ send.action(async (nodeId, message, options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const notificationsSendMessage = new clientPB.NotificationsSendMessage(); - const generalMessage = new clientPB.GeneralTypeMessage(); + const notificationsSendMessage = new notificationsPB.Send(); + const generalMessage = new notificationsPB.General(); try { await client.start({}); diff --git a/src/bin/secrets/create.ts b/src/bin/secrets/create.ts index fb8fa041e..f7828b58e 100644 --- a/src/bin/secrets/create.ts +++ b/src/bin/secrets/create.ts @@ -1,6 +1,8 @@ import fs from 'fs'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as secretsPB from '../../proto/js/polykey/v1/secrets/secrets_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -35,8 +37,8 @@ create.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const secretMessage = new clientPB.SecretMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const secretMessage = new secretsPB.Secret(); + const vaultMessage = new vaultsPB.Vault(); secretMessage.setVault(vaultMessage); try { diff --git a/src/bin/secrets/delete.ts b/src/bin/secrets/delete.ts index 48096cd73..90881d4a5 100644 --- a/src/bin/secrets/delete.ts +++ b/src/bin/secrets/delete.ts @@ -1,5 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as secretsPB from '../../proto/js/polykey/v1/secrets/secrets_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -30,8 +32,8 @@ deleteSecret.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); - const secretMessage = new clientPB.SecretMessage(); + const vaultMessage = new vaultsPB.Vault(); + const secretMessage = new secretsPB.Secret(); try { await client.start({}); diff --git a/src/bin/secrets/dir.ts b/src/bin/secrets/dir.ts index b8e07f886..08c3fd9b2 100644 --- a/src/bin/secrets/dir.ts +++ b/src/bin/secrets/dir.ts @@ -1,5 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as secretsPB from '../../proto/js/polykey/v1/secrets/secrets_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -32,8 +34,8 @@ dir.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const secretDirectoryMessage = new clientPB.SecretDirectoryMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const secretDirectoryMessage = new secretsPB.Directory(); + const vaultMessage = new vaultsPB.Vault(); try { await client.start({}); diff --git a/src/bin/secrets/edit.ts b/src/bin/secrets/edit.ts index aa097e8aa..2e90cacb3 100644 --- a/src/bin/secrets/edit.ts +++ b/src/bin/secrets/edit.ts @@ -2,7 +2,9 @@ import fs from 'fs'; import os from 'os'; import { execSync } from 'child_process'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as secretsPB from '../../proto/js/polykey/v1/secrets/secrets_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -33,8 +35,8 @@ edit.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const secretMessage = new clientPB.SecretMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const secretMessage = new secretsPB.Secret(); + const vaultMessage = new vaultsPB.Vault(); try { await client.start({}); diff --git a/src/bin/secrets/env.ts b/src/bin/secrets/env.ts index 64df15975..4747559a5 100644 --- a/src/bin/secrets/env.ts +++ b/src/bin/secrets/env.ts @@ -1,6 +1,8 @@ import { spawn } from 'child_process'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as secretsPB from '../../proto/js/polykey/v1/secrets/secrets_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -37,8 +39,8 @@ env.action(async (options, command) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); - const secretMessage = new clientPB.SecretMessage(); + const vaultMessage = new vaultsPB.Vault(); + const secretMessage = new secretsPB.Secret(); secretMessage.setVault(vaultMessage); const secretPathList: string[] = Array.from(command.args.values()); diff --git a/src/bin/secrets/get.ts b/src/bin/secrets/get.ts index 9fabafe22..d92dac530 100644 --- a/src/bin/secrets/get.ts +++ b/src/bin/secrets/get.ts @@ -1,5 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as secretsPB from '../../proto/js/polykey/v1/secrets/secrets_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -35,8 +37,8 @@ get.action(async (options) => { const isEnv: boolean = options.env ?? false; const client = await PolykeyClient.createPolykeyClient(clientConfig); - const secretMessage = new clientPB.SecretMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const secretMessage = new secretsPB.Secret(); + const vaultMessage = new vaultsPB.Vault(); try { await client.start({}); diff --git a/src/bin/secrets/list.ts b/src/bin/secrets/list.ts index 6d1cba38a..e3ae23865 100644 --- a/src/bin/secrets/list.ts +++ b/src/bin/secrets/list.ts @@ -1,5 +1,6 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -29,7 +30,7 @@ list.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); try { await client.start({}); diff --git a/src/bin/secrets/mkdir.ts b/src/bin/secrets/mkdir.ts index 9cb6350b2..72cb02287 100644 --- a/src/bin/secrets/mkdir.ts +++ b/src/bin/secrets/mkdir.ts @@ -1,5 +1,6 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -33,8 +34,8 @@ mkdir.action(async (secretPath, options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMkdirMessage = new clientPB.VaultMkdirMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const vaultMkdirMessage = new vaultsPB.Mkdir(); + const vaultMessage = new vaultsPB.Vault(); try { await client.start({}); diff --git a/src/bin/secrets/rename.ts b/src/bin/secrets/rename.ts index de22c4bd2..4db2e0d8f 100644 --- a/src/bin/secrets/rename.ts +++ b/src/bin/secrets/rename.ts @@ -1,5 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as secretsPB from '../../proto/js/polykey/v1/secrets/secrets_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -33,9 +35,9 @@ rename.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); - const secretMessage = new clientPB.SecretMessage(); - const secretRenameMessage = new clientPB.SecretRenameMessage(); + const vaultMessage = new vaultsPB.Vault(); + const secretMessage = new secretsPB.Secret(); + const secretRenameMessage = new secretsPB.Rename(); secretMessage.setVault(vaultMessage); secretRenameMessage.setOldSecret(secretMessage); diff --git a/src/bin/secrets/update.ts b/src/bin/secrets/update.ts index 1e09a199c..321703853 100644 --- a/src/bin/secrets/update.ts +++ b/src/bin/secrets/update.ts @@ -1,6 +1,8 @@ import fs from 'fs'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as secretsPB from '../../proto/js/polykey/v1/secrets/secrets_pb'; import PolykeyClient from '../../PolykeyClient'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -34,8 +36,8 @@ update.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); - const secretMessage = new clientPB.SecretMessage(); + const vaultMessage = new vaultsPB.Vault(); + const secretMessage = new secretsPB.Secret(); secretMessage.setVault(vaultMessage); try { diff --git a/src/bin/vaults/clone.ts b/src/bin/vaults/clone.ts index ed9c7a504..c24477954 100644 --- a/src/bin/vaults/clone.ts +++ b/src/bin/vaults/clone.ts @@ -1,6 +1,8 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -37,9 +39,9 @@ clone.action(async (options) => { const client = await PolykeyClient.createPolykeyClient(clientConfig); try { - const vaultMessage = new clientPB.VaultMessage(); - const nodeMessage = new clientPB.NodeMessage(); - const vaultCloneMessage = new clientPB.VaultCloneMessage(); + const vaultMessage = new vaultsPB.Vault(); + const nodeMessage = new nodesPB.Node(); + const vaultCloneMessage = new vaultsPB.Clone(); vaultCloneMessage.setVault(vaultMessage); vaultCloneMessage.setNode(nodeMessage); diff --git a/src/bin/vaults/create.ts b/src/bin/vaults/create.ts index 84d4283ee..d34289121 100644 --- a/src/bin/vaults/create.ts +++ b/src/bin/vaults/create.ts @@ -1,6 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -30,7 +31,7 @@ create.action(async (options) => { clientConfig['nodePath'] = nodePath; const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(options.vaultName); try { diff --git a/src/bin/vaults/delete.ts b/src/bin/vaults/delete.ts index 1a4fb8eb4..3ee5d7c74 100644 --- a/src/bin/vaults/delete.ts +++ b/src/bin/vaults/delete.ts @@ -1,6 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -29,7 +30,7 @@ deleteVault.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(options.vaultName); try { diff --git a/src/bin/vaults/list.ts b/src/bin/vaults/list.ts index a85e60e88..e6a4d8937 100644 --- a/src/bin/vaults/list.ts +++ b/src/bin/vaults/list.ts @@ -1,6 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as utilsPB from '../../proto/js/polykey/v1/utils/utils_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -25,7 +26,7 @@ list.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); try { await client.start({}); diff --git a/src/bin/vaults/log.ts b/src/bin/vaults/log.ts index 1fd72f0c7..726058381 100644 --- a/src/bin/vaults/log.ts +++ b/src/bin/vaults/log.ts @@ -1,4 +1,4 @@ -import { clientPB } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; import { createCommand, outputFormatter } from '../utils'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; @@ -40,10 +40,10 @@ log.action(async (vault, commitId, options) => { await client.start({}); const grpcClient = client.grpcClient; - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(vault); - const vaultsLogMessage = new clientPB.VaultsLogMessage(); + const vaultsLogMessage = new vaultsPB.Log(); vaultsLogMessage.setVault(vaultMessage); vaultsLogMessage.setLogDepth(options.number); vaultsLogMessage.setCommitId(commitId ?? ''); diff --git a/src/bin/vaults/permissions.ts b/src/bin/vaults/permissions.ts index 8786e74b3..f2c33a6b4 100644 --- a/src/bin/vaults/permissions.ts +++ b/src/bin/vaults/permissions.ts @@ -1,6 +1,8 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -33,13 +35,13 @@ permissions.action(async (vaultName, nodeId, options) => { const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(vaultName); - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); - const getVaultMessage = new clientPB.GetVaultPermMessage(); + const getVaultMessage = new vaultsPB.PermGet(); getVaultMessage.setVault(vaultMessage); getVaultMessage.setNode(nodeMessage); diff --git a/src/bin/vaults/pull.ts b/src/bin/vaults/pull.ts index 784d4bcca..b38d8819a 100644 --- a/src/bin/vaults/pull.ts +++ b/src/bin/vaults/pull.ts @@ -1,6 +1,8 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -35,9 +37,9 @@ pull.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); - const nodeMessage = new clientPB.NodeMessage(); - const vaultPullMessage = new clientPB.VaultPullMessage(); + const vaultMessage = new vaultsPB.Vault(); + const nodeMessage = new nodesPB.Node(); + const vaultPullMessage = new vaultsPB.Pull(); vaultPullMessage.setVault(vaultMessage); vaultPullMessage.setNode(nodeMessage); diff --git a/src/bin/vaults/rename.ts b/src/bin/vaults/rename.ts index 2d6847bb9..60dbac88e 100644 --- a/src/bin/vaults/rename.ts +++ b/src/bin/vaults/rename.ts @@ -1,6 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -35,8 +36,8 @@ rename.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); - const vaultRenameMessage = new clientPB.VaultRenameMessage(); + const vaultMessage = new vaultsPB.Vault(); + const vaultRenameMessage = new vaultsPB.Rename(); vaultRenameMessage.setVault(vaultMessage); try { diff --git a/src/bin/vaults/scan.ts b/src/bin/vaults/scan.ts index 2501a7a52..5baac6b91 100644 --- a/src/bin/vaults/scan.ts +++ b/src/bin/vaults/scan.ts @@ -1,6 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -32,7 +33,7 @@ commandScanVaults.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(options.nodeId); try { diff --git a/src/bin/vaults/share.ts b/src/bin/vaults/share.ts index 60998943a..9f3eef8a3 100644 --- a/src/bin/vaults/share.ts +++ b/src/bin/vaults/share.ts @@ -1,6 +1,8 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -34,9 +36,9 @@ commandVaultShare.action(async (vaultName, nodeId, options) => { const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); - const nodeMessage = new clientPB.NodeMessage(); - const setVaultPermsMessage = new clientPB.SetVaultPermMessage(); + const vaultMessage = new vaultsPB.Vault(); + const nodeMessage = new nodesPB.Node(); + const setVaultPermsMessage = new vaultsPB.PermSet(); setVaultPermsMessage.setVault(vaultMessage); setVaultPermsMessage.setNode(nodeMessage); diff --git a/src/bin/vaults/stat.ts b/src/bin/vaults/stat.ts index ecd6eb678..1e1fb2615 100644 --- a/src/bin/vaults/stat.ts +++ b/src/bin/vaults/stat.ts @@ -1,6 +1,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; @@ -29,7 +30,7 @@ stat.action(async (options) => { : utils.getDefaultNodePath(); const client = await PolykeyClient.createPolykeyClient(clientConfig); - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(options.vaultName); try { diff --git a/src/bin/vaults/unshare.ts b/src/bin/vaults/unshare.ts index ab651e071..8785e3568 100644 --- a/src/bin/vaults/unshare.ts +++ b/src/bin/vaults/unshare.ts @@ -1,6 +1,8 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; -import { clientPB, utils as clientUtils } from '../../client'; +import { utils as clientUtils } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../../proto/js/polykey/v1/nodes/nodes_pb'; import * as utils from '../../utils'; import * as binUtils from '../utils'; import * as grpcErrors from '../../grpc/errors'; @@ -34,9 +36,9 @@ commandVaultShare.action(async (vaultName, nodeId, options) => { const client = await PolykeyClient.createPolykeyClient(clientConfig); - const unsetVaultPermsMessage = new clientPB.UnsetVaultPermMessage(); - const vaultMessage = new clientPB.VaultMessage(); - const nodeMessage = new clientPB.NodeMessage(); + const unsetVaultPermsMessage = new vaultsPB.PermUnset(); + const vaultMessage = new vaultsPB.Vault(); + const nodeMessage = new nodesPB.Node(); unsetVaultPermsMessage.setVault(vaultMessage); unsetVaultPermsMessage.setNode(nodeMessage); diff --git a/src/bin/vaults/version.ts b/src/bin/vaults/version.ts index 671b1efc5..dd286881a 100644 --- a/src/bin/vaults/version.ts +++ b/src/bin/vaults/version.ts @@ -1,4 +1,4 @@ -import { clientPB } from '../../client'; +import * as vaultsPB from '../../proto/js/polykey/v1/vaults/vaults_pb'; import { createCommand, outputFormatter } from '../utils'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import PolykeyClient from '../../PolykeyClient'; @@ -40,8 +40,8 @@ version.action(async (vault, versionId, options) => { await client.start({}); const grpcClient = client.grpcClient; - const vaultMessage = new clientPB.VaultMessage(); - const vaultsVersionMessage = new clientPB.VaultsVersionMessage(); + const vaultMessage = new vaultsPB.Vault(); + const vaultsVersionMessage = new vaultsPB.Version(); vaultMessage.setNameOrId(vault); vaultsVersionMessage.setVault(vaultMessage); diff --git a/src/claims/utils.ts b/src/claims/utils.ts index c0499bf94..ca1f5f153 100644 --- a/src/claims/utils.ts +++ b/src/claims/utils.ts @@ -17,7 +17,7 @@ import { createPublicKey, createPrivateKey } from 'crypto'; import { md } from 'node-forge'; import { DefinedError } from 'ajv'; import canonicalize from 'canonicalize'; -import { agentPB } from '../agent'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; import { claimIdentityValidate, @@ -397,17 +397,17 @@ function createCrossSignMessage({ }: { singlySignedClaim?: ClaimIntermediary; doublySignedClaim?: ClaimEncoded; -}): agentPB.CrossSignMessage { - const crossSignMessage = new agentPB.CrossSignMessage(); +}): nodesPB.CrossSign { + const crossSignMessage = new nodesPB.CrossSign(); // Construct the singly signed claim message if (singlySignedClaim != null) { // Should never be reached, but for type safety if (singlySignedClaim.payload == null) { throw new claimsErrors.ErrorClaimsUndefinedClaimPayload(); } - const singlyMessage = new agentPB.ClaimIntermediaryMessage(); + const singlyMessage = new nodesPB.ClaimIntermediary(); singlyMessage.setPayload(singlySignedClaim.payload); - const singlySignatureMessage = new agentPB.SignatureMessage(); + const singlySignatureMessage = new nodesPB.Signature(); singlySignatureMessage.setProtected(singlySignedClaim.signature.protected!); singlySignatureMessage.setSignature(singlySignedClaim.signature.signature); singlyMessage.setSignature(singlySignatureMessage); @@ -419,10 +419,10 @@ function createCrossSignMessage({ if (doublySignedClaim.payload == null) { throw new claimsErrors.ErrorClaimsUndefinedClaimPayload(); } - const doublyMessage = new agentPB.ClaimMessage(); + const doublyMessage = new nodesPB.AgentClaim(); doublyMessage.setPayload(doublySignedClaim.payload); for (const s of doublySignedClaim.signatures) { - const signatureMessage = new agentPB.SignatureMessage(); + const signatureMessage = new nodesPB.Signature(); signatureMessage.setProtected(s.protected!); signatureMessage.setSignature(s.signature); doublyMessage.getSignaturesList().push(signatureMessage); @@ -437,7 +437,7 @@ function createCrossSignMessage({ * after GRPC transport). */ function reconstructClaimIntermediary( - intermediaryMsg: agentPB.ClaimIntermediaryMessage, + intermediaryMsg: nodesPB.ClaimIntermediary, ): ClaimIntermediary { const signatureMsg = intermediaryMsg.getSignature(); if (signatureMsg == null) { @@ -457,7 +457,7 @@ function reconstructClaimIntermediary( * Reconstructs a ClaimEncoded object from a ClaimMessage (i.e. after GRPC * transport). */ -function reconstructClaimEncoded(claimMsg: agentPB.ClaimMessage): ClaimEncoded { +function reconstructClaimEncoded(claimMsg: nodesPB.AgentClaim): ClaimEncoded { const claim: ClaimEncoded = { payload: claimMsg.getPayload(), signatures: claimMsg.getSignaturesList().map((signatureMsg) => { diff --git a/src/client/GRPCClientClient.ts b/src/client/GRPCClientClient.ts index 7251cbc57..967d639ea 100644 --- a/src/client/GRPCClientClient.ts +++ b/src/client/GRPCClientClient.ts @@ -2,8 +2,17 @@ import type { TLSConfig } from '../network/types'; import * as clientErrors from './errors'; import { GRPCClient, utils as grpcUtils } from '../grpc'; -import * as clientPB from '../proto/js/Client_pb'; -import { ClientClient } from '../proto/js/Client_grpc_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as vaultsPB from '../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; +import * as notificationsPB from '../proto/js/polykey/v1/notifications/notifications_pb'; +import * as sessionsPB from '../proto/js/polykey/v1/sessions/sessions_pb'; +import * as gestaltsPB from '../proto/js/polykey/v1/gestalts/gestalts_pb'; +import * as identitiesPB from '../proto/js/polykey/v1/identities/identities_pb'; +import * as keysPB from '../proto/js/polykey/v1/keys/keys_pb'; +import * as permissionsPB from '../proto/js/polykey/v1/permissions/permissions_pb'; +import * as secretsPB from '../proto/js/polykey/v1/secrets/secrets_pb'; +import { ClientServiceClient } from '../proto/js/polykey/v1/client_service_grpc_pb'; import { Session } from '../sessions'; import { NodeId } from '../nodes/types'; import { Host, Port, ProxyConfig } from '../network/types'; @@ -18,7 +27,7 @@ import { errors as grpcErrors } from '../grpc'; new grpcErrors.ErrorGRPCClientNotStarted(), new grpcErrors.ErrorGRPCClientDestroyed(), ) -class GRPCClientClient extends GRPCClient { +class GRPCClientClient extends GRPCClient { static async createGRPCCLientClient({ nodeId, host, @@ -55,7 +64,7 @@ class GRPCClientClient extends GRPCClient { timeout?: number; } = {}): Promise { await super.start({ - clientConstructor: ClientClient, + clientConstructor: ClientServiceClient, tlsConfig, timeout, secure: true, @@ -69,7 +78,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public echo(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.echo, )(...args); @@ -77,7 +86,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public agentStop(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.agentStop, )(...args); @@ -85,7 +94,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public sessionUnlock(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.sessionUnlock, )(...args); @@ -93,7 +102,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public sessionRefresh(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.sessionRefresh, )(...args); @@ -101,7 +110,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public sessionLockAll(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.sessionLockAll, )(...args); @@ -109,7 +118,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsList(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.vaultsList, )(...args); @@ -117,7 +126,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsCreate(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsCreate, )(...args); @@ -126,7 +135,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsRename(...args) { if (!this.client) throw new clientErrors.ErrorClientClientNotStarted(); - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsRename, )(...args); @@ -134,7 +143,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsDelete(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsDelete, )(...args); @@ -142,7 +151,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsClone(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsClone, )(...args); @@ -150,7 +159,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsPull(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsPull, )(...args); @@ -158,7 +167,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsScan(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.vaultsScan, )(...args); @@ -166,7 +175,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsPermissionsSet(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsPermissionsSet, )(...args); @@ -174,7 +183,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsPermissionsUnset(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsPermissionsUnset, )(...args); @@ -182,7 +191,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultPermissions(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.vaultsPermissions, )(...args); @@ -190,7 +199,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsSecretsList(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.vaultsSecretsList, )(...args); @@ -198,7 +207,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsSecretsMkdir(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsSecretsMkdir, )(...args); @@ -206,7 +215,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsSecretsStat(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsSecretsStat, )(...args); @@ -214,7 +223,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsSecretsDelete(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsSecretsDelete, )(...args); @@ -222,7 +231,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsSecretsEdit(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsSecretsEdit, )(...args); @@ -230,7 +239,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsSecretsGet(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsSecretsGet, )(...args); @@ -238,7 +247,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsSecretsRename(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsSecretsRename, )(...args); @@ -246,7 +255,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsSecretsNew(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsSecretsNew, )(...args); @@ -254,7 +263,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsSecretsNewDir(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsSecretsNewDir, )(...args); @@ -262,7 +271,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsVersion(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.vaultsVersion, )(...args); @@ -270,7 +279,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public vaultsLog(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.vaultsLog, )(...args); @@ -278,7 +287,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public keysKeyPairRoot(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.keysKeyPairRoot, )(...args); @@ -286,7 +295,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public keysKeyPairReset(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.keysKeyPairReset, )(...args); @@ -294,7 +303,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public keysKeyPairRenew(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.keysKeyPairRenew, )(...args); @@ -302,7 +311,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public keysEncrypt(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.keysEncrypt, )(...args); @@ -310,7 +319,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public keysDecrypt(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.keysDecrypt, )(...args); @@ -318,7 +327,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public keysSign(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.keysSign, )(...args); @@ -326,7 +335,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public keysVerify(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.keysVerify, )(...args); @@ -334,7 +343,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public keysPasswordChange(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.keysPasswordChange, )(...args); @@ -342,7 +351,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public keysCertsGet(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.keysCertsGet, )(...args); @@ -350,7 +359,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public keysCertsChainGet(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.keysCertsChainGet, )(...args); @@ -358,7 +367,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsGestaltList(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.gestaltsGestaltList, )(...args); @@ -366,7 +375,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsGestaltGetByIdentity(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.gestaltsGestaltGetByIdentity, )(...args); @@ -374,7 +383,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsGestaltGetByNode(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.gestaltsGestaltGetByNode, )(...args); @@ -382,7 +391,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsDiscoveryByNode(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.gestaltsDiscoveryByNode, )(...args); @@ -390,7 +399,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsDiscoveryByIdentity(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.gestaltsDiscoveryByIdentity, )(...args); @@ -398,7 +407,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsActionsGetByNode(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.gestaltsActionsGetByNode, )(...args); @@ -406,7 +415,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsActionsGetByIdentity(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.gestaltsActionsGetByIdentity, )(...args); @@ -414,7 +423,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsActionsSetByNode(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.gestaltsActionsSetByNode, )(...args); @@ -422,7 +431,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsActionsSetByIdentity(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.gestaltsActionsSetByIdentity, )(...args); @@ -430,7 +439,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsActionsUnsetByNode(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.gestaltsActionsUnsetByNode, )(...args); @@ -438,7 +447,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public gestaltsActionsUnsetByIdentity(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.gestaltsActionsUnsetByIdentity, )(...args); @@ -446,7 +455,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public identitiesTokenPut(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.identitiesTokenPut, )(...args); @@ -454,7 +463,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public identitiesGetToken(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.identitiesTokenGet, )(...args); @@ -462,7 +471,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public identitiesTokenDelete(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.identitiesTokenDelete, )(...args); @@ -470,7 +479,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public identitiesProvidersList(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.identitiesProvidersList, )(...args); @@ -478,7 +487,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public nodesAdd(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.nodesAdd, )(...args); @@ -486,7 +495,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public nodesPing(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.nodesPing, )(...args); @@ -494,7 +503,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public nodesClaim(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.nodesClaim, )(...args); @@ -502,7 +511,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public nodesFind(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.nodesFind, )(...args); @@ -510,7 +519,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public identitiesAuthenticate(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.identitiesAuthenticate, )(...args); @@ -518,7 +527,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public identitiesInfoGetConnected(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.identitiesInfoGetConnected, )(...args); @@ -526,7 +535,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public identitiesInfoGet(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.identitiesInfoGet, )(...args); @@ -534,7 +543,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public identitiesClaim(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.identitiesClaim, )(...args); @@ -542,7 +551,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public notificationsSend(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.notificationsSend, )(...args); @@ -550,7 +559,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public notificationsRead(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.notificationsRead, )(...args); @@ -558,7 +567,7 @@ class GRPCClientClient extends GRPCClient { @ready(new grpcErrors.ErrorGRPCClientNotStarted()) public notificationsClear(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.notificationsClear, )(...args); diff --git a/src/client/clientService.ts b/src/client/clientService.ts index 07464c766..28502537a 100644 --- a/src/client/clientService.ts +++ b/src/client/clientService.ts @@ -11,11 +11,19 @@ import type { GRPCServer } from '../grpc'; import { promisify } from 'util'; import * as grpc from '@grpc/grpc-js'; - -import { ClientService, IClientServer } from '../proto/js/Client_grpc_pb'; - -import * as clientPB from '../proto/js/Client_pb'; - +import { + ClientServiceService, + IClientServiceServer, +} from '../proto/js/polykey/v1/client_service_grpc_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as vaultsPB from '../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; +import * as notificationsPB from '../proto/js/polykey/v1/notifications/notifications_pb'; +import * as sessionsPB from '../proto/js/polykey/v1/sessions/sessions_pb'; +import * as gestaltsPB from '../proto/js/polykey/v1/gestalts/gestalts_pb'; +import * as identitiesPB from '../proto/js/polykey/v1/identities/identities_pb'; +import * as keysPB from '../proto/js/polykey/v1/keys/keys_pb'; +import * as permissionsPB from '../proto/js/polykey/v1/permissions/permissions_pb'; import createEchoRPC from './rpcEcho'; import createSessionRPC from './rpcSession'; import createVaultRPC from './rpcVaults'; @@ -60,7 +68,7 @@ function createClientService({ revProxy: ReverseProxy; grpcServer: GRPCServer; }) { - const clientService: IClientServer = { + const clientService: IClientServiceServer = { ...createEchoRPC({ sessionManager, }), @@ -101,25 +109,22 @@ function createClientService({ sessionManager, }), nodesList: async ( - call: grpc.ServerWritableStream< - clientPB.EmptyMessage, - clientPB.NodeMessage - >, + call: grpc.ServerWritableStream, ): Promise => { // Call.request // PROCESS THE REQEUST MESSAGE - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId('some node name'); const write = promisify(call.write).bind(call); await write(nodeMessage); call.end(); }, agentStop: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { try { await sessionManager.verifyToken(utils.getToken(call.metadata)); - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); setTimeout(async () => { await polykeyAgent.stop(); await polykeyAgent.destroy(); @@ -136,4 +141,4 @@ function createClientService({ export default createClientService; -export { ClientService }; +export { ClientServiceService }; diff --git a/src/client/index.ts b/src/client/index.ts index 25a308e5c..44ff1f832 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -1,7 +1,9 @@ -export { default as createClientService, ClientService } from './clientService'; +export { + default as createClientService, + ClientServiceService, +} from './clientService'; export { default as GRPCClientClient } from './GRPCClientClient'; export * as errors from './errors'; -export * as clientPB from '../proto/js/Client_pb'; export * as utils from './utils'; /** diff --git a/src/client/rpcEcho.ts b/src/client/rpcEcho.ts index 53eb12af1..ebd9b9213 100644 --- a/src/client/rpcEcho.ts +++ b/src/client/rpcEcho.ts @@ -1,10 +1,10 @@ import type { SessionManager } from '../sessions'; -import * as utils from './utils'; -import * as errors from '../errors'; import * as grpc from '@grpc/grpc-js'; +import * as utils from './utils'; import * as grpcUtils from '../grpc/utils'; -import * as clientPB from '../proto/js/Client_pb'; +import * as errors from '../errors'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; const createEchoRPC = ({ sessionManager, @@ -13,11 +13,11 @@ const createEchoRPC = ({ }) => { return { echo: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.EchoMessage(); - const action = async (response: clientPB.EchoMessage) => { + const response = new utilsPB.EchoMessage(); + const action = async (response: utilsPB.EchoMessage) => { const message = call.request.getChallenge(); if (message === 'ThrowAnError') { throw new errors.ErrorPolykey('Error Thrown As Requested'); diff --git a/src/client/rpcGestalts.ts b/src/client/rpcGestalts.ts index 280eaf73c..2dd4fd25e 100644 --- a/src/client/rpcGestalts.ts +++ b/src/client/rpcGestalts.ts @@ -11,7 +11,11 @@ import * as grpc from '@grpc/grpc-js'; import { makeGestaltAction } from '../gestalts/utils'; import * as grpcUtils from '../grpc/utils'; -import * as clientPB from '../proto/js/Client_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; +import * as gestaltsPB from '../proto/js/polykey/v1/gestalts/gestalts_pb'; +import * as identitiesPB from '../proto/js/polykey/v1/identities/identities_pb'; +import * as permissionsPB from '../proto/js/polykey/v1/permissions/permissions_pb'; import { makeNodeId } from '../nodes/utils'; const createGestaltsRPC = ({ @@ -25,13 +29,10 @@ const createGestaltsRPC = ({ }) => { return { gestaltsGestaltGetByNode: async ( - call: grpc.ServerUnaryCall< - clientPB.NodeMessage, - clientPB.GestaltGraphMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.GestaltGraphMessage(); + const response = new gestaltsPB.Graph(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -50,13 +51,10 @@ const createGestaltsRPC = ({ callback(null, response); }, gestaltsGestaltGetByIdentity: async ( - call: grpc.ServerUnaryCall< - clientPB.ProviderMessage, - clientPB.GestaltGraphMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.GestaltGraphMessage(); + const response = new gestaltsPB.Graph(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -76,13 +74,10 @@ const createGestaltsRPC = ({ callback(null, response); }, gestaltsGestaltList: async ( - call: grpc.ServerWritableStream< - clientPB.EmptyMessage, - clientPB.GestaltMessage - >, + call: grpc.ServerWritableStream, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); - let gestaltMessage: clientPB.GestaltMessage; + let gestaltMessage: gestaltsPB.Gestalt; try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -91,7 +86,7 @@ const createGestaltsRPC = ({ call.sendMetadata(responseMeta); const certs: Array = await gestaltGraph.getGestalts(); for (const cert of certs) { - gestaltMessage = new clientPB.GestaltMessage(); + gestaltMessage = new gestaltsPB.Gestalt(); gestaltMessage.setName(JSON.stringify(cert)); await genWritable.next(gestaltMessage); } @@ -101,11 +96,11 @@ const createGestaltsRPC = ({ } }, gestaltsDiscoveryByNode: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { const info = call.request; - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -125,14 +120,11 @@ const createGestaltsRPC = ({ callback(null, emptyMessage); }, gestaltsDiscoveryByIdentity: async ( - call: grpc.ServerUnaryCall< - clientPB.ProviderMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { const info = call.request; - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -153,11 +145,11 @@ const createGestaltsRPC = ({ callback(null, emptyMessage); }, gestaltsActionsGetByNode: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { const info = call.request; - const response = new clientPB.ActionsMessage(); + const response = new permissionsPB.Actions(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -181,14 +173,11 @@ const createGestaltsRPC = ({ callback(null, response); }, gestaltsActionsGetByIdentity: async ( - call: grpc.ServerUnaryCall< - clientPB.ProviderMessage, - clientPB.ActionsMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { const info = call.request; - const response = new clientPB.ActionsMessage(); + const response = new permissionsPB.Actions(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -215,14 +204,11 @@ const createGestaltsRPC = ({ callback(null, response); }, gestaltsActionsSetByNode: async ( - call: grpc.ServerUnaryCall< - clientPB.SetActionsMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { const info = call.request; - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -232,13 +218,13 @@ const createGestaltsRPC = ({ //Checking switch (info.getNodeOrProviderCase()) { default: - case clientPB.SetActionsMessage.NodeOrProviderCase + case permissionsPB.ActionSet.NodeOrProviderCase .NODE_OR_PROVIDER_NOT_SET: - case clientPB.SetActionsMessage.NodeOrProviderCase.IDENTITY: + case permissionsPB.ActionSet.NodeOrProviderCase.IDENTITY: throw new errors.ErrorGRPCInvalidMessage( 'Node not set for SetActionMessage.', ); - case clientPB.SetActionsMessage.NodeOrProviderCase.NODE: + case permissionsPB.ActionSet.NodeOrProviderCase.NODE: break; //This is fine. } @@ -252,14 +238,11 @@ const createGestaltsRPC = ({ callback(null, response); }, gestaltsActionsSetByIdentity: async ( - call: grpc.ServerUnaryCall< - clientPB.SetActionsMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { const info = call.request; - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -269,13 +252,13 @@ const createGestaltsRPC = ({ //Checking switch (info.getNodeOrProviderCase()) { default: - case clientPB.SetActionsMessage.NodeOrProviderCase.NODE: - case clientPB.SetActionsMessage.NodeOrProviderCase + case permissionsPB.ActionSet.NodeOrProviderCase.NODE: + case permissionsPB.ActionSet.NodeOrProviderCase .NODE_OR_PROVIDER_NOT_SET: throw new errors.ErrorGRPCInvalidMessage( 'Identity not set for SetActionMessage.', ); - case clientPB.SetActionsMessage.NodeOrProviderCase.IDENTITY: + case permissionsPB.ActionSet.NodeOrProviderCase.IDENTITY: break; //This is fine. } @@ -294,14 +277,11 @@ const createGestaltsRPC = ({ callback(null, response); }, gestaltsActionsUnsetByNode: async ( - call: grpc.ServerUnaryCall< - clientPB.SetActionsMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { const info = call.request; - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -311,13 +291,13 @@ const createGestaltsRPC = ({ //Checking switch (info.getNodeOrProviderCase()) { default: - case clientPB.SetActionsMessage.NodeOrProviderCase + case permissionsPB.ActionSet.NodeOrProviderCase .NODE_OR_PROVIDER_NOT_SET: - case clientPB.SetActionsMessage.NodeOrProviderCase.IDENTITY: + case permissionsPB.ActionSet.NodeOrProviderCase.IDENTITY: throw new errors.ErrorGRPCInvalidMessage( 'Node not set for SetActionMessage.', ); - case clientPB.SetActionsMessage.NodeOrProviderCase.NODE: + case permissionsPB.ActionSet.NodeOrProviderCase.NODE: break; //This is fine. } @@ -331,14 +311,11 @@ const createGestaltsRPC = ({ callback(null, response); }, gestaltsActionsUnsetByIdentity: async ( - call: grpc.ServerUnaryCall< - clientPB.SetActionsMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { const info = call.request; - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -348,13 +325,13 @@ const createGestaltsRPC = ({ //Checking switch (info.getNodeOrProviderCase()) { default: - case clientPB.SetActionsMessage.NodeOrProviderCase.NODE: - case clientPB.SetActionsMessage.NodeOrProviderCase + case permissionsPB.ActionSet.NodeOrProviderCase.NODE: + case permissionsPB.ActionSet.NodeOrProviderCase .NODE_OR_PROVIDER_NOT_SET: throw new errors.ErrorGRPCInvalidMessage( 'Identity not set for SetActionMessage.', ); - case clientPB.SetActionsMessage.NodeOrProviderCase.IDENTITY: + case permissionsPB.ActionSet.NodeOrProviderCase.IDENTITY: break; //This is fine. } diff --git a/src/client/rpcIdentities.ts b/src/client/rpcIdentities.ts index 483f497ad..db6addfff 100644 --- a/src/client/rpcIdentities.ts +++ b/src/client/rpcIdentities.ts @@ -14,7 +14,8 @@ import * as utils from './utils'; import * as errors from '../errors'; import * as grpc from '@grpc/grpc-js'; import * as grpcUtils from '../grpc/utils'; -import * as clientPB from '../proto/js/Client_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as identitiesPB from '../proto/js/polykey/v1/identities/identities_pb'; const createIdentitiesRPC = ({ identitiesManager, @@ -30,12 +31,12 @@ const createIdentitiesRPC = ({ return { identitiesAuthenticate: async ( call: grpc.ServerWritableStream< - clientPB.ProviderMessage, - clientPB.ProviderMessage + identitiesPB.Provider, + identitiesPB.Provider >, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); - const response = new clientPB.ProviderMessage(); + const response = new identitiesPB.Provider(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -70,12 +71,12 @@ const createIdentitiesRPC = ({ }, identitiesTokenPut: async ( call: grpc.ServerUnaryCall< - clientPB.TokenSpecificMessage, - clientPB.EmptyMessage + identitiesPB.TokenSpecific, + utilsPB.EmptyMessage >, - callback: grpc.sendUnaryData, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -94,13 +95,10 @@ const createIdentitiesRPC = ({ callback(null, response); }, identitiesTokenGet: async ( - call: grpc.ServerUnaryCall< - clientPB.ProviderMessage, - clientPB.TokenMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.TokenMessage(); + const response = new identitiesPB.Token(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -118,13 +116,10 @@ const createIdentitiesRPC = ({ callback(null, response); }, identitiesTokenDelete: async ( - call: grpc.ServerUnaryCall< - clientPB.ProviderMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -141,13 +136,10 @@ const createIdentitiesRPC = ({ callback(null, response); }, identitiesProvidersList: async ( - call: grpc.ServerUnaryCall< - clientPB.EmptyMessage, - clientPB.ProviderMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.ProviderMessage(); + const response = new identitiesPB.Provider(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -163,8 +155,8 @@ const createIdentitiesRPC = ({ }, identitiesInfoGetConnected: async ( call: grpc.ServerWritableStream< - clientPB.ProviderSearchMessage, - clientPB.IdentityInfoMessage + identitiesPB.ProviderSearch, + identitiesPB.Info >, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); @@ -192,8 +184,8 @@ const createIdentitiesRPC = ({ ); for await (const identity of identities) { - const identityInfoMessage = new clientPB.IdentityInfoMessage(); - const providerMessage = new clientPB.ProviderMessage(); + const identityInfoMessage = new identitiesPB.Info(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(identity.providerId); providerMessage.setMessage(identity.identityId); identityInfoMessage.setProvider(providerMessage); @@ -211,11 +203,8 @@ const createIdentitiesRPC = ({ * Gets the first identityId of the local keynode. */ identitiesInfoGet: async ( - call: grpc.ServerUnaryCall< - clientPB.ProviderMessage, - clientPB.ProviderMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { try { await sessionManager.verifyToken(utils.getToken(call.metadata)); @@ -224,7 +213,7 @@ const createIdentitiesRPC = ({ ); call.sendMetadata(responseMeta); // Get's an identity out of all identities. - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); const providerId = call.request.getProviderId() as ProviderId; const provider = identitiesManager.getProvider(providerId); if (provider == null) throw Error(`Invalid provider: ${providerId}`); @@ -242,11 +231,8 @@ const createIdentitiesRPC = ({ * Augments the keynode with a new identity. */ identitiesClaim: async ( - call: grpc.ServerUnaryCall< - clientPB.ProviderMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { // To augment a keynode we need a provider, generate an oauthkey and then const info = call.request; @@ -274,7 +260,7 @@ const createIdentitiesRPC = ({ } catch (err) { callback(grpcUtils.fromError(err), null); } - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); callback(null, emptyMessage); }, }; diff --git a/src/client/rpcKeys.ts b/src/client/rpcKeys.ts index cf66a19f3..c9e5128c7 100644 --- a/src/client/rpcKeys.ts +++ b/src/client/rpcKeys.ts @@ -8,7 +8,9 @@ import type { GRPCServer } from '../grpc'; import * as utils from './utils'; import * as grpc from '@grpc/grpc-js'; import * as grpcUtils from '../grpc/utils'; -import * as clientPB from '../proto/js/Client_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as sessionsPB from '../proto/js/polykey/v1/sessions/sessions_pb'; +import * as keysPB from '../proto/js/polykey/v1/keys/keys_pb'; const createKeysRPC = ({ keyManager, @@ -27,13 +29,10 @@ const createKeysRPC = ({ }) => { return { keysKeyPairRoot: async ( - call: grpc.ServerUnaryCall< - clientPB.EmptyMessage, - clientPB.KeyPairMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.KeyPairMessage(); + const response = new keysPB.KeyPair(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const keyPair = keyManager.getRootKeyPairPem(); @@ -45,10 +44,10 @@ const createKeysRPC = ({ callback(null, response); }, keysKeyPairReset: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { // Lock the nodeManager - because we need to do a database refresh too await nodeManager.transaction(async (nodeManager) => { @@ -75,10 +74,10 @@ const createKeysRPC = ({ callback(null, response); }, keysKeyPairRenew: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { // Lock the nodeManager - because we need to do a database refresh too await nodeManager.transaction(async (nodeManager) => { @@ -105,13 +104,10 @@ const createKeysRPC = ({ callback(null, response); }, keysEncrypt: async ( - call: grpc.ServerUnaryCall< - clientPB.CryptoMessage, - clientPB.CryptoMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.CryptoMessage(); + const response = new keysPB.Crypto(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -128,13 +124,10 @@ const createKeysRPC = ({ callback(null, response); }, keysDecrypt: async ( - call: grpc.ServerUnaryCall< - clientPB.CryptoMessage, - clientPB.CryptoMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.CryptoMessage(); + const response = new keysPB.Crypto(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -151,13 +144,10 @@ const createKeysRPC = ({ callback(null, response); }, keysSign: async ( - call: grpc.ServerUnaryCall< - clientPB.CryptoMessage, - clientPB.CryptoMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.CryptoMessage(); + const response = new keysPB.Crypto(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -174,13 +164,10 @@ const createKeysRPC = ({ callback(null, response); }, keysVerify: async ( - call: grpc.ServerUnaryCall< - clientPB.CryptoMessage, - clientPB.StatusMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -198,13 +185,10 @@ const createKeysRPC = ({ callback(null, response); }, keysPasswordChange: async ( - call: grpc.ServerUnaryCall< - clientPB.PasswordMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -218,13 +202,10 @@ const createKeysRPC = ({ callback(null, response); }, keysCertsGet: async ( - call: grpc.ServerUnaryCall< - clientPB.EmptyMessage, - clientPB.CertificateMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.CertificateMessage(); + const response = new keysPB.Certificate(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -239,10 +220,7 @@ const createKeysRPC = ({ callback(null, response); }, keysCertsChainGet: async ( - call: grpc.ServerWritableStream< - clientPB.EmptyMessage, - clientPB.CertificateMessage - >, + call: grpc.ServerWritableStream, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); try { @@ -252,9 +230,9 @@ const createKeysRPC = ({ ); call.sendMetadata(responseMeta); const certs: Array = await keyManager.getRootCertChainPems(); - let certMessage: clientPB.CertificateMessage; + let certMessage: keysPB.Certificate; for (const cert of certs) { - certMessage = new clientPB.CertificateMessage(); + certMessage = new keysPB.Certificate(); certMessage.setCert(cert); await genWritable.next(certMessage); } diff --git a/src/client/rpcNodes.ts b/src/client/rpcNodes.ts index 02c65666c..f2a8bea66 100644 --- a/src/client/rpcNodes.ts +++ b/src/client/rpcNodes.ts @@ -5,7 +5,8 @@ import type { SessionManager } from '../sessions'; import type { NotificationsManager } from '../notifications'; import * as grpc from '@grpc/grpc-js'; -import * as clientPB from '../proto/js/Client_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; import * as utils from '../client/utils'; import * as nodesUtils from '../nodes/utils'; import * as grpcUtils from '../grpc/utils'; @@ -28,13 +29,10 @@ const createNodesRPC = ({ * of the passed ID or host/port. */ nodesAdd: async ( - call: grpc.ServerUnaryCall< - clientPB.NodeAddressMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.EmptyMessage(); + const response = new utilsPB.EmptyMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -46,13 +44,15 @@ const createNodesRPC = ({ if (!validNodeId) { throw new nodesErrors.ErrorInvalidNodeId(); } - const validHost = nodesUtils.isValidHost(call.request.getHost()); + const validHost = nodesUtils.isValidHost( + call.request.getAddress()!.getHost(), + ); if (!validHost) { throw new nodesErrors.ErrorInvalidHost(); } await nodeManager.setNode(makeNodeId(call.request.getNodeId()), { - ip: call.request.getHost(), - port: call.request.getPort(), + ip: call.request.getAddress()!.getHost(), + port: call.request.getAddress()!.getPort(), } as NodeAddress); } catch (err) { callback(grpcUtils.fromError(err), response); @@ -63,10 +63,10 @@ const createNodesRPC = ({ * Checks if a remote node is online. */ nodesPing: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -88,13 +88,10 @@ const createNodesRPC = ({ * other node and host node. */ nodesClaim: async ( - call: grpc.ServerUnaryCall< - clientPB.NodeClaimMessage, - clientPB.StatusMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -130,13 +127,10 @@ const createNodesRPC = ({ * @throws ErrorNodeGraphNodeNotFound if node address cannot be found */ nodesFind: async ( - call: grpc.ServerUnaryCall< - clientPB.NodeMessage, - clientPB.NodeAddressMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.NodeAddressMessage(); + const response = new nodesPB.NodeAddress(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -145,9 +139,11 @@ const createNodesRPC = ({ call.sendMetadata(responseMeta); const nodeId = makeNodeId(call.request.getNodeId()); const address = await nodeManager.findNode(nodeId); - response.setNodeId(nodeId); - response.setHost(address.ip); - response.setPort(address.port); + response + .setNodeId(nodeId) + .setAddress( + new nodesPB.Address().setHost(address.ip).setPort(address.port), + ); } catch (err) { callback(grpcUtils.fromError(err), response); } diff --git a/src/client/rpcNotifications.ts b/src/client/rpcNotifications.ts index a58d34ebb..34d17c2c2 100644 --- a/src/client/rpcNotifications.ts +++ b/src/client/rpcNotifications.ts @@ -3,7 +3,8 @@ import type { NotificationsManager } from '../notifications'; import * as grpc from '@grpc/grpc-js'; import * as utils from './utils'; -import * as clientPB from '../proto/js/Client_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as notificationsPB from '../proto/js/polykey/v1/notifications/notifications_pb'; import * as grpcUtils from '../grpc/utils'; import * as notificationsUtils from '../notifications/utils'; import { makeNodeId } from '../nodes/utils'; @@ -17,11 +18,8 @@ const createNotificationsRPC = ({ }) => { return { notificationsSend: async ( - call: grpc.ServerUnaryCall< - clientPB.NotificationsSendMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { try { await sessionManager.verifyToken(utils.getToken(call.metadata)); @@ -40,17 +38,14 @@ const createNotificationsRPC = ({ } catch (err) { callback(grpcUtils.fromError(err), null); } - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); callback(null, emptyMessage); }, notificationsRead: async ( - call: grpc.ServerUnaryCall< - clientPB.NotificationsReadMessage, - clientPB.NotificationsListMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.NotificationsListMessage(); + const response = new notificationsPB.List(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -73,12 +68,12 @@ const createNotificationsRPC = ({ order, }); - const notifMessages: Array = []; + const notifMessages: Array = []; for (const notif of notifications) { - const notificationsMessage = new clientPB.NotificationsMessage(); + const notificationsMessage = new notificationsPB.Notification(); switch (notif.data.type) { case 'General': { - const generalMessage = new clientPB.GeneralTypeMessage(); + const generalMessage = new notificationsPB.General(); generalMessage.setMessage(notif.data.message); notificationsMessage.setGeneral(generalMessage); break; @@ -88,7 +83,7 @@ const createNotificationsRPC = ({ break; } case 'VaultShare': { - const vaultShareMessage = new clientPB.VaultShareTypeMessage(); + const vaultShareMessage = new notificationsPB.Share(); vaultShareMessage.setVaultId(notif.data.vaultId); vaultShareMessage.setVaultName(notif.data.vaultName); vaultShareMessage.setActionsList(Object.keys(notif.data.actions)); @@ -107,8 +102,8 @@ const createNotificationsRPC = ({ callback(null, response); }, notificationsClear: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { try { await sessionManager.verifyToken(utils.getToken(call.metadata)); @@ -120,7 +115,7 @@ const createNotificationsRPC = ({ } catch (err) { callback(grpcUtils.fromError(err), null); } - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); callback(null, emptyMessage); }, }; diff --git a/src/client/rpcSession.ts b/src/client/rpcSession.ts index f50bb64a9..5ee13d430 100644 --- a/src/client/rpcSession.ts +++ b/src/client/rpcSession.ts @@ -5,7 +5,8 @@ import * as utils from './utils'; import * as grpc from '@grpc/grpc-js'; import * as clientErrors from './errors'; import * as grpcUtils from '../grpc/utils'; -import * as clientPB from '../proto/js/Client_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as sessionsPB from '../proto/js/polykey/v1/sessions/sessions_pb'; import * as sessionUtils from '../sessions/utils'; const createSessionRPC = ({ @@ -17,13 +18,10 @@ const createSessionRPC = ({ }) => { return { sessionUnlock: async ( - call: grpc.ServerUnaryCall< - clientPB.PasswordMessage, - clientPB.SessionTokenMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.SessionTokenMessage(); + const response = new sessionsPB.Token(); try { const password = await sessionUtils.passwordFromPasswordMessage( call.request, @@ -39,13 +37,10 @@ const createSessionRPC = ({ callback(null, response); }, sessionRefresh: async ( - call: grpc.ServerUnaryCall< - clientPB.EmptyMessage, - clientPB.SessionTokenMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.SessionTokenMessage(); + const response = new sessionsPB.Token(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); response.setToken(await sessionManager.generateToken()); @@ -55,10 +50,10 @@ const createSessionRPC = ({ callback(null, response); }, sessionLockAll: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); await sessionManager.refreshKey(); diff --git a/src/client/rpcVaults.ts b/src/client/rpcVaults.ts index 718cbdfcd..bec554f8e 100644 --- a/src/client/rpcVaults.ts +++ b/src/client/rpcVaults.ts @@ -6,7 +6,10 @@ import type { VaultManager } from '../vaults'; import * as utils from './utils'; import * as grpc from '@grpc/grpc-js'; import * as grpcUtils from '../grpc/utils'; -import * as clientPB from '../proto/js/Client_pb'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as vaultsPB from '../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; +import * as secretsPB from '../proto/js/polykey/v1/secrets/secrets_pb'; import { isNodeId, makeNodeId } from '../nodes/utils'; import { vaultOps } from '../vaults'; import { makeVaultIdPretty } from '../vaults/utils'; @@ -21,11 +24,11 @@ const createVaultRPC = ({ }) => { return { vaultsList: async ( - call: grpc.ServerWritableStream< - clientPB.EmptyMessage, - clientPB.VaultListMessage - >, + call: grpc.ServerWritableStream, ): Promise => { + // Call.on('error', (e) => console.error(e)); + // call.on('close', () => console.log('Got close')); + // call.on('finish', () => console.log('Got finish')); const genWritable = grpcUtils.generatorWritable(call); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); @@ -35,10 +38,10 @@ const createVaultRPC = ({ call.sendMetadata(responseMeta); const vaults = await vaultManager.listVaults(); for await (const [vaultName, vaultId] of vaults) { - const vaultListMessage = new clientPB.VaultListMessage(); + const vaultListMessage = new vaultsPB.List(); vaultListMessage.setVaultName(vaultName); vaultListMessage.setVaultId(makeVaultIdPretty(vaultId)); - await genWritable.next(vaultListMessage); + await genWritable.next(((_) => vaultListMessage)()); } await genWritable.next(null); } catch (err) { @@ -46,10 +49,10 @@ const createVaultRPC = ({ } }, vaultsCreate: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.VaultMessage(); + const response = new vaultsPB.Vault(); let vault: Vault; try { await sessionManager.verifyToken(utils.getToken(call.metadata)); @@ -67,13 +70,10 @@ const createVaultRPC = ({ callback(null, response); }, vaultsRename: async ( - call: grpc.ServerUnaryCall< - clientPB.VaultRenameMessage, - clientPB.VaultMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.VaultMessage(); + const response = new vaultsPB.Vault(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -95,11 +95,11 @@ const createVaultRPC = ({ } }, vaultsDelete: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { const vaultMessage = call.request; - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -115,13 +115,10 @@ const createVaultRPC = ({ } }, vaultsClone: async ( - call: grpc.ServerUnaryCall< - clientPB.VaultCloneMessage, - clientPB.StatusMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -153,13 +150,10 @@ const createVaultRPC = ({ } }, vaultsPull: async ( - call: grpc.ServerUnaryCall< - clientPB.VaultPullMessage, - clientPB.StatusMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -189,10 +183,7 @@ const createVaultRPC = ({ } }, vaultsScan: async ( - call: grpc.ServerWritableStream< - clientPB.NodeMessage, - clientPB.VaultListMessage - >, + call: grpc.ServerWritableStream, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); const nodeId = makeNodeId(call.request.getNodeId()); @@ -205,7 +196,7 @@ const createVaultRPC = ({ call.sendMetadata(responseMeta); const vaults = await vaultManager.listVaults(); vaults.forEach(async (vaultId, vaultName) => { - const vaultListMessage = new clientPB.VaultListMessage(); + const vaultListMessage = new vaultsPB.List(); vaultListMessage.setVaultName(vaultName); vaultListMessage.setVaultId(makeVaultIdPretty(vaultId)); await genWritable.next(vaultListMessage); @@ -216,10 +207,7 @@ const createVaultRPC = ({ } }, vaultsSecretsList: async ( - call: grpc.ServerWritableStream< - clientPB.VaultMessage, - clientPB.SecretMessage - >, + call: grpc.ServerWritableStream, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); @@ -233,9 +221,9 @@ const createVaultRPC = ({ const id = await utils.parseVaultInput(vaultMessage, vaultManager); const vault = await vaultManager.openVault(id); const secrets = await vaultOps.listSecrets(vault); - let secretMessage: clientPB.SecretMessage; + let secretMessage: secretsPB.Secret; for (const secret of secrets) { - secretMessage = new clientPB.SecretMessage(); + secretMessage = new secretsPB.Secret(); secretMessage.setSecretName(secret); await genWritable.next(secretMessage); } @@ -245,13 +233,10 @@ const createVaultRPC = ({ } }, vaultsSecretsMkdir: async ( - call: grpc.ServerUnaryCall< - clientPB.VaultMkdirMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -277,10 +262,10 @@ const createVaultRPC = ({ } }, vaultsSecretsStat: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatMessage(); + const response = new vaultsPB.Stat(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -300,13 +285,10 @@ const createVaultRPC = ({ } }, vaultsSecretsDelete: async ( - call: grpc.ServerUnaryCall< - clientPB.SecretMessage, - clientPB.StatusMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -329,13 +311,10 @@ const createVaultRPC = ({ } }, vaultsSecretsEdit: async ( - call: grpc.ServerUnaryCall< - clientPB.SecretMessage, - clientPB.StatusMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -364,10 +343,10 @@ const createVaultRPC = ({ } }, vaultsSecretsGet: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.SecretMessage(); + const response = new secretsPB.Secret(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -391,13 +370,10 @@ const createVaultRPC = ({ } }, vaultsSecretsRename: async ( - call: grpc.ServerUnaryCall< - clientPB.SecretRenameMessage, - clientPB.StatusMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -426,13 +402,10 @@ const createVaultRPC = ({ } }, vaultsSecretsNew: async ( - call: grpc.ServerUnaryCall< - clientPB.SecretMessage, - clientPB.StatusMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -456,13 +429,10 @@ const createVaultRPC = ({ } }, vaultsSecretsNewDir: async ( - call: grpc.ServerUnaryCall< - clientPB.SecretDirectoryMessage, - clientPB.EmptyMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); try { await sessionManager.verifyToken(utils.getToken(call.metadata)); const responseMeta = utils.createMetaTokenResponse( @@ -485,11 +455,8 @@ const createVaultRPC = ({ } }, vaultsPermissionsSet: async ( - call: grpc.ServerUnaryCall< - clientPB.SetVaultPermMessage, - clientPB.StatusMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { try { await sessionManager.verifyToken(utils.getToken(call.metadata)); @@ -511,7 +478,7 @@ const createVaultRPC = ({ const id = await utils.parseVaultInput(vaultMessage, vaultManager); throw Error('Not Implemented'); // Await vaultManager.setVaultPermissions(node, id); // FIXME - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); response.setSuccess(true); callback(null, response); } catch (err) { @@ -519,11 +486,8 @@ const createVaultRPC = ({ } }, vaultsPermissionsUnset: async ( - call: grpc.ServerUnaryCall< - clientPB.UnsetVaultPermMessage, - clientPB.StatusMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { try { await sessionManager.verifyToken(utils.getToken(call.metadata)); @@ -545,7 +509,7 @@ const createVaultRPC = ({ const id = await utils.parseVaultInput(vaultMessage, vaultManager); throw Error('Not implemented'); // Await vaultManager.unsetVaultPermissions(node, id); // FIXME - const response = new clientPB.StatusMessage(); + const response = new utilsPB.StatusMessage(); response.setSuccess(true); callback(null, response); } catch (err) { @@ -553,10 +517,7 @@ const createVaultRPC = ({ } }, vaultsPermissions: async ( - call: grpc.ServerWritableStream< - clientPB.GetVaultPermMessage, - clientPB.PermissionMessage - >, + call: grpc.ServerWritableStream, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); @@ -586,7 +547,7 @@ const createVaultRPC = ({ } else { // Perms = await vaultManager.getVaultPermissions(id); } - const permissionMessage = new clientPB.PermissionMessage(); + const permissionMessage = new vaultsPB.Permission(); // For (const nodeId in perms) { // permissionMessage.setNodeId(nodeId); // if (perms[nodeId]['pull'] !== undefined) { @@ -600,11 +561,8 @@ const createVaultRPC = ({ } }, vaultsVersion: async ( - call: grpc.ServerUnaryCall< - clientPB.VaultsVersionMessage, - clientPB.VaultsVersionResultMessage - >, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { try { //Checking session token @@ -636,8 +594,7 @@ const createVaultRPC = ({ const isLatestVersion = latestOid === currentVersionId; // Creating message - const vaultsVersionResultMessage = - new clientPB.VaultsVersionResultMessage(); + const vaultsVersionResultMessage = new vaultsPB.VersionResult(); vaultsVersionResultMessage.setIsLatestVersion(isLatestVersion); // Sending message @@ -647,10 +604,7 @@ const createVaultRPC = ({ } }, vaultsLog: async ( - call: grpc.ServerWritableStream< - clientPB.VaultsLogMessage, - clientPB.VaultsLogEntryMessage - >, + call: grpc.ServerWritableStream, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); try { @@ -659,7 +613,6 @@ const createVaultRPC = ({ await sessionManager.generateToken(), ); call.sendMetadata(responseMeta); - //Getting the vault. const vaultsLogMessage = call.request; const vaultMessage = vaultsLogMessage.getVault(); @@ -676,7 +629,7 @@ const createVaultRPC = ({ commitId = commitId ? commitId : undefined; const log = await vault.log(depth, commitId); - const vaultsLogEntryMessage = new clientPB.VaultsLogEntryMessage(); + const vaultsLogEntryMessage = new vaultsPB.LogEntry(); for (const entry of log) { vaultsLogEntryMessage.setOid(entry.oid); vaultsLogEntryMessage.setCommitter(entry.committer); diff --git a/src/client/utils.ts b/src/client/utils.ts index 1ec568bcd..096712489 100644 --- a/src/client/utils.ts +++ b/src/client/utils.ts @@ -5,13 +5,13 @@ import type { SessionToken } from '../sessions/types'; import * as grpc from '@grpc/grpc-js'; import * as clientErrors from '../client/errors'; -import { VaultMessage } from '../proto/js/Client_pb'; import { ErrorVaultUndefined } from '../vaults/errors'; import { makeVaultId } from '../vaults/utils'; import { ErrorInvalidId } from '../errors'; +import * as vaultsPB from '../proto/js/polykey/v1/vaults/vaults_pb'; async function parseVaultInput( - vaultMessage: VaultMessage, + vaultMessage: vaultsPB.Vault, vaultManager: VaultManager, ): Promise { const vaultNameOrid = vaultMessage.getNameOrId(); diff --git a/src/nodes/NodeConnection.ts b/src/nodes/NodeConnection.ts index 069388aff..e8bc4ac26 100644 --- a/src/nodes/NodeConnection.ts +++ b/src/nodes/NodeConnection.ts @@ -17,8 +17,10 @@ import * as claimsUtils from '../claims/utils'; import * as claimsErrors from '../claims/errors'; import * as keysUtils from '../keys/utils'; import * as vaultsUtils from '../vaults/utils'; -import { NodeAddressMessage } from '../proto/js/Agent_pb'; -import { agentPB, GRPCClientAgent } from '../agent'; +import { GRPCClientAgent } from '../agent'; +import * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; +import * as notificationsPB from '../proto/js/polykey/v1/notifications/notifications_pb'; import { ForwardProxy, utils as networkUtils } from '../network'; import { CreateDestroyStartStop, @@ -240,27 +242,22 @@ class NodeConnection { @ready(new nodesErrors.ErrorNodeConnectionNotStarted()) public async getClosestNodes(targetNodeId: NodeId): Promise> { // Construct the message - const nodeIdMessage = new agentPB.NodeIdMessage(); + const nodeIdMessage = new nodesPB.Node(); nodeIdMessage.setNodeId(targetNodeId); // Send through client const response = await this.client.nodesClosestLocalNodesGet(nodeIdMessage); const nodes: Array = []; // Loop over each map element (from the returned response) and populate nodes - response - .getNodeTableMap() - .forEach((address: NodeAddressMessage, nodeId: string) => { - nodes.push({ - id: nodeId as NodeId, - address: { - ip: address.getIp() as Host, - port: address.getPort() as Port, - }, - distance: nodesUtils.calculateDistance( - targetNodeId, - nodeId as NodeId, - ), - }); + response.getNodeTableMap().forEach((address, nodeId: string) => { + nodes.push({ + id: nodeId as NodeId, + address: { + ip: address.getHost() as Host, + port: address.getPort() as Port, + }, + distance: nodesUtils.calculateDistance(targetNodeId, nodeId as NodeId), }); + }); return nodes; } @@ -281,7 +278,7 @@ class NodeConnection { egressAddress: string, signature: Buffer, ): Promise { - const relayMsg = new agentPB.RelayMessage(); + const relayMsg = new nodesPB.Relay(); relayMsg.setSrcId(sourceNodeId); relayMsg.setTargetId(targetNodeId); relayMsg.setEgressAddress(egressAddress); @@ -294,7 +291,7 @@ class NodeConnection { */ @ready(new nodesErrors.ErrorNodeConnectionNotStarted()) public async sendNotification(message: SignedNotification): Promise { - const notificationMsg = new agentPB.NotificationMessage(); + const notificationMsg = new notificationsPB.AgentNotification(); notificationMsg.setContent(message); await this.client.notificationsSend(notificationMsg); return; @@ -308,27 +305,25 @@ class NodeConnection { @ready(new nodesErrors.ErrorNodeConnectionNotStarted()) public async getChainData(): Promise { const chainData: ChainDataEncoded = {}; - const emptyMsg = new agentPB.EmptyMessage(); + const emptyMsg = new utilsPB.EmptyMessage(); const response = await this.client.nodesChainDataGet(emptyMsg); // Reconstruct each claim from the returned ChainDataMessage - response - .getChainDataMap() - .forEach((claimMsg: agentPB.ClaimMessage, id: string) => { - const claimId = id as ClaimIdString; - // Reconstruct the signatures array - const signatures: Array<{ signature: string; protected: string }> = []; - for (const signatureData of claimMsg.getSignaturesList()) { - signatures.push({ - signature: signatureData.getSignature(), - protected: signatureData.getProtected(), - }); - } - // Add to the record of chain data, casting as expected ClaimEncoded - chainData[claimId] = { - signatures: signatures, - payload: claimMsg.getPayload(), - } as ClaimEncoded; - }); + response.getChainDataMap().forEach((claimMsg, id: string) => { + const claimId = id as ClaimIdString; + // Reconstruct the signatures array + const signatures: Array<{ signature: string; protected: string }> = []; + for (const signatureData of claimMsg.getSignaturesList()) { + signatures.push({ + signature: signatureData.getSignature(), + protected: signatureData.getProtected(), + }); + } + // Add to the record of chain data, casting as expected ClaimEncoded + chainData[claimId] = { + signatures: signatures, + payload: claimMsg.getPayload(), + } as ClaimEncoded; + }); return chainData; } diff --git a/src/nodes/NodeManager.ts b/src/nodes/NodeManager.ts index 2cda1cf1b..cd011e109 100644 --- a/src/nodes/NodeManager.ts +++ b/src/nodes/NodeManager.ts @@ -23,8 +23,8 @@ import { errors as dbErrors } from '@matrixai/db'; import * as networkErrors from '../network/errors'; import * as sigchainUtils from '../sigchain/utils'; import * as claimsUtils from '../claims/utils'; -import * as agentPB from '../proto/js/Agent_pb'; import { GRPCClientAgent } from '../agent'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; import { ForwardProxy, ReverseProxy } from '../network'; import { Mutex } from 'async-mutex'; import { @@ -392,9 +392,7 @@ class NodeManager { * nodeConnection.start()) */ @ready(new nodesErrors.ErrorNodeManagerNotStarted()) - public async relayHolePunchMessage( - message: agentPB.RelayMessage, - ): Promise { + public async relayHolePunchMessage(message: nodesPB.Relay): Promise { const conn = await this.getConnectionToNode( message.getTargetId() as NodeId, ); diff --git a/src/proto/js/Agent_grpc_pb.d.ts b/src/proto/js/Agent_grpc_pb.d.ts deleted file mode 100644 index 41e3818ef..000000000 --- a/src/proto/js/Agent_grpc_pb.d.ts +++ /dev/null @@ -1,205 +0,0 @@ -// package: agentInterface -// file: Agent.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as Agent_pb from "./Agent_pb"; - -interface IAgentService extends grpc.ServiceDefinition { - echo: IAgentService_IEcho; - vaultsGitInfoGet: IAgentService_IVaultsGitInfoGet; - vaultsGitPackGet: IAgentService_IVaultsGitPackGet; - vaultsScan: IAgentService_IVaultsScan; - vaultsPermisssionsCheck: IAgentService_IVaultsPermisssionsCheck; - nodesClosestLocalNodesGet: IAgentService_INodesClosestLocalNodesGet; - nodesClaimsGet: IAgentService_INodesClaimsGet; - nodesChainDataGet: IAgentService_INodesChainDataGet; - nodesHolePunchMessageSend: IAgentService_INodesHolePunchMessageSend; - nodesCrossSignClaim: IAgentService_INodesCrossSignClaim; - notificationsSend: IAgentService_INotificationsSend; -} - -interface IAgentService_IEcho extends grpc.MethodDefinition { - path: "/agentInterface.Agent/Echo"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IAgentService_IVaultsGitInfoGet extends grpc.MethodDefinition { - path: "/agentInterface.Agent/VaultsGitInfoGet"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IAgentService_IVaultsGitPackGet extends grpc.MethodDefinition { - path: "/agentInterface.Agent/VaultsGitPackGet"; - requestStream: true; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IAgentService_IVaultsScan extends grpc.MethodDefinition { - path: "/agentInterface.Agent/VaultsScan"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IAgentService_IVaultsPermisssionsCheck extends grpc.MethodDefinition { - path: "/agentInterface.Agent/VaultsPermisssionsCheck"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IAgentService_INodesClosestLocalNodesGet extends grpc.MethodDefinition { - path: "/agentInterface.Agent/NodesClosestLocalNodesGet"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IAgentService_INodesClaimsGet extends grpc.MethodDefinition { - path: "/agentInterface.Agent/NodesClaimsGet"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IAgentService_INodesChainDataGet extends grpc.MethodDefinition { - path: "/agentInterface.Agent/NodesChainDataGet"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IAgentService_INodesHolePunchMessageSend extends grpc.MethodDefinition { - path: "/agentInterface.Agent/NodesHolePunchMessageSend"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IAgentService_INodesCrossSignClaim extends grpc.MethodDefinition { - path: "/agentInterface.Agent/NodesCrossSignClaim"; - requestStream: true; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IAgentService_INotificationsSend extends grpc.MethodDefinition { - path: "/agentInterface.Agent/NotificationsSend"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const AgentService: IAgentService; - -export interface IAgentServer extends grpc.UntypedServiceImplementation { - echo: grpc.handleUnaryCall; - vaultsGitInfoGet: grpc.handleServerStreamingCall; - vaultsGitPackGet: grpc.handleBidiStreamingCall; - vaultsScan: grpc.handleServerStreamingCall; - vaultsPermisssionsCheck: grpc.handleUnaryCall; - nodesClosestLocalNodesGet: grpc.handleUnaryCall; - nodesClaimsGet: grpc.handleUnaryCall; - nodesChainDataGet: grpc.handleUnaryCall; - nodesHolePunchMessageSend: grpc.handleUnaryCall; - nodesCrossSignClaim: grpc.handleBidiStreamingCall; - notificationsSend: grpc.handleUnaryCall; -} - -export interface IAgentClient { - echo(request: Agent_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.EchoMessage) => void): grpc.ClientUnaryCall; - echo(request: Agent_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.EchoMessage) => void): grpc.ClientUnaryCall; - echo(request: Agent_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.EchoMessage) => void): grpc.ClientUnaryCall; - vaultsGitInfoGet(request: Agent_pb.InfoRequest, options?: Partial): grpc.ClientReadableStream; - vaultsGitInfoGet(request: Agent_pb.InfoRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - vaultsGitPackGet(): grpc.ClientDuplexStream; - vaultsGitPackGet(options: Partial): grpc.ClientDuplexStream; - vaultsGitPackGet(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; - vaultsScan(request: Agent_pb.NodeIdMessage, options?: Partial): grpc.ClientReadableStream; - vaultsScan(request: Agent_pb.NodeIdMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - vaultsPermisssionsCheck(request: Agent_pb.VaultPermMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.PermissionMessage) => void): grpc.ClientUnaryCall; - vaultsPermisssionsCheck(request: Agent_pb.VaultPermMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.PermissionMessage) => void): grpc.ClientUnaryCall; - vaultsPermisssionsCheck(request: Agent_pb.VaultPermMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.PermissionMessage) => void): grpc.ClientUnaryCall; - nodesClosestLocalNodesGet(request: Agent_pb.NodeIdMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.NodeTableMessage) => void): grpc.ClientUnaryCall; - nodesClosestLocalNodesGet(request: Agent_pb.NodeIdMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.NodeTableMessage) => void): grpc.ClientUnaryCall; - nodesClosestLocalNodesGet(request: Agent_pb.NodeIdMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.NodeTableMessage) => void): grpc.ClientUnaryCall; - nodesClaimsGet(request: Agent_pb.ClaimTypeMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.ClaimsMessage) => void): grpc.ClientUnaryCall; - nodesClaimsGet(request: Agent_pb.ClaimTypeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.ClaimsMessage) => void): grpc.ClientUnaryCall; - nodesClaimsGet(request: Agent_pb.ClaimTypeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.ClaimsMessage) => void): grpc.ClientUnaryCall; - nodesChainDataGet(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.ChainDataMessage) => void): grpc.ClientUnaryCall; - nodesChainDataGet(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.ChainDataMessage) => void): grpc.ClientUnaryCall; - nodesChainDataGet(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.ChainDataMessage) => void): grpc.ClientUnaryCall; - nodesHolePunchMessageSend(request: Agent_pb.RelayMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - nodesHolePunchMessageSend(request: Agent_pb.RelayMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - nodesHolePunchMessageSend(request: Agent_pb.RelayMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - nodesCrossSignClaim(): grpc.ClientDuplexStream; - nodesCrossSignClaim(options: Partial): grpc.ClientDuplexStream; - nodesCrossSignClaim(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; - notificationsSend(request: Agent_pb.NotificationMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - notificationsSend(request: Agent_pb.NotificationMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - notificationsSend(request: Agent_pb.NotificationMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; -} - -export class AgentClient extends grpc.Client implements IAgentClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public echo(request: Agent_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.EchoMessage) => void): grpc.ClientUnaryCall; - public echo(request: Agent_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.EchoMessage) => void): grpc.ClientUnaryCall; - public echo(request: Agent_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.EchoMessage) => void): grpc.ClientUnaryCall; - public vaultsGitInfoGet(request: Agent_pb.InfoRequest, options?: Partial): grpc.ClientReadableStream; - public vaultsGitInfoGet(request: Agent_pb.InfoRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public vaultsGitPackGet(options?: Partial): grpc.ClientDuplexStream; - public vaultsGitPackGet(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; - public vaultsScan(request: Agent_pb.NodeIdMessage, options?: Partial): grpc.ClientReadableStream; - public vaultsScan(request: Agent_pb.NodeIdMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public vaultsPermisssionsCheck(request: Agent_pb.VaultPermMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.PermissionMessage) => void): grpc.ClientUnaryCall; - public vaultsPermisssionsCheck(request: Agent_pb.VaultPermMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.PermissionMessage) => void): grpc.ClientUnaryCall; - public vaultsPermisssionsCheck(request: Agent_pb.VaultPermMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.PermissionMessage) => void): grpc.ClientUnaryCall; - public nodesClosestLocalNodesGet(request: Agent_pb.NodeIdMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.NodeTableMessage) => void): grpc.ClientUnaryCall; - public nodesClosestLocalNodesGet(request: Agent_pb.NodeIdMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.NodeTableMessage) => void): grpc.ClientUnaryCall; - public nodesClosestLocalNodesGet(request: Agent_pb.NodeIdMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.NodeTableMessage) => void): grpc.ClientUnaryCall; - public nodesClaimsGet(request: Agent_pb.ClaimTypeMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.ClaimsMessage) => void): grpc.ClientUnaryCall; - public nodesClaimsGet(request: Agent_pb.ClaimTypeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.ClaimsMessage) => void): grpc.ClientUnaryCall; - public nodesClaimsGet(request: Agent_pb.ClaimTypeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.ClaimsMessage) => void): grpc.ClientUnaryCall; - public nodesChainDataGet(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.ChainDataMessage) => void): grpc.ClientUnaryCall; - public nodesChainDataGet(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.ChainDataMessage) => void): grpc.ClientUnaryCall; - public nodesChainDataGet(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.ChainDataMessage) => void): grpc.ClientUnaryCall; - public nodesHolePunchMessageSend(request: Agent_pb.RelayMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public nodesHolePunchMessageSend(request: Agent_pb.RelayMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public nodesHolePunchMessageSend(request: Agent_pb.RelayMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public nodesCrossSignClaim(options?: Partial): grpc.ClientDuplexStream; - public nodesCrossSignClaim(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; - public notificationsSend(request: Agent_pb.NotificationMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public notificationsSend(request: Agent_pb.NotificationMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public notificationsSend(request: Agent_pb.NotificationMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.EmptyMessage) => void): grpc.ClientUnaryCall; -} diff --git a/src/proto/js/Agent_grpc_pb.js b/src/proto/js/Agent_grpc_pb.js deleted file mode 100644 index cf92b4575..000000000 --- a/src/proto/js/Agent_grpc_pb.js +++ /dev/null @@ -1,301 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var Agent_pb = require('./Agent_pb.js'); - -function serialize_agentInterface_ChainDataMessage(arg) { - if (!(arg instanceof Agent_pb.ChainDataMessage)) { - throw new Error('Expected argument of type agentInterface.ChainDataMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_ChainDataMessage(buffer_arg) { - return Agent_pb.ChainDataMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_ClaimTypeMessage(arg) { - if (!(arg instanceof Agent_pb.ClaimTypeMessage)) { - throw new Error('Expected argument of type agentInterface.ClaimTypeMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_ClaimTypeMessage(buffer_arg) { - return Agent_pb.ClaimTypeMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_ClaimsMessage(arg) { - if (!(arg instanceof Agent_pb.ClaimsMessage)) { - throw new Error('Expected argument of type agentInterface.ClaimsMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_ClaimsMessage(buffer_arg) { - return Agent_pb.ClaimsMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_CrossSignMessage(arg) { - if (!(arg instanceof Agent_pb.CrossSignMessage)) { - throw new Error('Expected argument of type agentInterface.CrossSignMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_CrossSignMessage(buffer_arg) { - return Agent_pb.CrossSignMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_EchoMessage(arg) { - if (!(arg instanceof Agent_pb.EchoMessage)) { - throw new Error('Expected argument of type agentInterface.EchoMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_EchoMessage(buffer_arg) { - return Agent_pb.EchoMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_EmptyMessage(arg) { - if (!(arg instanceof Agent_pb.EmptyMessage)) { - throw new Error('Expected argument of type agentInterface.EmptyMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_EmptyMessage(buffer_arg) { - return Agent_pb.EmptyMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_InfoRequest(arg) { - if (!(arg instanceof Agent_pb.InfoRequest)) { - throw new Error('Expected argument of type agentInterface.InfoRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_InfoRequest(buffer_arg) { - return Agent_pb.InfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_NodeIdMessage(arg) { - if (!(arg instanceof Agent_pb.NodeIdMessage)) { - throw new Error('Expected argument of type agentInterface.NodeIdMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_NodeIdMessage(buffer_arg) { - return Agent_pb.NodeIdMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_NodeTableMessage(arg) { - if (!(arg instanceof Agent_pb.NodeTableMessage)) { - throw new Error('Expected argument of type agentInterface.NodeTableMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_NodeTableMessage(buffer_arg) { - return Agent_pb.NodeTableMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_NotificationMessage(arg) { - if (!(arg instanceof Agent_pb.NotificationMessage)) { - throw new Error('Expected argument of type agentInterface.NotificationMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_NotificationMessage(buffer_arg) { - return Agent_pb.NotificationMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_PackChunk(arg) { - if (!(arg instanceof Agent_pb.PackChunk)) { - throw new Error('Expected argument of type agentInterface.PackChunk'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_PackChunk(buffer_arg) { - return Agent_pb.PackChunk.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_PermissionMessage(arg) { - if (!(arg instanceof Agent_pb.PermissionMessage)) { - throw new Error('Expected argument of type agentInterface.PermissionMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_PermissionMessage(buffer_arg) { - return Agent_pb.PermissionMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_RelayMessage(arg) { - if (!(arg instanceof Agent_pb.RelayMessage)) { - throw new Error('Expected argument of type agentInterface.RelayMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_RelayMessage(buffer_arg) { - return Agent_pb.RelayMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_VaultListMessage(arg) { - if (!(arg instanceof Agent_pb.VaultListMessage)) { - throw new Error('Expected argument of type agentInterface.VaultListMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_VaultListMessage(buffer_arg) { - return Agent_pb.VaultListMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_agentInterface_VaultPermMessage(arg) { - if (!(arg instanceof Agent_pb.VaultPermMessage)) { - throw new Error('Expected argument of type agentInterface.VaultPermMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_agentInterface_VaultPermMessage(buffer_arg) { - return Agent_pb.VaultPermMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -var AgentService = exports.AgentService = { - // Echo -echo: { - path: '/agentInterface.Agent/Echo', - requestStream: false, - responseStream: false, - requestType: Agent_pb.EchoMessage, - responseType: Agent_pb.EchoMessage, - requestSerialize: serialize_agentInterface_EchoMessage, - requestDeserialize: deserialize_agentInterface_EchoMessage, - responseSerialize: serialize_agentInterface_EchoMessage, - responseDeserialize: deserialize_agentInterface_EchoMessage, - }, - // Vaults -vaultsGitInfoGet: { - path: '/agentInterface.Agent/VaultsGitInfoGet', - requestStream: false, - responseStream: true, - requestType: Agent_pb.InfoRequest, - responseType: Agent_pb.PackChunk, - requestSerialize: serialize_agentInterface_InfoRequest, - requestDeserialize: deserialize_agentInterface_InfoRequest, - responseSerialize: serialize_agentInterface_PackChunk, - responseDeserialize: deserialize_agentInterface_PackChunk, - }, - vaultsGitPackGet: { - path: '/agentInterface.Agent/VaultsGitPackGet', - requestStream: true, - responseStream: true, - requestType: Agent_pb.PackChunk, - responseType: Agent_pb.PackChunk, - requestSerialize: serialize_agentInterface_PackChunk, - requestDeserialize: deserialize_agentInterface_PackChunk, - responseSerialize: serialize_agentInterface_PackChunk, - responseDeserialize: deserialize_agentInterface_PackChunk, - }, - vaultsScan: { - path: '/agentInterface.Agent/VaultsScan', - requestStream: false, - responseStream: true, - requestType: Agent_pb.NodeIdMessage, - responseType: Agent_pb.VaultListMessage, - requestSerialize: serialize_agentInterface_NodeIdMessage, - requestDeserialize: deserialize_agentInterface_NodeIdMessage, - responseSerialize: serialize_agentInterface_VaultListMessage, - responseDeserialize: deserialize_agentInterface_VaultListMessage, - }, - vaultsPermisssionsCheck: { - path: '/agentInterface.Agent/VaultsPermisssionsCheck', - requestStream: false, - responseStream: false, - requestType: Agent_pb.VaultPermMessage, - responseType: Agent_pb.PermissionMessage, - requestSerialize: serialize_agentInterface_VaultPermMessage, - requestDeserialize: deserialize_agentInterface_VaultPermMessage, - responseSerialize: serialize_agentInterface_PermissionMessage, - responseDeserialize: deserialize_agentInterface_PermissionMessage, - }, - // Nodes -nodesClosestLocalNodesGet: { - path: '/agentInterface.Agent/NodesClosestLocalNodesGet', - requestStream: false, - responseStream: false, - requestType: Agent_pb.NodeIdMessage, - responseType: Agent_pb.NodeTableMessage, - requestSerialize: serialize_agentInterface_NodeIdMessage, - requestDeserialize: deserialize_agentInterface_NodeIdMessage, - responseSerialize: serialize_agentInterface_NodeTableMessage, - responseDeserialize: deserialize_agentInterface_NodeTableMessage, - }, - nodesClaimsGet: { - path: '/agentInterface.Agent/NodesClaimsGet', - requestStream: false, - responseStream: false, - requestType: Agent_pb.ClaimTypeMessage, - responseType: Agent_pb.ClaimsMessage, - requestSerialize: serialize_agentInterface_ClaimTypeMessage, - requestDeserialize: deserialize_agentInterface_ClaimTypeMessage, - responseSerialize: serialize_agentInterface_ClaimsMessage, - responseDeserialize: deserialize_agentInterface_ClaimsMessage, - }, - nodesChainDataGet: { - path: '/agentInterface.Agent/NodesChainDataGet', - requestStream: false, - responseStream: false, - requestType: Agent_pb.EmptyMessage, - responseType: Agent_pb.ChainDataMessage, - requestSerialize: serialize_agentInterface_EmptyMessage, - requestDeserialize: deserialize_agentInterface_EmptyMessage, - responseSerialize: serialize_agentInterface_ChainDataMessage, - responseDeserialize: deserialize_agentInterface_ChainDataMessage, - }, - nodesHolePunchMessageSend: { - path: '/agentInterface.Agent/NodesHolePunchMessageSend', - requestStream: false, - responseStream: false, - requestType: Agent_pb.RelayMessage, - responseType: Agent_pb.EmptyMessage, - requestSerialize: serialize_agentInterface_RelayMessage, - requestDeserialize: deserialize_agentInterface_RelayMessage, - responseSerialize: serialize_agentInterface_EmptyMessage, - responseDeserialize: deserialize_agentInterface_EmptyMessage, - }, - nodesCrossSignClaim: { - path: '/agentInterface.Agent/NodesCrossSignClaim', - requestStream: true, - responseStream: true, - requestType: Agent_pb.CrossSignMessage, - responseType: Agent_pb.CrossSignMessage, - requestSerialize: serialize_agentInterface_CrossSignMessage, - requestDeserialize: deserialize_agentInterface_CrossSignMessage, - responseSerialize: serialize_agentInterface_CrossSignMessage, - responseDeserialize: deserialize_agentInterface_CrossSignMessage, - }, - // Notifications -notificationsSend: { - path: '/agentInterface.Agent/NotificationsSend', - requestStream: false, - responseStream: false, - requestType: Agent_pb.NotificationMessage, - responseType: Agent_pb.EmptyMessage, - requestSerialize: serialize_agentInterface_NotificationMessage, - requestDeserialize: deserialize_agentInterface_NotificationMessage, - responseSerialize: serialize_agentInterface_EmptyMessage, - responseDeserialize: deserialize_agentInterface_EmptyMessage, - }, -}; - -exports.AgentClient = grpc.makeGenericClientConstructor(AgentService); diff --git a/src/proto/js/Agent_pb.d.ts b/src/proto/js/Agent_pb.d.ts deleted file mode 100644 index 7b9b6e96e..000000000 --- a/src/proto/js/Agent_pb.d.ts +++ /dev/null @@ -1,486 +0,0 @@ -// package: agentInterface -// file: Agent.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class EmptyMessage extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EmptyMessage.AsObject; - static toObject(includeInstance: boolean, msg: EmptyMessage): EmptyMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EmptyMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EmptyMessage; - static deserializeBinaryFromReader(message: EmptyMessage, reader: jspb.BinaryReader): EmptyMessage; -} - -export namespace EmptyMessage { - export type AsObject = { - } -} - -export class EchoMessage extends jspb.Message { - getChallenge(): string; - setChallenge(value: string): EchoMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EchoMessage.AsObject; - static toObject(includeInstance: boolean, msg: EchoMessage): EchoMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EchoMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EchoMessage; - static deserializeBinaryFromReader(message: EchoMessage, reader: jspb.BinaryReader): EchoMessage; -} - -export namespace EchoMessage { - export type AsObject = { - challenge: string, - } -} - -export class InfoRequest extends jspb.Message { - getVaultId(): string; - setVaultId(value: string): InfoRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: InfoRequest): InfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InfoRequest; - static deserializeBinaryFromReader(message: InfoRequest, reader: jspb.BinaryReader): InfoRequest; -} - -export namespace InfoRequest { - export type AsObject = { - vaultId: string, - } -} - -export class PackChunk extends jspb.Message { - getChunk(): Uint8Array | string; - getChunk_asU8(): Uint8Array; - getChunk_asB64(): string; - setChunk(value: Uint8Array | string): PackChunk; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PackChunk.AsObject; - static toObject(includeInstance: boolean, msg: PackChunk): PackChunk.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PackChunk, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PackChunk; - static deserializeBinaryFromReader(message: PackChunk, reader: jspb.BinaryReader): PackChunk; -} - -export namespace PackChunk { - export type AsObject = { - chunk: Uint8Array | string, - } -} - -export class PackRequest extends jspb.Message { - getId(): string; - setId(value: string): PackRequest; - getBody(): Uint8Array | string; - getBody_asU8(): Uint8Array; - getBody_asB64(): string; - setBody(value: Uint8Array | string): PackRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PackRequest.AsObject; - static toObject(includeInstance: boolean, msg: PackRequest): PackRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PackRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PackRequest; - static deserializeBinaryFromReader(message: PackRequest, reader: jspb.BinaryReader): PackRequest; -} - -export namespace PackRequest { - export type AsObject = { - id: string, - body: Uint8Array | string, - } -} - -export class VaultListMessage extends jspb.Message { - getVault(): Uint8Array | string; - getVault_asU8(): Uint8Array; - getVault_asB64(): string; - setVault(value: Uint8Array | string): VaultListMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultListMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultListMessage): VaultListMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultListMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultListMessage; - static deserializeBinaryFromReader(message: VaultListMessage, reader: jspb.BinaryReader): VaultListMessage; -} - -export namespace VaultListMessage { - export type AsObject = { - vault: Uint8Array | string, - } -} - -export class VaultPermMessage extends jspb.Message { - getNodeId(): string; - setNodeId(value: string): VaultPermMessage; - getVaultId(): string; - setVaultId(value: string): VaultPermMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultPermMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultPermMessage): VaultPermMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultPermMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultPermMessage; - static deserializeBinaryFromReader(message: VaultPermMessage, reader: jspb.BinaryReader): VaultPermMessage; -} - -export namespace VaultPermMessage { - export type AsObject = { - nodeId: string, - vaultId: string, - } -} - -export class PermissionMessage extends jspb.Message { - getPermission(): boolean; - setPermission(value: boolean): PermissionMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PermissionMessage.AsObject; - static toObject(includeInstance: boolean, msg: PermissionMessage): PermissionMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PermissionMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PermissionMessage; - static deserializeBinaryFromReader(message: PermissionMessage, reader: jspb.BinaryReader): PermissionMessage; -} - -export namespace PermissionMessage { - export type AsObject = { - permission: boolean, - } -} - -export class NodeIdMessage extends jspb.Message { - getNodeId(): string; - setNodeId(value: string): NodeIdMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeIdMessage.AsObject; - static toObject(includeInstance: boolean, msg: NodeIdMessage): NodeIdMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeIdMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeIdMessage; - static deserializeBinaryFromReader(message: NodeIdMessage, reader: jspb.BinaryReader): NodeIdMessage; -} - -export namespace NodeIdMessage { - export type AsObject = { - nodeId: string, - } -} - -export class ConnectionMessage extends jspb.Message { - getAId(): string; - setAId(value: string): ConnectionMessage; - getBId(): string; - setBId(value: string): ConnectionMessage; - getAIp(): string; - setAIp(value: string): ConnectionMessage; - getBIp(): string; - setBIp(value: string): ConnectionMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConnectionMessage.AsObject; - static toObject(includeInstance: boolean, msg: ConnectionMessage): ConnectionMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConnectionMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConnectionMessage; - static deserializeBinaryFromReader(message: ConnectionMessage, reader: jspb.BinaryReader): ConnectionMessage; -} - -export namespace ConnectionMessage { - export type AsObject = { - aId: string, - bId: string, - aIp: string, - bIp: string, - } -} - -export class RelayMessage extends jspb.Message { - getSrcId(): string; - setSrcId(value: string): RelayMessage; - getTargetId(): string; - setTargetId(value: string): RelayMessage; - getEgressAddress(): string; - setEgressAddress(value: string): RelayMessage; - getSignature(): string; - setSignature(value: string): RelayMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RelayMessage.AsObject; - static toObject(includeInstance: boolean, msg: RelayMessage): RelayMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RelayMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RelayMessage; - static deserializeBinaryFromReader(message: RelayMessage, reader: jspb.BinaryReader): RelayMessage; -} - -export namespace RelayMessage { - export type AsObject = { - srcId: string, - targetId: string, - egressAddress: string, - signature: string, - } -} - -export class NodeAddressMessage extends jspb.Message { - getIp(): string; - setIp(value: string): NodeAddressMessage; - getPort(): number; - setPort(value: number): NodeAddressMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeAddressMessage.AsObject; - static toObject(includeInstance: boolean, msg: NodeAddressMessage): NodeAddressMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeAddressMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeAddressMessage; - static deserializeBinaryFromReader(message: NodeAddressMessage, reader: jspb.BinaryReader): NodeAddressMessage; -} - -export namespace NodeAddressMessage { - export type AsObject = { - ip: string, - port: number, - } -} - -export class NodeTableMessage extends jspb.Message { - - getNodeTableMap(): jspb.Map; - clearNodeTableMap(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeTableMessage.AsObject; - static toObject(includeInstance: boolean, msg: NodeTableMessage): NodeTableMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeTableMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeTableMessage; - static deserializeBinaryFromReader(message: NodeTableMessage, reader: jspb.BinaryReader): NodeTableMessage; -} - -export namespace NodeTableMessage { - export type AsObject = { - - nodeTableMap: Array<[string, NodeAddressMessage.AsObject]>, - } -} - -export class ClaimTypeMessage extends jspb.Message { - getClaimType(): string; - setClaimType(value: string): ClaimTypeMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClaimTypeMessage.AsObject; - static toObject(includeInstance: boolean, msg: ClaimTypeMessage): ClaimTypeMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClaimTypeMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClaimTypeMessage; - static deserializeBinaryFromReader(message: ClaimTypeMessage, reader: jspb.BinaryReader): ClaimTypeMessage; -} - -export namespace ClaimTypeMessage { - export type AsObject = { - claimType: string, - } -} - -export class ClaimsMessage extends jspb.Message { - clearClaimsList(): void; - getClaimsList(): Array; - setClaimsList(value: Array): ClaimsMessage; - addClaims(value?: ClaimMessage, index?: number): ClaimMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClaimsMessage.AsObject; - static toObject(includeInstance: boolean, msg: ClaimsMessage): ClaimsMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClaimsMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClaimsMessage; - static deserializeBinaryFromReader(message: ClaimsMessage, reader: jspb.BinaryReader): ClaimsMessage; -} - -export namespace ClaimsMessage { - export type AsObject = { - claimsList: Array, - } -} - -export class ChainDataMessage extends jspb.Message { - - getChainDataMap(): jspb.Map; - clearChainDataMap(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChainDataMessage.AsObject; - static toObject(includeInstance: boolean, msg: ChainDataMessage): ChainDataMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChainDataMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChainDataMessage; - static deserializeBinaryFromReader(message: ChainDataMessage, reader: jspb.BinaryReader): ChainDataMessage; -} - -export namespace ChainDataMessage { - export type AsObject = { - - chainDataMap: Array<[string, ClaimMessage.AsObject]>, - } -} - -export class ClaimMessage extends jspb.Message { - getPayload(): string; - setPayload(value: string): ClaimMessage; - clearSignaturesList(): void; - getSignaturesList(): Array; - setSignaturesList(value: Array): ClaimMessage; - addSignatures(value?: SignatureMessage, index?: number): SignatureMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClaimMessage.AsObject; - static toObject(includeInstance: boolean, msg: ClaimMessage): ClaimMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClaimMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClaimMessage; - static deserializeBinaryFromReader(message: ClaimMessage, reader: jspb.BinaryReader): ClaimMessage; -} - -export namespace ClaimMessage { - export type AsObject = { - payload: string, - signaturesList: Array, - } -} - -export class SignatureMessage extends jspb.Message { - getSignature(): string; - setSignature(value: string): SignatureMessage; - getProtected(): string; - setProtected(value: string): SignatureMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignatureMessage.AsObject; - static toObject(includeInstance: boolean, msg: SignatureMessage): SignatureMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignatureMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignatureMessage; - static deserializeBinaryFromReader(message: SignatureMessage, reader: jspb.BinaryReader): SignatureMessage; -} - -export namespace SignatureMessage { - export type AsObject = { - signature: string, - pb_protected: string, - } -} - -export class NotificationMessage extends jspb.Message { - getContent(): string; - setContent(value: string): NotificationMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NotificationMessage.AsObject; - static toObject(includeInstance: boolean, msg: NotificationMessage): NotificationMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NotificationMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NotificationMessage; - static deserializeBinaryFromReader(message: NotificationMessage, reader: jspb.BinaryReader): NotificationMessage; -} - -export namespace NotificationMessage { - export type AsObject = { - content: string, - } -} - -export class ClaimIntermediaryMessage extends jspb.Message { - getPayload(): string; - setPayload(value: string): ClaimIntermediaryMessage; - - hasSignature(): boolean; - clearSignature(): void; - getSignature(): SignatureMessage | undefined; - setSignature(value?: SignatureMessage): ClaimIntermediaryMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClaimIntermediaryMessage.AsObject; - static toObject(includeInstance: boolean, msg: ClaimIntermediaryMessage): ClaimIntermediaryMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClaimIntermediaryMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClaimIntermediaryMessage; - static deserializeBinaryFromReader(message: ClaimIntermediaryMessage, reader: jspb.BinaryReader): ClaimIntermediaryMessage; -} - -export namespace ClaimIntermediaryMessage { - export type AsObject = { - payload: string, - signature?: SignatureMessage.AsObject, - } -} - -export class CrossSignMessage extends jspb.Message { - - hasSinglySignedClaim(): boolean; - clearSinglySignedClaim(): void; - getSinglySignedClaim(): ClaimIntermediaryMessage | undefined; - setSinglySignedClaim(value?: ClaimIntermediaryMessage): CrossSignMessage; - - hasDoublySignedClaim(): boolean; - clearDoublySignedClaim(): void; - getDoublySignedClaim(): ClaimMessage | undefined; - setDoublySignedClaim(value?: ClaimMessage): CrossSignMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CrossSignMessage.AsObject; - static toObject(includeInstance: boolean, msg: CrossSignMessage): CrossSignMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CrossSignMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CrossSignMessage; - static deserializeBinaryFromReader(message: CrossSignMessage, reader: jspb.BinaryReader): CrossSignMessage; -} - -export namespace CrossSignMessage { - export type AsObject = { - singlySignedClaim?: ClaimIntermediaryMessage.AsObject, - doublySignedClaim?: ClaimMessage.AsObject, - } -} diff --git a/src/proto/js/Client_grpc_pb.d.ts b/src/proto/js/Client_grpc_pb.d.ts deleted file mode 100644 index 6f1f6240f..000000000 --- a/src/proto/js/Client_grpc_pb.d.ts +++ /dev/null @@ -1,1060 +0,0 @@ -// package: clientInterface -// file: Client.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as Client_pb from "./Client_pb"; - -interface IClientService extends grpc.ServiceDefinition { - echo: IClientService_IEcho; - agentStop: IClientService_IAgentStop; - sessionUnlock: IClientService_ISessionUnlock; - sessionRefresh: IClientService_ISessionRefresh; - sessionLockAll: IClientService_ISessionLockAll; - nodesAdd: IClientService_INodesAdd; - nodesPing: IClientService_INodesPing; - nodesClaim: IClientService_INodesClaim; - nodesFind: IClientService_INodesFind; - keysKeyPairRoot: IClientService_IKeysKeyPairRoot; - keysKeyPairReset: IClientService_IKeysKeyPairReset; - keysKeyPairRenew: IClientService_IKeysKeyPairRenew; - keysEncrypt: IClientService_IKeysEncrypt; - keysDecrypt: IClientService_IKeysDecrypt; - keysSign: IClientService_IKeysSign; - keysVerify: IClientService_IKeysVerify; - keysPasswordChange: IClientService_IKeysPasswordChange; - keysCertsGet: IClientService_IKeysCertsGet; - keysCertsChainGet: IClientService_IKeysCertsChainGet; - vaultsList: IClientService_IVaultsList; - vaultsCreate: IClientService_IVaultsCreate; - vaultsRename: IClientService_IVaultsRename; - vaultsDelete: IClientService_IVaultsDelete; - vaultsPull: IClientService_IVaultsPull; - vaultsClone: IClientService_IVaultsClone; - vaultsScan: IClientService_IVaultsScan; - vaultsSecretsList: IClientService_IVaultsSecretsList; - vaultsSecretsMkdir: IClientService_IVaultsSecretsMkdir; - vaultsSecretsStat: IClientService_IVaultsSecretsStat; - vaultsSecretsDelete: IClientService_IVaultsSecretsDelete; - vaultsSecretsEdit: IClientService_IVaultsSecretsEdit; - vaultsSecretsGet: IClientService_IVaultsSecretsGet; - vaultsSecretsRename: IClientService_IVaultsSecretsRename; - vaultsSecretsNew: IClientService_IVaultsSecretsNew; - vaultsSecretsNewDir: IClientService_IVaultsSecretsNewDir; - vaultsPermissionsSet: IClientService_IVaultsPermissionsSet; - vaultsPermissionsUnset: IClientService_IVaultsPermissionsUnset; - vaultsPermissions: IClientService_IVaultsPermissions; - vaultsVersion: IClientService_IVaultsVersion; - vaultsLog: IClientService_IVaultsLog; - identitiesAuthenticate: IClientService_IIdentitiesAuthenticate; - identitiesTokenPut: IClientService_IIdentitiesTokenPut; - identitiesTokenGet: IClientService_IIdentitiesTokenGet; - identitiesTokenDelete: IClientService_IIdentitiesTokenDelete; - identitiesProvidersList: IClientService_IIdentitiesProvidersList; - identitiesInfoGet: IClientService_IIdentitiesInfoGet; - identitiesInfoGetConnected: IClientService_IIdentitiesInfoGetConnected; - identitiesClaim: IClientService_IIdentitiesClaim; - gestaltsGestaltList: IClientService_IGestaltsGestaltList; - gestaltsGestaltGetByNode: IClientService_IGestaltsGestaltGetByNode; - gestaltsGestaltGetByIdentity: IClientService_IGestaltsGestaltGetByIdentity; - gestaltsDiscoveryByNode: IClientService_IGestaltsDiscoveryByNode; - gestaltsDiscoveryByIdentity: IClientService_IGestaltsDiscoveryByIdentity; - gestaltsActionsGetByNode: IClientService_IGestaltsActionsGetByNode; - gestaltsActionsGetByIdentity: IClientService_IGestaltsActionsGetByIdentity; - gestaltsActionsSetByNode: IClientService_IGestaltsActionsSetByNode; - gestaltsActionsSetByIdentity: IClientService_IGestaltsActionsSetByIdentity; - gestaltsActionsUnsetByNode: IClientService_IGestaltsActionsUnsetByNode; - gestaltsActionsUnsetByIdentity: IClientService_IGestaltsActionsUnsetByIdentity; - notificationsSend: IClientService_INotificationsSend; - notificationsRead: IClientService_INotificationsRead; - notificationsClear: IClientService_INotificationsClear; -} - -interface IClientService_IEcho extends grpc.MethodDefinition { - path: "/clientInterface.Client/Echo"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IAgentStop extends grpc.MethodDefinition { - path: "/clientInterface.Client/AgentStop"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_ISessionUnlock extends grpc.MethodDefinition { - path: "/clientInterface.Client/SessionUnlock"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_ISessionRefresh extends grpc.MethodDefinition { - path: "/clientInterface.Client/SessionRefresh"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_ISessionLockAll extends grpc.MethodDefinition { - path: "/clientInterface.Client/SessionLockAll"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_INodesAdd extends grpc.MethodDefinition { - path: "/clientInterface.Client/NodesAdd"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_INodesPing extends grpc.MethodDefinition { - path: "/clientInterface.Client/NodesPing"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_INodesClaim extends grpc.MethodDefinition { - path: "/clientInterface.Client/NodesClaim"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_INodesFind extends grpc.MethodDefinition { - path: "/clientInterface.Client/NodesFind"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IKeysKeyPairRoot extends grpc.MethodDefinition { - path: "/clientInterface.Client/KeysKeyPairRoot"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IKeysKeyPairReset extends grpc.MethodDefinition { - path: "/clientInterface.Client/KeysKeyPairReset"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IKeysKeyPairRenew extends grpc.MethodDefinition { - path: "/clientInterface.Client/KeysKeyPairRenew"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IKeysEncrypt extends grpc.MethodDefinition { - path: "/clientInterface.Client/KeysEncrypt"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IKeysDecrypt extends grpc.MethodDefinition { - path: "/clientInterface.Client/KeysDecrypt"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IKeysSign extends grpc.MethodDefinition { - path: "/clientInterface.Client/KeysSign"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IKeysVerify extends grpc.MethodDefinition { - path: "/clientInterface.Client/KeysVerify"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IKeysPasswordChange extends grpc.MethodDefinition { - path: "/clientInterface.Client/KeysPasswordChange"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IKeysCertsGet extends grpc.MethodDefinition { - path: "/clientInterface.Client/KeysCertsGet"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IKeysCertsChainGet extends grpc.MethodDefinition { - path: "/clientInterface.Client/KeysCertsChainGet"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsList extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsList"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsCreate extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsCreate"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsRename extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsRename"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsDelete extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsDelete"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsPull extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsPull"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsClone extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsClone"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsScan extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsScan"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsSecretsList extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsSecretsList"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsSecretsMkdir extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsSecretsMkdir"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsSecretsStat extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsSecretsStat"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsSecretsDelete extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsSecretsDelete"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsSecretsEdit extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsSecretsEdit"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsSecretsGet extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsSecretsGet"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsSecretsRename extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsSecretsRename"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsSecretsNew extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsSecretsNew"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsSecretsNewDir extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsSecretsNewDir"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsPermissionsSet extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsPermissionsSet"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsPermissionsUnset extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsPermissionsUnset"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsPermissions extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsPermissions"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsVersion extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsVersion"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IVaultsLog extends grpc.MethodDefinition { - path: "/clientInterface.Client/VaultsLog"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IIdentitiesAuthenticate extends grpc.MethodDefinition { - path: "/clientInterface.Client/IdentitiesAuthenticate"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IIdentitiesTokenPut extends grpc.MethodDefinition { - path: "/clientInterface.Client/IdentitiesTokenPut"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IIdentitiesTokenGet extends grpc.MethodDefinition { - path: "/clientInterface.Client/IdentitiesTokenGet"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IIdentitiesTokenDelete extends grpc.MethodDefinition { - path: "/clientInterface.Client/IdentitiesTokenDelete"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IIdentitiesProvidersList extends grpc.MethodDefinition { - path: "/clientInterface.Client/IdentitiesProvidersList"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IIdentitiesInfoGet extends grpc.MethodDefinition { - path: "/clientInterface.Client/IdentitiesInfoGet"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IIdentitiesInfoGetConnected extends grpc.MethodDefinition { - path: "/clientInterface.Client/IdentitiesInfoGetConnected"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IIdentitiesClaim extends grpc.MethodDefinition { - path: "/clientInterface.Client/IdentitiesClaim"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsGestaltList extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsGestaltList"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsGestaltGetByNode extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsGestaltGetByNode"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsGestaltGetByIdentity extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsGestaltGetByIdentity"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsDiscoveryByNode extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsDiscoveryByNode"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsDiscoveryByIdentity extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsDiscoveryByIdentity"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsActionsGetByNode extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsActionsGetByNode"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsActionsGetByIdentity extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsActionsGetByIdentity"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsActionsSetByNode extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsActionsSetByNode"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsActionsSetByIdentity extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsActionsSetByIdentity"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsActionsUnsetByNode extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsActionsUnsetByNode"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_IGestaltsActionsUnsetByIdentity extends grpc.MethodDefinition { - path: "/clientInterface.Client/GestaltsActionsUnsetByIdentity"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_INotificationsSend extends grpc.MethodDefinition { - path: "/clientInterface.Client/NotificationsSend"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_INotificationsRead extends grpc.MethodDefinition { - path: "/clientInterface.Client/NotificationsRead"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IClientService_INotificationsClear extends grpc.MethodDefinition { - path: "/clientInterface.Client/NotificationsClear"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const ClientService: IClientService; - -export interface IClientServer extends grpc.UntypedServiceImplementation { - echo: grpc.handleUnaryCall; - agentStop: grpc.handleUnaryCall; - sessionUnlock: grpc.handleUnaryCall; - sessionRefresh: grpc.handleUnaryCall; - sessionLockAll: grpc.handleUnaryCall; - nodesAdd: grpc.handleUnaryCall; - nodesPing: grpc.handleUnaryCall; - nodesClaim: grpc.handleUnaryCall; - nodesFind: grpc.handleUnaryCall; - keysKeyPairRoot: grpc.handleUnaryCall; - keysKeyPairReset: grpc.handleUnaryCall; - keysKeyPairRenew: grpc.handleUnaryCall; - keysEncrypt: grpc.handleUnaryCall; - keysDecrypt: grpc.handleUnaryCall; - keysSign: grpc.handleUnaryCall; - keysVerify: grpc.handleUnaryCall; - keysPasswordChange: grpc.handleUnaryCall; - keysCertsGet: grpc.handleUnaryCall; - keysCertsChainGet: grpc.handleServerStreamingCall; - vaultsList: grpc.handleServerStreamingCall; - vaultsCreate: grpc.handleUnaryCall; - vaultsRename: grpc.handleUnaryCall; - vaultsDelete: grpc.handleUnaryCall; - vaultsPull: grpc.handleUnaryCall; - vaultsClone: grpc.handleUnaryCall; - vaultsScan: grpc.handleServerStreamingCall; - vaultsSecretsList: grpc.handleServerStreamingCall; - vaultsSecretsMkdir: grpc.handleUnaryCall; - vaultsSecretsStat: grpc.handleUnaryCall; - vaultsSecretsDelete: grpc.handleUnaryCall; - vaultsSecretsEdit: grpc.handleUnaryCall; - vaultsSecretsGet: grpc.handleUnaryCall; - vaultsSecretsRename: grpc.handleUnaryCall; - vaultsSecretsNew: grpc.handleUnaryCall; - vaultsSecretsNewDir: grpc.handleUnaryCall; - vaultsPermissionsSet: grpc.handleUnaryCall; - vaultsPermissionsUnset: grpc.handleUnaryCall; - vaultsPermissions: grpc.handleServerStreamingCall; - vaultsVersion: grpc.handleUnaryCall; - vaultsLog: grpc.handleServerStreamingCall; - identitiesAuthenticate: grpc.handleServerStreamingCall; - identitiesTokenPut: grpc.handleUnaryCall; - identitiesTokenGet: grpc.handleUnaryCall; - identitiesTokenDelete: grpc.handleUnaryCall; - identitiesProvidersList: grpc.handleUnaryCall; - identitiesInfoGet: grpc.handleUnaryCall; - identitiesInfoGetConnected: grpc.handleServerStreamingCall; - identitiesClaim: grpc.handleUnaryCall; - gestaltsGestaltList: grpc.handleServerStreamingCall; - gestaltsGestaltGetByNode: grpc.handleUnaryCall; - gestaltsGestaltGetByIdentity: grpc.handleUnaryCall; - gestaltsDiscoveryByNode: grpc.handleUnaryCall; - gestaltsDiscoveryByIdentity: grpc.handleUnaryCall; - gestaltsActionsGetByNode: grpc.handleUnaryCall; - gestaltsActionsGetByIdentity: grpc.handleUnaryCall; - gestaltsActionsSetByNode: grpc.handleUnaryCall; - gestaltsActionsSetByIdentity: grpc.handleUnaryCall; - gestaltsActionsUnsetByNode: grpc.handleUnaryCall; - gestaltsActionsUnsetByIdentity: grpc.handleUnaryCall; - notificationsSend: grpc.handleUnaryCall; - notificationsRead: grpc.handleUnaryCall; - notificationsClear: grpc.handleUnaryCall; -} - -export interface IClientClient { - echo(request: Client_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EchoMessage) => void): grpc.ClientUnaryCall; - echo(request: Client_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EchoMessage) => void): grpc.ClientUnaryCall; - echo(request: Client_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EchoMessage) => void): grpc.ClientUnaryCall; - agentStop(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - agentStop(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - agentStop(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - sessionUnlock(request: Client_pb.PasswordMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - sessionUnlock(request: Client_pb.PasswordMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - sessionUnlock(request: Client_pb.PasswordMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - sessionRefresh(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - sessionRefresh(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - sessionRefresh(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - sessionLockAll(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - sessionLockAll(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - sessionLockAll(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - nodesAdd(request: Client_pb.NodeAddressMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - nodesAdd(request: Client_pb.NodeAddressMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - nodesAdd(request: Client_pb.NodeAddressMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - nodesPing(request: Client_pb.NodeMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - nodesPing(request: Client_pb.NodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - nodesPing(request: Client_pb.NodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - nodesClaim(request: Client_pb.NodeClaimMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - nodesClaim(request: Client_pb.NodeClaimMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - nodesClaim(request: Client_pb.NodeClaimMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - nodesFind(request: Client_pb.NodeMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.NodeAddressMessage) => void): grpc.ClientUnaryCall; - nodesFind(request: Client_pb.NodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.NodeAddressMessage) => void): grpc.ClientUnaryCall; - nodesFind(request: Client_pb.NodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.NodeAddressMessage) => void): grpc.ClientUnaryCall; - keysKeyPairRoot(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; - keysKeyPairRoot(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; - keysKeyPairRoot(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; - keysKeyPairReset(request: Client_pb.KeyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - keysKeyPairReset(request: Client_pb.KeyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - keysKeyPairReset(request: Client_pb.KeyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - keysKeyPairRenew(request: Client_pb.KeyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - keysKeyPairRenew(request: Client_pb.KeyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - keysKeyPairRenew(request: Client_pb.KeyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - keysEncrypt(request: Client_pb.CryptoMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - keysEncrypt(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - keysEncrypt(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - keysDecrypt(request: Client_pb.CryptoMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - keysDecrypt(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - keysDecrypt(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - keysSign(request: Client_pb.CryptoMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - keysSign(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - keysSign(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - keysVerify(request: Client_pb.CryptoMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - keysVerify(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - keysVerify(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - keysPasswordChange(request: Client_pb.PasswordMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - keysPasswordChange(request: Client_pb.PasswordMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - keysPasswordChange(request: Client_pb.PasswordMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - keysCertsGet(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.CertificateMessage) => void): grpc.ClientUnaryCall; - keysCertsGet(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.CertificateMessage) => void): grpc.ClientUnaryCall; - keysCertsGet(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.CertificateMessage) => void): grpc.ClientUnaryCall; - keysCertsChainGet(request: Client_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; - keysCertsChainGet(request: Client_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - vaultsList(request: Client_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; - vaultsList(request: Client_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - vaultsCreate(request: Client_pb.VaultMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - vaultsCreate(request: Client_pb.VaultMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - vaultsCreate(request: Client_pb.VaultMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - vaultsRename(request: Client_pb.VaultRenameMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - vaultsRename(request: Client_pb.VaultRenameMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - vaultsRename(request: Client_pb.VaultRenameMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - vaultsDelete(request: Client_pb.VaultMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsDelete(request: Client_pb.VaultMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsDelete(request: Client_pb.VaultMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsPull(request: Client_pb.VaultPullMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsPull(request: Client_pb.VaultPullMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsPull(request: Client_pb.VaultPullMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsClone(request: Client_pb.VaultCloneMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsClone(request: Client_pb.VaultCloneMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsClone(request: Client_pb.VaultCloneMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsScan(request: Client_pb.NodeMessage, options?: Partial): grpc.ClientReadableStream; - vaultsScan(request: Client_pb.NodeMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - vaultsSecretsList(request: Client_pb.VaultMessage, options?: Partial): grpc.ClientReadableStream; - vaultsSecretsList(request: Client_pb.VaultMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - vaultsSecretsMkdir(request: Client_pb.VaultMkdirMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsMkdir(request: Client_pb.VaultMkdirMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsMkdir(request: Client_pb.VaultMkdirMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsStat(request: Client_pb.VaultMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsStat(request: Client_pb.VaultMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsStat(request: Client_pb.VaultMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsDelete(request: Client_pb.SecretMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsDelete(request: Client_pb.SecretMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsDelete(request: Client_pb.SecretMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsEdit(request: Client_pb.SecretMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsEdit(request: Client_pb.SecretMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsEdit(request: Client_pb.SecretMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsGet(request: Client_pb.SecretMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.SecretMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsGet(request: Client_pb.SecretMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.SecretMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsGet(request: Client_pb.SecretMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.SecretMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsRename(request: Client_pb.SecretRenameMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsRename(request: Client_pb.SecretRenameMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsRename(request: Client_pb.SecretRenameMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsNew(request: Client_pb.SecretMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsNew(request: Client_pb.SecretMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsNew(request: Client_pb.SecretMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsNewDir(request: Client_pb.SecretDirectoryMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsNewDir(request: Client_pb.SecretDirectoryMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsSecretsNewDir(request: Client_pb.SecretDirectoryMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsPermissionsSet(request: Client_pb.SetVaultPermMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsPermissionsSet(request: Client_pb.SetVaultPermMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsPermissionsSet(request: Client_pb.SetVaultPermMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsPermissionsUnset(request: Client_pb.UnsetVaultPermMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsPermissionsUnset(request: Client_pb.UnsetVaultPermMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsPermissionsUnset(request: Client_pb.UnsetVaultPermMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - vaultsPermissions(request: Client_pb.GetVaultPermMessage, options?: Partial): grpc.ClientReadableStream; - vaultsPermissions(request: Client_pb.GetVaultPermMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - vaultsVersion(request: Client_pb.VaultsVersionMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultsVersionResultMessage) => void): grpc.ClientUnaryCall; - vaultsVersion(request: Client_pb.VaultsVersionMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultsVersionResultMessage) => void): grpc.ClientUnaryCall; - vaultsVersion(request: Client_pb.VaultsVersionMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultsVersionResultMessage) => void): grpc.ClientUnaryCall; - vaultsLog(request: Client_pb.VaultsLogMessage, options?: Partial): grpc.ClientReadableStream; - vaultsLog(request: Client_pb.VaultsLogMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - identitiesAuthenticate(request: Client_pb.ProviderMessage, options?: Partial): grpc.ClientReadableStream; - identitiesAuthenticate(request: Client_pb.ProviderMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - identitiesTokenPut(request: Client_pb.TokenSpecificMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - identitiesTokenPut(request: Client_pb.TokenSpecificMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - identitiesTokenPut(request: Client_pb.TokenSpecificMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - identitiesTokenGet(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.TokenMessage) => void): grpc.ClientUnaryCall; - identitiesTokenGet(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.TokenMessage) => void): grpc.ClientUnaryCall; - identitiesTokenGet(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.TokenMessage) => void): grpc.ClientUnaryCall; - identitiesTokenDelete(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - identitiesTokenDelete(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - identitiesTokenDelete(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - identitiesProvidersList(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - identitiesProvidersList(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - identitiesProvidersList(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - identitiesInfoGet(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - identitiesInfoGet(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - identitiesInfoGet(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - identitiesInfoGetConnected(request: Client_pb.ProviderSearchMessage, options?: Partial): grpc.ClientReadableStream; - identitiesInfoGetConnected(request: Client_pb.ProviderSearchMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - identitiesClaim(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - identitiesClaim(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - identitiesClaim(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsGestaltList(request: Client_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; - gestaltsGestaltList(request: Client_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - gestaltsGestaltGetByNode(request: Client_pb.NodeMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - gestaltsGestaltGetByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - gestaltsGestaltGetByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - gestaltsGestaltGetByIdentity(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - gestaltsGestaltGetByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - gestaltsGestaltGetByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - gestaltsDiscoveryByNode(request: Client_pb.NodeMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsDiscoveryByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsDiscoveryByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsDiscoveryByIdentity(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsDiscoveryByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsDiscoveryByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsGetByNode(request: Client_pb.NodeMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsGetByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsGetByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsGetByIdentity(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsGetByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsGetByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsSetByNode(request: Client_pb.SetActionsMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsSetByNode(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsSetByNode(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsSetByIdentity(request: Client_pb.SetActionsMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsSetByIdentity(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsSetByIdentity(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsUnsetByNode(request: Client_pb.SetActionsMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsUnsetByNode(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsUnsetByNode(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsUnsetByIdentity(request: Client_pb.SetActionsMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsUnsetByIdentity(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - gestaltsActionsUnsetByIdentity(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - notificationsSend(request: Client_pb.NotificationsSendMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - notificationsSend(request: Client_pb.NotificationsSendMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - notificationsSend(request: Client_pb.NotificationsSendMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - notificationsRead(request: Client_pb.NotificationsReadMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.NotificationsListMessage) => void): grpc.ClientUnaryCall; - notificationsRead(request: Client_pb.NotificationsReadMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.NotificationsListMessage) => void): grpc.ClientUnaryCall; - notificationsRead(request: Client_pb.NotificationsReadMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.NotificationsListMessage) => void): grpc.ClientUnaryCall; - notificationsClear(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - notificationsClear(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - notificationsClear(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; -} - -export class ClientClient extends grpc.Client implements IClientClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public echo(request: Client_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EchoMessage) => void): grpc.ClientUnaryCall; - public echo(request: Client_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EchoMessage) => void): grpc.ClientUnaryCall; - public echo(request: Client_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EchoMessage) => void): grpc.ClientUnaryCall; - public agentStop(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public agentStop(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public agentStop(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public sessionUnlock(request: Client_pb.PasswordMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - public sessionUnlock(request: Client_pb.PasswordMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - public sessionUnlock(request: Client_pb.PasswordMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - public sessionRefresh(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - public sessionRefresh(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - public sessionRefresh(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.SessionTokenMessage) => void): grpc.ClientUnaryCall; - public sessionLockAll(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public sessionLockAll(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public sessionLockAll(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public nodesAdd(request: Client_pb.NodeAddressMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public nodesAdd(request: Client_pb.NodeAddressMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public nodesAdd(request: Client_pb.NodeAddressMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public nodesPing(request: Client_pb.NodeMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public nodesPing(request: Client_pb.NodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public nodesPing(request: Client_pb.NodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public nodesClaim(request: Client_pb.NodeClaimMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public nodesClaim(request: Client_pb.NodeClaimMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public nodesClaim(request: Client_pb.NodeClaimMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public nodesFind(request: Client_pb.NodeMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.NodeAddressMessage) => void): grpc.ClientUnaryCall; - public nodesFind(request: Client_pb.NodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.NodeAddressMessage) => void): grpc.ClientUnaryCall; - public nodesFind(request: Client_pb.NodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.NodeAddressMessage) => void): grpc.ClientUnaryCall; - public keysKeyPairRoot(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; - public keysKeyPairRoot(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; - public keysKeyPairRoot(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; - public keysKeyPairReset(request: Client_pb.KeyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public keysKeyPairReset(request: Client_pb.KeyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public keysKeyPairReset(request: Client_pb.KeyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public keysKeyPairRenew(request: Client_pb.KeyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public keysKeyPairRenew(request: Client_pb.KeyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public keysKeyPairRenew(request: Client_pb.KeyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public keysEncrypt(request: Client_pb.CryptoMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - public keysEncrypt(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - public keysEncrypt(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - public keysDecrypt(request: Client_pb.CryptoMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - public keysDecrypt(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - public keysDecrypt(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - public keysSign(request: Client_pb.CryptoMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - public keysSign(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - public keysSign(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.CryptoMessage) => void): grpc.ClientUnaryCall; - public keysVerify(request: Client_pb.CryptoMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public keysVerify(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public keysVerify(request: Client_pb.CryptoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public keysPasswordChange(request: Client_pb.PasswordMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public keysPasswordChange(request: Client_pb.PasswordMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public keysPasswordChange(request: Client_pb.PasswordMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public keysCertsGet(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.CertificateMessage) => void): grpc.ClientUnaryCall; - public keysCertsGet(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.CertificateMessage) => void): grpc.ClientUnaryCall; - public keysCertsGet(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.CertificateMessage) => void): grpc.ClientUnaryCall; - public keysCertsChainGet(request: Client_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; - public keysCertsChainGet(request: Client_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public vaultsList(request: Client_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; - public vaultsList(request: Client_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public vaultsCreate(request: Client_pb.VaultMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - public vaultsCreate(request: Client_pb.VaultMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - public vaultsCreate(request: Client_pb.VaultMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - public vaultsRename(request: Client_pb.VaultRenameMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - public vaultsRename(request: Client_pb.VaultRenameMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - public vaultsRename(request: Client_pb.VaultRenameMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultMessage) => void): grpc.ClientUnaryCall; - public vaultsDelete(request: Client_pb.VaultMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsDelete(request: Client_pb.VaultMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsDelete(request: Client_pb.VaultMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsPull(request: Client_pb.VaultPullMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsPull(request: Client_pb.VaultPullMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsPull(request: Client_pb.VaultPullMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsClone(request: Client_pb.VaultCloneMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsClone(request: Client_pb.VaultCloneMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsClone(request: Client_pb.VaultCloneMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsScan(request: Client_pb.NodeMessage, options?: Partial): grpc.ClientReadableStream; - public vaultsScan(request: Client_pb.NodeMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public vaultsSecretsList(request: Client_pb.VaultMessage, options?: Partial): grpc.ClientReadableStream; - public vaultsSecretsList(request: Client_pb.VaultMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public vaultsSecretsMkdir(request: Client_pb.VaultMkdirMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsMkdir(request: Client_pb.VaultMkdirMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsMkdir(request: Client_pb.VaultMkdirMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsStat(request: Client_pb.VaultMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsStat(request: Client_pb.VaultMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsStat(request: Client_pb.VaultMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsDelete(request: Client_pb.SecretMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsDelete(request: Client_pb.SecretMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsDelete(request: Client_pb.SecretMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsEdit(request: Client_pb.SecretMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsEdit(request: Client_pb.SecretMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsEdit(request: Client_pb.SecretMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsGet(request: Client_pb.SecretMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.SecretMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsGet(request: Client_pb.SecretMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.SecretMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsGet(request: Client_pb.SecretMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.SecretMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsRename(request: Client_pb.SecretRenameMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsRename(request: Client_pb.SecretRenameMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsRename(request: Client_pb.SecretRenameMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsNew(request: Client_pb.SecretMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsNew(request: Client_pb.SecretMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsNew(request: Client_pb.SecretMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsNewDir(request: Client_pb.SecretDirectoryMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsNewDir(request: Client_pb.SecretDirectoryMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsSecretsNewDir(request: Client_pb.SecretDirectoryMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsPermissionsSet(request: Client_pb.SetVaultPermMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsPermissionsSet(request: Client_pb.SetVaultPermMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsPermissionsSet(request: Client_pb.SetVaultPermMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsPermissionsUnset(request: Client_pb.UnsetVaultPermMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsPermissionsUnset(request: Client_pb.UnsetVaultPermMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsPermissionsUnset(request: Client_pb.UnsetVaultPermMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.StatusMessage) => void): grpc.ClientUnaryCall; - public vaultsPermissions(request: Client_pb.GetVaultPermMessage, options?: Partial): grpc.ClientReadableStream; - public vaultsPermissions(request: Client_pb.GetVaultPermMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public vaultsVersion(request: Client_pb.VaultsVersionMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultsVersionResultMessage) => void): grpc.ClientUnaryCall; - public vaultsVersion(request: Client_pb.VaultsVersionMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultsVersionResultMessage) => void): grpc.ClientUnaryCall; - public vaultsVersion(request: Client_pb.VaultsVersionMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.VaultsVersionResultMessage) => void): grpc.ClientUnaryCall; - public vaultsLog(request: Client_pb.VaultsLogMessage, options?: Partial): grpc.ClientReadableStream; - public vaultsLog(request: Client_pb.VaultsLogMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public identitiesAuthenticate(request: Client_pb.ProviderMessage, options?: Partial): grpc.ClientReadableStream; - public identitiesAuthenticate(request: Client_pb.ProviderMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public identitiesTokenPut(request: Client_pb.TokenSpecificMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public identitiesTokenPut(request: Client_pb.TokenSpecificMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public identitiesTokenPut(request: Client_pb.TokenSpecificMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public identitiesTokenGet(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.TokenMessage) => void): grpc.ClientUnaryCall; - public identitiesTokenGet(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.TokenMessage) => void): grpc.ClientUnaryCall; - public identitiesTokenGet(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.TokenMessage) => void): grpc.ClientUnaryCall; - public identitiesTokenDelete(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public identitiesTokenDelete(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public identitiesTokenDelete(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public identitiesProvidersList(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - public identitiesProvidersList(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - public identitiesProvidersList(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - public identitiesInfoGet(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - public identitiesInfoGet(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - public identitiesInfoGet(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.ProviderMessage) => void): grpc.ClientUnaryCall; - public identitiesInfoGetConnected(request: Client_pb.ProviderSearchMessage, options?: Partial): grpc.ClientReadableStream; - public identitiesInfoGetConnected(request: Client_pb.ProviderSearchMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public identitiesClaim(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public identitiesClaim(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public identitiesClaim(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsGestaltList(request: Client_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; - public gestaltsGestaltList(request: Client_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public gestaltsGestaltGetByNode(request: Client_pb.NodeMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - public gestaltsGestaltGetByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - public gestaltsGestaltGetByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - public gestaltsGestaltGetByIdentity(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - public gestaltsGestaltGetByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - public gestaltsGestaltGetByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.GestaltGraphMessage) => void): grpc.ClientUnaryCall; - public gestaltsDiscoveryByNode(request: Client_pb.NodeMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsDiscoveryByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsDiscoveryByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsDiscoveryByIdentity(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsDiscoveryByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsDiscoveryByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsGetByNode(request: Client_pb.NodeMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsGetByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsGetByNode(request: Client_pb.NodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsGetByIdentity(request: Client_pb.ProviderMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsGetByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsGetByIdentity(request: Client_pb.ProviderMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.ActionsMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsSetByNode(request: Client_pb.SetActionsMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsSetByNode(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsSetByNode(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsSetByIdentity(request: Client_pb.SetActionsMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsSetByIdentity(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsSetByIdentity(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsUnsetByNode(request: Client_pb.SetActionsMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsUnsetByNode(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsUnsetByNode(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsUnsetByIdentity(request: Client_pb.SetActionsMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsUnsetByIdentity(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public gestaltsActionsUnsetByIdentity(request: Client_pb.SetActionsMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public notificationsSend(request: Client_pb.NotificationsSendMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public notificationsSend(request: Client_pb.NotificationsSendMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public notificationsSend(request: Client_pb.NotificationsSendMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public notificationsRead(request: Client_pb.NotificationsReadMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.NotificationsListMessage) => void): grpc.ClientUnaryCall; - public notificationsRead(request: Client_pb.NotificationsReadMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.NotificationsListMessage) => void): grpc.ClientUnaryCall; - public notificationsRead(request: Client_pb.NotificationsReadMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.NotificationsListMessage) => void): grpc.ClientUnaryCall; - public notificationsClear(request: Client_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public notificationsClear(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; - public notificationsClear(request: Client_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Client_pb.EmptyMessage) => void): grpc.ClientUnaryCall; -} diff --git a/src/proto/js/Client_grpc_pb.js b/src/proto/js/Client_grpc_pb.js deleted file mode 100644 index d39a48447..000000000 --- a/src/proto/js/Client_grpc_pb.js +++ /dev/null @@ -1,1163 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var Client_pb = require('./Client_pb.js'); - -function serialize_clientInterface_ActionsMessage(arg) { - if (!(arg instanceof Client_pb.ActionsMessage)) { - throw new Error('Expected argument of type clientInterface.ActionsMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_ActionsMessage(buffer_arg) { - return Client_pb.ActionsMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_CertificateMessage(arg) { - if (!(arg instanceof Client_pb.CertificateMessage)) { - throw new Error('Expected argument of type clientInterface.CertificateMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_CertificateMessage(buffer_arg) { - return Client_pb.CertificateMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_CryptoMessage(arg) { - if (!(arg instanceof Client_pb.CryptoMessage)) { - throw new Error('Expected argument of type clientInterface.CryptoMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_CryptoMessage(buffer_arg) { - return Client_pb.CryptoMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_EchoMessage(arg) { - if (!(arg instanceof Client_pb.EchoMessage)) { - throw new Error('Expected argument of type clientInterface.EchoMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_EchoMessage(buffer_arg) { - return Client_pb.EchoMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_EmptyMessage(arg) { - if (!(arg instanceof Client_pb.EmptyMessage)) { - throw new Error('Expected argument of type clientInterface.EmptyMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_EmptyMessage(buffer_arg) { - return Client_pb.EmptyMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_GestaltGraphMessage(arg) { - if (!(arg instanceof Client_pb.GestaltGraphMessage)) { - throw new Error('Expected argument of type clientInterface.GestaltGraphMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_GestaltGraphMessage(buffer_arg) { - return Client_pb.GestaltGraphMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_GestaltMessage(arg) { - if (!(arg instanceof Client_pb.GestaltMessage)) { - throw new Error('Expected argument of type clientInterface.GestaltMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_GestaltMessage(buffer_arg) { - return Client_pb.GestaltMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_GetVaultPermMessage(arg) { - if (!(arg instanceof Client_pb.GetVaultPermMessage)) { - throw new Error('Expected argument of type clientInterface.GetVaultPermMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_GetVaultPermMessage(buffer_arg) { - return Client_pb.GetVaultPermMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_IdentityInfoMessage(arg) { - if (!(arg instanceof Client_pb.IdentityInfoMessage)) { - throw new Error('Expected argument of type clientInterface.IdentityInfoMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_IdentityInfoMessage(buffer_arg) { - return Client_pb.IdentityInfoMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_KeyMessage(arg) { - if (!(arg instanceof Client_pb.KeyMessage)) { - throw new Error('Expected argument of type clientInterface.KeyMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_KeyMessage(buffer_arg) { - return Client_pb.KeyMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_KeyPairMessage(arg) { - if (!(arg instanceof Client_pb.KeyPairMessage)) { - throw new Error('Expected argument of type clientInterface.KeyPairMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_KeyPairMessage(buffer_arg) { - return Client_pb.KeyPairMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_NodeAddressMessage(arg) { - if (!(arg instanceof Client_pb.NodeAddressMessage)) { - throw new Error('Expected argument of type clientInterface.NodeAddressMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_NodeAddressMessage(buffer_arg) { - return Client_pb.NodeAddressMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_NodeClaimMessage(arg) { - if (!(arg instanceof Client_pb.NodeClaimMessage)) { - throw new Error('Expected argument of type clientInterface.NodeClaimMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_NodeClaimMessage(buffer_arg) { - return Client_pb.NodeClaimMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_NodeMessage(arg) { - if (!(arg instanceof Client_pb.NodeMessage)) { - throw new Error('Expected argument of type clientInterface.NodeMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_NodeMessage(buffer_arg) { - return Client_pb.NodeMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_NotificationsListMessage(arg) { - if (!(arg instanceof Client_pb.NotificationsListMessage)) { - throw new Error('Expected argument of type clientInterface.NotificationsListMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_NotificationsListMessage(buffer_arg) { - return Client_pb.NotificationsListMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_NotificationsReadMessage(arg) { - if (!(arg instanceof Client_pb.NotificationsReadMessage)) { - throw new Error('Expected argument of type clientInterface.NotificationsReadMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_NotificationsReadMessage(buffer_arg) { - return Client_pb.NotificationsReadMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_NotificationsSendMessage(arg) { - if (!(arg instanceof Client_pb.NotificationsSendMessage)) { - throw new Error('Expected argument of type clientInterface.NotificationsSendMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_NotificationsSendMessage(buffer_arg) { - return Client_pb.NotificationsSendMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_PasswordMessage(arg) { - if (!(arg instanceof Client_pb.PasswordMessage)) { - throw new Error('Expected argument of type clientInterface.PasswordMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_PasswordMessage(buffer_arg) { - return Client_pb.PasswordMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_PermissionMessage(arg) { - if (!(arg instanceof Client_pb.PermissionMessage)) { - throw new Error('Expected argument of type clientInterface.PermissionMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_PermissionMessage(buffer_arg) { - return Client_pb.PermissionMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_ProviderMessage(arg) { - if (!(arg instanceof Client_pb.ProviderMessage)) { - throw new Error('Expected argument of type clientInterface.ProviderMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_ProviderMessage(buffer_arg) { - return Client_pb.ProviderMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_ProviderSearchMessage(arg) { - if (!(arg instanceof Client_pb.ProviderSearchMessage)) { - throw new Error('Expected argument of type clientInterface.ProviderSearchMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_ProviderSearchMessage(buffer_arg) { - return Client_pb.ProviderSearchMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_SecretDirectoryMessage(arg) { - if (!(arg instanceof Client_pb.SecretDirectoryMessage)) { - throw new Error('Expected argument of type clientInterface.SecretDirectoryMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_SecretDirectoryMessage(buffer_arg) { - return Client_pb.SecretDirectoryMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_SecretMessage(arg) { - if (!(arg instanceof Client_pb.SecretMessage)) { - throw new Error('Expected argument of type clientInterface.SecretMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_SecretMessage(buffer_arg) { - return Client_pb.SecretMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_SecretRenameMessage(arg) { - if (!(arg instanceof Client_pb.SecretRenameMessage)) { - throw new Error('Expected argument of type clientInterface.SecretRenameMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_SecretRenameMessage(buffer_arg) { - return Client_pb.SecretRenameMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_SessionTokenMessage(arg) { - if (!(arg instanceof Client_pb.SessionTokenMessage)) { - throw new Error('Expected argument of type clientInterface.SessionTokenMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_SessionTokenMessage(buffer_arg) { - return Client_pb.SessionTokenMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_SetActionsMessage(arg) { - if (!(arg instanceof Client_pb.SetActionsMessage)) { - throw new Error('Expected argument of type clientInterface.SetActionsMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_SetActionsMessage(buffer_arg) { - return Client_pb.SetActionsMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_SetVaultPermMessage(arg) { - if (!(arg instanceof Client_pb.SetVaultPermMessage)) { - throw new Error('Expected argument of type clientInterface.SetVaultPermMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_SetVaultPermMessage(buffer_arg) { - return Client_pb.SetVaultPermMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_StatMessage(arg) { - if (!(arg instanceof Client_pb.StatMessage)) { - throw new Error('Expected argument of type clientInterface.StatMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_StatMessage(buffer_arg) { - return Client_pb.StatMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_StatusMessage(arg) { - if (!(arg instanceof Client_pb.StatusMessage)) { - throw new Error('Expected argument of type clientInterface.StatusMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_StatusMessage(buffer_arg) { - return Client_pb.StatusMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_TokenMessage(arg) { - if (!(arg instanceof Client_pb.TokenMessage)) { - throw new Error('Expected argument of type clientInterface.TokenMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_TokenMessage(buffer_arg) { - return Client_pb.TokenMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_TokenSpecificMessage(arg) { - if (!(arg instanceof Client_pb.TokenSpecificMessage)) { - throw new Error('Expected argument of type clientInterface.TokenSpecificMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_TokenSpecificMessage(buffer_arg) { - return Client_pb.TokenSpecificMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_UnsetVaultPermMessage(arg) { - if (!(arg instanceof Client_pb.UnsetVaultPermMessage)) { - throw new Error('Expected argument of type clientInterface.UnsetVaultPermMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_UnsetVaultPermMessage(buffer_arg) { - return Client_pb.UnsetVaultPermMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_VaultCloneMessage(arg) { - if (!(arg instanceof Client_pb.VaultCloneMessage)) { - throw new Error('Expected argument of type clientInterface.VaultCloneMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_VaultCloneMessage(buffer_arg) { - return Client_pb.VaultCloneMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_VaultListMessage(arg) { - if (!(arg instanceof Client_pb.VaultListMessage)) { - throw new Error('Expected argument of type clientInterface.VaultListMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_VaultListMessage(buffer_arg) { - return Client_pb.VaultListMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_VaultMessage(arg) { - if (!(arg instanceof Client_pb.VaultMessage)) { - throw new Error('Expected argument of type clientInterface.VaultMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_VaultMessage(buffer_arg) { - return Client_pb.VaultMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_VaultMkdirMessage(arg) { - if (!(arg instanceof Client_pb.VaultMkdirMessage)) { - throw new Error('Expected argument of type clientInterface.VaultMkdirMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_VaultMkdirMessage(buffer_arg) { - return Client_pb.VaultMkdirMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_VaultPullMessage(arg) { - if (!(arg instanceof Client_pb.VaultPullMessage)) { - throw new Error('Expected argument of type clientInterface.VaultPullMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_VaultPullMessage(buffer_arg) { - return Client_pb.VaultPullMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_VaultRenameMessage(arg) { - if (!(arg instanceof Client_pb.VaultRenameMessage)) { - throw new Error('Expected argument of type clientInterface.VaultRenameMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_VaultRenameMessage(buffer_arg) { - return Client_pb.VaultRenameMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_VaultsLogEntryMessage(arg) { - if (!(arg instanceof Client_pb.VaultsLogEntryMessage)) { - throw new Error('Expected argument of type clientInterface.VaultsLogEntryMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_VaultsLogEntryMessage(buffer_arg) { - return Client_pb.VaultsLogEntryMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_VaultsLogMessage(arg) { - if (!(arg instanceof Client_pb.VaultsLogMessage)) { - throw new Error('Expected argument of type clientInterface.VaultsLogMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_VaultsLogMessage(buffer_arg) { - return Client_pb.VaultsLogMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_VaultsVersionMessage(arg) { - if (!(arg instanceof Client_pb.VaultsVersionMessage)) { - throw new Error('Expected argument of type clientInterface.VaultsVersionMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_VaultsVersionMessage(buffer_arg) { - return Client_pb.VaultsVersionMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_clientInterface_VaultsVersionResultMessage(arg) { - if (!(arg instanceof Client_pb.VaultsVersionResultMessage)) { - throw new Error('Expected argument of type clientInterface.VaultsVersionResultMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_clientInterface_VaultsVersionResultMessage(buffer_arg) { - return Client_pb.VaultsVersionResultMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -var ClientService = exports.ClientService = { - echo: { - path: '/clientInterface.Client/Echo', - requestStream: false, - responseStream: false, - requestType: Client_pb.EchoMessage, - responseType: Client_pb.EchoMessage, - requestSerialize: serialize_clientInterface_EchoMessage, - requestDeserialize: deserialize_clientInterface_EchoMessage, - responseSerialize: serialize_clientInterface_EchoMessage, - responseDeserialize: deserialize_clientInterface_EchoMessage, - }, - // Agent -agentStop: { - path: '/clientInterface.Client/AgentStop', - requestStream: false, - responseStream: false, - requestType: Client_pb.EmptyMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_EmptyMessage, - requestDeserialize: deserialize_clientInterface_EmptyMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - // Session -sessionUnlock: { - path: '/clientInterface.Client/SessionUnlock', - requestStream: false, - responseStream: false, - requestType: Client_pb.PasswordMessage, - responseType: Client_pb.SessionTokenMessage, - requestSerialize: serialize_clientInterface_PasswordMessage, - requestDeserialize: deserialize_clientInterface_PasswordMessage, - responseSerialize: serialize_clientInterface_SessionTokenMessage, - responseDeserialize: deserialize_clientInterface_SessionTokenMessage, - }, - sessionRefresh: { - path: '/clientInterface.Client/SessionRefresh', - requestStream: false, - responseStream: false, - requestType: Client_pb.EmptyMessage, - responseType: Client_pb.SessionTokenMessage, - requestSerialize: serialize_clientInterface_EmptyMessage, - requestDeserialize: deserialize_clientInterface_EmptyMessage, - responseSerialize: serialize_clientInterface_SessionTokenMessage, - responseDeserialize: deserialize_clientInterface_SessionTokenMessage, - }, - sessionLockAll: { - path: '/clientInterface.Client/SessionLockAll', - requestStream: false, - responseStream: false, - requestType: Client_pb.EmptyMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_EmptyMessage, - requestDeserialize: deserialize_clientInterface_EmptyMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - // Nodes -nodesAdd: { - path: '/clientInterface.Client/NodesAdd', - requestStream: false, - responseStream: false, - requestType: Client_pb.NodeAddressMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_NodeAddressMessage, - requestDeserialize: deserialize_clientInterface_NodeAddressMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - nodesPing: { - path: '/clientInterface.Client/NodesPing', - requestStream: false, - responseStream: false, - requestType: Client_pb.NodeMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_NodeMessage, - requestDeserialize: deserialize_clientInterface_NodeMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - nodesClaim: { - path: '/clientInterface.Client/NodesClaim', - requestStream: false, - responseStream: false, - requestType: Client_pb.NodeClaimMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_NodeClaimMessage, - requestDeserialize: deserialize_clientInterface_NodeClaimMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - nodesFind: { - path: '/clientInterface.Client/NodesFind', - requestStream: false, - responseStream: false, - requestType: Client_pb.NodeMessage, - responseType: Client_pb.NodeAddressMessage, - requestSerialize: serialize_clientInterface_NodeMessage, - requestDeserialize: deserialize_clientInterface_NodeMessage, - responseSerialize: serialize_clientInterface_NodeAddressMessage, - responseDeserialize: deserialize_clientInterface_NodeAddressMessage, - }, - // Keys -keysKeyPairRoot: { - path: '/clientInterface.Client/KeysKeyPairRoot', - requestStream: false, - responseStream: false, - requestType: Client_pb.EmptyMessage, - responseType: Client_pb.KeyPairMessage, - requestSerialize: serialize_clientInterface_EmptyMessage, - requestDeserialize: deserialize_clientInterface_EmptyMessage, - responseSerialize: serialize_clientInterface_KeyPairMessage, - responseDeserialize: deserialize_clientInterface_KeyPairMessage, - }, - keysKeyPairReset: { - path: '/clientInterface.Client/KeysKeyPairReset', - requestStream: false, - responseStream: false, - requestType: Client_pb.KeyMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_KeyMessage, - requestDeserialize: deserialize_clientInterface_KeyMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - keysKeyPairRenew: { - path: '/clientInterface.Client/KeysKeyPairRenew', - requestStream: false, - responseStream: false, - requestType: Client_pb.KeyMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_KeyMessage, - requestDeserialize: deserialize_clientInterface_KeyMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - keysEncrypt: { - path: '/clientInterface.Client/KeysEncrypt', - requestStream: false, - responseStream: false, - requestType: Client_pb.CryptoMessage, - responseType: Client_pb.CryptoMessage, - requestSerialize: serialize_clientInterface_CryptoMessage, - requestDeserialize: deserialize_clientInterface_CryptoMessage, - responseSerialize: serialize_clientInterface_CryptoMessage, - responseDeserialize: deserialize_clientInterface_CryptoMessage, - }, - keysDecrypt: { - path: '/clientInterface.Client/KeysDecrypt', - requestStream: false, - responseStream: false, - requestType: Client_pb.CryptoMessage, - responseType: Client_pb.CryptoMessage, - requestSerialize: serialize_clientInterface_CryptoMessage, - requestDeserialize: deserialize_clientInterface_CryptoMessage, - responseSerialize: serialize_clientInterface_CryptoMessage, - responseDeserialize: deserialize_clientInterface_CryptoMessage, - }, - keysSign: { - path: '/clientInterface.Client/KeysSign', - requestStream: false, - responseStream: false, - requestType: Client_pb.CryptoMessage, - responseType: Client_pb.CryptoMessage, - requestSerialize: serialize_clientInterface_CryptoMessage, - requestDeserialize: deserialize_clientInterface_CryptoMessage, - responseSerialize: serialize_clientInterface_CryptoMessage, - responseDeserialize: deserialize_clientInterface_CryptoMessage, - }, - keysVerify: { - path: '/clientInterface.Client/KeysVerify', - requestStream: false, - responseStream: false, - requestType: Client_pb.CryptoMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_CryptoMessage, - requestDeserialize: deserialize_clientInterface_CryptoMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - keysPasswordChange: { - path: '/clientInterface.Client/KeysPasswordChange', - requestStream: false, - responseStream: false, - requestType: Client_pb.PasswordMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_PasswordMessage, - requestDeserialize: deserialize_clientInterface_PasswordMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - keysCertsGet: { - path: '/clientInterface.Client/KeysCertsGet', - requestStream: false, - responseStream: false, - requestType: Client_pb.EmptyMessage, - responseType: Client_pb.CertificateMessage, - requestSerialize: serialize_clientInterface_EmptyMessage, - requestDeserialize: deserialize_clientInterface_EmptyMessage, - responseSerialize: serialize_clientInterface_CertificateMessage, - responseDeserialize: deserialize_clientInterface_CertificateMessage, - }, - keysCertsChainGet: { - path: '/clientInterface.Client/KeysCertsChainGet', - requestStream: false, - responseStream: true, - requestType: Client_pb.EmptyMessage, - responseType: Client_pb.CertificateMessage, - requestSerialize: serialize_clientInterface_EmptyMessage, - requestDeserialize: deserialize_clientInterface_EmptyMessage, - responseSerialize: serialize_clientInterface_CertificateMessage, - responseDeserialize: deserialize_clientInterface_CertificateMessage, - }, - // Vaults -vaultsList: { - path: '/clientInterface.Client/VaultsList', - requestStream: false, - responseStream: true, - requestType: Client_pb.EmptyMessage, - responseType: Client_pb.VaultListMessage, - requestSerialize: serialize_clientInterface_EmptyMessage, - requestDeserialize: deserialize_clientInterface_EmptyMessage, - responseSerialize: serialize_clientInterface_VaultListMessage, - responseDeserialize: deserialize_clientInterface_VaultListMessage, - }, - vaultsCreate: { - path: '/clientInterface.Client/VaultsCreate', - requestStream: false, - responseStream: false, - requestType: Client_pb.VaultMessage, - responseType: Client_pb.VaultMessage, - requestSerialize: serialize_clientInterface_VaultMessage, - requestDeserialize: deserialize_clientInterface_VaultMessage, - responseSerialize: serialize_clientInterface_VaultMessage, - responseDeserialize: deserialize_clientInterface_VaultMessage, - }, - vaultsRename: { - path: '/clientInterface.Client/VaultsRename', - requestStream: false, - responseStream: false, - requestType: Client_pb.VaultRenameMessage, - responseType: Client_pb.VaultMessage, - requestSerialize: serialize_clientInterface_VaultRenameMessage, - requestDeserialize: deserialize_clientInterface_VaultRenameMessage, - responseSerialize: serialize_clientInterface_VaultMessage, - responseDeserialize: deserialize_clientInterface_VaultMessage, - }, - vaultsDelete: { - path: '/clientInterface.Client/VaultsDelete', - requestStream: false, - responseStream: false, - requestType: Client_pb.VaultMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_VaultMessage, - requestDeserialize: deserialize_clientInterface_VaultMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsPull: { - path: '/clientInterface.Client/VaultsPull', - requestStream: false, - responseStream: false, - requestType: Client_pb.VaultPullMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_VaultPullMessage, - requestDeserialize: deserialize_clientInterface_VaultPullMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsClone: { - path: '/clientInterface.Client/VaultsClone', - requestStream: false, - responseStream: false, - requestType: Client_pb.VaultCloneMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_VaultCloneMessage, - requestDeserialize: deserialize_clientInterface_VaultCloneMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsScan: { - path: '/clientInterface.Client/VaultsScan', - requestStream: false, - responseStream: true, - requestType: Client_pb.NodeMessage, - responseType: Client_pb.VaultListMessage, - requestSerialize: serialize_clientInterface_NodeMessage, - requestDeserialize: deserialize_clientInterface_NodeMessage, - responseSerialize: serialize_clientInterface_VaultListMessage, - responseDeserialize: deserialize_clientInterface_VaultListMessage, - }, - vaultsSecretsList: { - path: '/clientInterface.Client/VaultsSecretsList', - requestStream: false, - responseStream: true, - requestType: Client_pb.VaultMessage, - responseType: Client_pb.SecretMessage, - requestSerialize: serialize_clientInterface_VaultMessage, - requestDeserialize: deserialize_clientInterface_VaultMessage, - responseSerialize: serialize_clientInterface_SecretMessage, - responseDeserialize: deserialize_clientInterface_SecretMessage, - }, - vaultsSecretsMkdir: { - path: '/clientInterface.Client/VaultsSecretsMkdir', - requestStream: false, - responseStream: false, - requestType: Client_pb.VaultMkdirMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_VaultMkdirMessage, - requestDeserialize: deserialize_clientInterface_VaultMkdirMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsSecretsStat: { - path: '/clientInterface.Client/VaultsSecretsStat', - requestStream: false, - responseStream: false, - requestType: Client_pb.VaultMessage, - responseType: Client_pb.StatMessage, - requestSerialize: serialize_clientInterface_VaultMessage, - requestDeserialize: deserialize_clientInterface_VaultMessage, - responseSerialize: serialize_clientInterface_StatMessage, - responseDeserialize: deserialize_clientInterface_StatMessage, - }, - vaultsSecretsDelete: { - path: '/clientInterface.Client/VaultsSecretsDelete', - requestStream: false, - responseStream: false, - requestType: Client_pb.SecretMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_SecretMessage, - requestDeserialize: deserialize_clientInterface_SecretMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsSecretsEdit: { - path: '/clientInterface.Client/VaultsSecretsEdit', - requestStream: false, - responseStream: false, - requestType: Client_pb.SecretMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_SecretMessage, - requestDeserialize: deserialize_clientInterface_SecretMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsSecretsGet: { - path: '/clientInterface.Client/VaultsSecretsGet', - requestStream: false, - responseStream: false, - requestType: Client_pb.SecretMessage, - responseType: Client_pb.SecretMessage, - requestSerialize: serialize_clientInterface_SecretMessage, - requestDeserialize: deserialize_clientInterface_SecretMessage, - responseSerialize: serialize_clientInterface_SecretMessage, - responseDeserialize: deserialize_clientInterface_SecretMessage, - }, - vaultsSecretsRename: { - path: '/clientInterface.Client/VaultsSecretsRename', - requestStream: false, - responseStream: false, - requestType: Client_pb.SecretRenameMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_SecretRenameMessage, - requestDeserialize: deserialize_clientInterface_SecretRenameMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsSecretsNew: { - path: '/clientInterface.Client/VaultsSecretsNew', - requestStream: false, - responseStream: false, - requestType: Client_pb.SecretMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_SecretMessage, - requestDeserialize: deserialize_clientInterface_SecretMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsSecretsNewDir: { - path: '/clientInterface.Client/VaultsSecretsNewDir', - requestStream: false, - responseStream: false, - requestType: Client_pb.SecretDirectoryMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_SecretDirectoryMessage, - requestDeserialize: deserialize_clientInterface_SecretDirectoryMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsPermissionsSet: { - path: '/clientInterface.Client/VaultsPermissionsSet', - requestStream: false, - responseStream: false, - requestType: Client_pb.SetVaultPermMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_SetVaultPermMessage, - requestDeserialize: deserialize_clientInterface_SetVaultPermMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsPermissionsUnset: { - path: '/clientInterface.Client/VaultsPermissionsUnset', - requestStream: false, - responseStream: false, - requestType: Client_pb.UnsetVaultPermMessage, - responseType: Client_pb.StatusMessage, - requestSerialize: serialize_clientInterface_UnsetVaultPermMessage, - requestDeserialize: deserialize_clientInterface_UnsetVaultPermMessage, - responseSerialize: serialize_clientInterface_StatusMessage, - responseDeserialize: deserialize_clientInterface_StatusMessage, - }, - vaultsPermissions: { - path: '/clientInterface.Client/VaultsPermissions', - requestStream: false, - responseStream: true, - requestType: Client_pb.GetVaultPermMessage, - responseType: Client_pb.PermissionMessage, - requestSerialize: serialize_clientInterface_GetVaultPermMessage, - requestDeserialize: deserialize_clientInterface_GetVaultPermMessage, - responseSerialize: serialize_clientInterface_PermissionMessage, - responseDeserialize: deserialize_clientInterface_PermissionMessage, - }, - vaultsVersion: { - path: '/clientInterface.Client/VaultsVersion', - requestStream: false, - responseStream: false, - requestType: Client_pb.VaultsVersionMessage, - responseType: Client_pb.VaultsVersionResultMessage, - requestSerialize: serialize_clientInterface_VaultsVersionMessage, - requestDeserialize: deserialize_clientInterface_VaultsVersionMessage, - responseSerialize: serialize_clientInterface_VaultsVersionResultMessage, - responseDeserialize: deserialize_clientInterface_VaultsVersionResultMessage, - }, - vaultsLog: { - path: '/clientInterface.Client/VaultsLog', - requestStream: false, - responseStream: true, - requestType: Client_pb.VaultsLogMessage, - responseType: Client_pb.VaultsLogEntryMessage, - requestSerialize: serialize_clientInterface_VaultsLogMessage, - requestDeserialize: deserialize_clientInterface_VaultsLogMessage, - responseSerialize: serialize_clientInterface_VaultsLogEntryMessage, - responseDeserialize: deserialize_clientInterface_VaultsLogEntryMessage, - }, - // Identities -identitiesAuthenticate: { - path: '/clientInterface.Client/IdentitiesAuthenticate', - requestStream: false, - responseStream: true, - requestType: Client_pb.ProviderMessage, - responseType: Client_pb.ProviderMessage, - requestSerialize: serialize_clientInterface_ProviderMessage, - requestDeserialize: deserialize_clientInterface_ProviderMessage, - responseSerialize: serialize_clientInterface_ProviderMessage, - responseDeserialize: deserialize_clientInterface_ProviderMessage, - }, - identitiesTokenPut: { - path: '/clientInterface.Client/IdentitiesTokenPut', - requestStream: false, - responseStream: false, - requestType: Client_pb.TokenSpecificMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_TokenSpecificMessage, - requestDeserialize: deserialize_clientInterface_TokenSpecificMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - identitiesTokenGet: { - path: '/clientInterface.Client/IdentitiesTokenGet', - requestStream: false, - responseStream: false, - requestType: Client_pb.ProviderMessage, - responseType: Client_pb.TokenMessage, - requestSerialize: serialize_clientInterface_ProviderMessage, - requestDeserialize: deserialize_clientInterface_ProviderMessage, - responseSerialize: serialize_clientInterface_TokenMessage, - responseDeserialize: deserialize_clientInterface_TokenMessage, - }, - identitiesTokenDelete: { - path: '/clientInterface.Client/IdentitiesTokenDelete', - requestStream: false, - responseStream: false, - requestType: Client_pb.ProviderMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_ProviderMessage, - requestDeserialize: deserialize_clientInterface_ProviderMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - identitiesProvidersList: { - path: '/clientInterface.Client/IdentitiesProvidersList', - requestStream: false, - responseStream: false, - requestType: Client_pb.EmptyMessage, - responseType: Client_pb.ProviderMessage, - requestSerialize: serialize_clientInterface_EmptyMessage, - requestDeserialize: deserialize_clientInterface_EmptyMessage, - responseSerialize: serialize_clientInterface_ProviderMessage, - responseDeserialize: deserialize_clientInterface_ProviderMessage, - }, - identitiesInfoGet: { - path: '/clientInterface.Client/IdentitiesInfoGet', - requestStream: false, - responseStream: false, - requestType: Client_pb.ProviderMessage, - responseType: Client_pb.ProviderMessage, - requestSerialize: serialize_clientInterface_ProviderMessage, - requestDeserialize: deserialize_clientInterface_ProviderMessage, - responseSerialize: serialize_clientInterface_ProviderMessage, - responseDeserialize: deserialize_clientInterface_ProviderMessage, - }, - identitiesInfoGetConnected: { - path: '/clientInterface.Client/IdentitiesInfoGetConnected', - requestStream: false, - responseStream: true, - requestType: Client_pb.ProviderSearchMessage, - responseType: Client_pb.IdentityInfoMessage, - requestSerialize: serialize_clientInterface_ProviderSearchMessage, - requestDeserialize: deserialize_clientInterface_ProviderSearchMessage, - responseSerialize: serialize_clientInterface_IdentityInfoMessage, - responseDeserialize: deserialize_clientInterface_IdentityInfoMessage, - }, - identitiesClaim: { - path: '/clientInterface.Client/IdentitiesClaim', - requestStream: false, - responseStream: false, - requestType: Client_pb.ProviderMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_ProviderMessage, - requestDeserialize: deserialize_clientInterface_ProviderMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - // Gestalts -gestaltsGestaltList: { - path: '/clientInterface.Client/GestaltsGestaltList', - requestStream: false, - responseStream: true, - requestType: Client_pb.EmptyMessage, - responseType: Client_pb.GestaltMessage, - requestSerialize: serialize_clientInterface_EmptyMessage, - requestDeserialize: deserialize_clientInterface_EmptyMessage, - responseSerialize: serialize_clientInterface_GestaltMessage, - responseDeserialize: deserialize_clientInterface_GestaltMessage, - }, - gestaltsGestaltGetByNode: { - path: '/clientInterface.Client/GestaltsGestaltGetByNode', - requestStream: false, - responseStream: false, - requestType: Client_pb.NodeMessage, - responseType: Client_pb.GestaltGraphMessage, - requestSerialize: serialize_clientInterface_NodeMessage, - requestDeserialize: deserialize_clientInterface_NodeMessage, - responseSerialize: serialize_clientInterface_GestaltGraphMessage, - responseDeserialize: deserialize_clientInterface_GestaltGraphMessage, - }, - gestaltsGestaltGetByIdentity: { - path: '/clientInterface.Client/GestaltsGestaltGetByIdentity', - requestStream: false, - responseStream: false, - requestType: Client_pb.ProviderMessage, - responseType: Client_pb.GestaltGraphMessage, - requestSerialize: serialize_clientInterface_ProviderMessage, - requestDeserialize: deserialize_clientInterface_ProviderMessage, - responseSerialize: serialize_clientInterface_GestaltGraphMessage, - responseDeserialize: deserialize_clientInterface_GestaltGraphMessage, - }, - gestaltsDiscoveryByNode: { - path: '/clientInterface.Client/GestaltsDiscoveryByNode', - requestStream: false, - responseStream: false, - requestType: Client_pb.NodeMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_NodeMessage, - requestDeserialize: deserialize_clientInterface_NodeMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - gestaltsDiscoveryByIdentity: { - path: '/clientInterface.Client/GestaltsDiscoveryByIdentity', - requestStream: false, - responseStream: false, - requestType: Client_pb.ProviderMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_ProviderMessage, - requestDeserialize: deserialize_clientInterface_ProviderMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - gestaltsActionsGetByNode: { - path: '/clientInterface.Client/GestaltsActionsGetByNode', - requestStream: false, - responseStream: false, - requestType: Client_pb.NodeMessage, - responseType: Client_pb.ActionsMessage, - requestSerialize: serialize_clientInterface_NodeMessage, - requestDeserialize: deserialize_clientInterface_NodeMessage, - responseSerialize: serialize_clientInterface_ActionsMessage, - responseDeserialize: deserialize_clientInterface_ActionsMessage, - }, - gestaltsActionsGetByIdentity: { - path: '/clientInterface.Client/GestaltsActionsGetByIdentity', - requestStream: false, - responseStream: false, - requestType: Client_pb.ProviderMessage, - responseType: Client_pb.ActionsMessage, - requestSerialize: serialize_clientInterface_ProviderMessage, - requestDeserialize: deserialize_clientInterface_ProviderMessage, - responseSerialize: serialize_clientInterface_ActionsMessage, - responseDeserialize: deserialize_clientInterface_ActionsMessage, - }, - gestaltsActionsSetByNode: { - path: '/clientInterface.Client/GestaltsActionsSetByNode', - requestStream: false, - responseStream: false, - requestType: Client_pb.SetActionsMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_SetActionsMessage, - requestDeserialize: deserialize_clientInterface_SetActionsMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - gestaltsActionsSetByIdentity: { - path: '/clientInterface.Client/GestaltsActionsSetByIdentity', - requestStream: false, - responseStream: false, - requestType: Client_pb.SetActionsMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_SetActionsMessage, - requestDeserialize: deserialize_clientInterface_SetActionsMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - gestaltsActionsUnsetByNode: { - path: '/clientInterface.Client/GestaltsActionsUnsetByNode', - requestStream: false, - responseStream: false, - requestType: Client_pb.SetActionsMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_SetActionsMessage, - requestDeserialize: deserialize_clientInterface_SetActionsMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - gestaltsActionsUnsetByIdentity: { - path: '/clientInterface.Client/GestaltsActionsUnsetByIdentity', - requestStream: false, - responseStream: false, - requestType: Client_pb.SetActionsMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_SetActionsMessage, - requestDeserialize: deserialize_clientInterface_SetActionsMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - // Notifications -notificationsSend: { - path: '/clientInterface.Client/NotificationsSend', - requestStream: false, - responseStream: false, - requestType: Client_pb.NotificationsSendMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_NotificationsSendMessage, - requestDeserialize: deserialize_clientInterface_NotificationsSendMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, - notificationsRead: { - path: '/clientInterface.Client/NotificationsRead', - requestStream: false, - responseStream: false, - requestType: Client_pb.NotificationsReadMessage, - responseType: Client_pb.NotificationsListMessage, - requestSerialize: serialize_clientInterface_NotificationsReadMessage, - requestDeserialize: deserialize_clientInterface_NotificationsReadMessage, - responseSerialize: serialize_clientInterface_NotificationsListMessage, - responseDeserialize: deserialize_clientInterface_NotificationsListMessage, - }, - notificationsClear: { - path: '/clientInterface.Client/NotificationsClear', - requestStream: false, - responseStream: false, - requestType: Client_pb.EmptyMessage, - responseType: Client_pb.EmptyMessage, - requestSerialize: serialize_clientInterface_EmptyMessage, - requestDeserialize: deserialize_clientInterface_EmptyMessage, - responseSerialize: serialize_clientInterface_EmptyMessage, - responseDeserialize: deserialize_clientInterface_EmptyMessage, - }, -}; - -exports.ClientClient = grpc.makeGenericClientConstructor(ClientService); diff --git a/src/proto/js/Client_pb.d.ts b/src/proto/js/Client_pb.d.ts deleted file mode 100644 index 4b8638ead..000000000 --- a/src/proto/js/Client_pb.d.ts +++ /dev/null @@ -1,1184 +0,0 @@ -// package: clientInterface -// file: Client.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class EmptyMessage extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EmptyMessage.AsObject; - static toObject(includeInstance: boolean, msg: EmptyMessage): EmptyMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EmptyMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EmptyMessage; - static deserializeBinaryFromReader(message: EmptyMessage, reader: jspb.BinaryReader): EmptyMessage; -} - -export namespace EmptyMessage { - export type AsObject = { - } -} - -export class StatusMessage extends jspb.Message { - getSuccess(): boolean; - setSuccess(value: boolean): StatusMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StatusMessage.AsObject; - static toObject(includeInstance: boolean, msg: StatusMessage): StatusMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StatusMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StatusMessage; - static deserializeBinaryFromReader(message: StatusMessage, reader: jspb.BinaryReader): StatusMessage; -} - -export namespace StatusMessage { - export type AsObject = { - success: boolean, - } -} - -export class EchoMessage extends jspb.Message { - getChallenge(): string; - setChallenge(value: string): EchoMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EchoMessage.AsObject; - static toObject(includeInstance: boolean, msg: EchoMessage): EchoMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EchoMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EchoMessage; - static deserializeBinaryFromReader(message: EchoMessage, reader: jspb.BinaryReader): EchoMessage; -} - -export namespace EchoMessage { - export type AsObject = { - challenge: string, - } -} - -export class PasswordMessage extends jspb.Message { - - hasPassword(): boolean; - clearPassword(): void; - getPassword(): string; - setPassword(value: string): PasswordMessage; - - hasPasswordFile(): boolean; - clearPasswordFile(): void; - getPasswordFile(): string; - setPasswordFile(value: string): PasswordMessage; - - getPasswordOrFileCase(): PasswordMessage.PasswordOrFileCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PasswordMessage.AsObject; - static toObject(includeInstance: boolean, msg: PasswordMessage): PasswordMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PasswordMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PasswordMessage; - static deserializeBinaryFromReader(message: PasswordMessage, reader: jspb.BinaryReader): PasswordMessage; -} - -export namespace PasswordMessage { - export type AsObject = { - password: string, - passwordFile: string, - } - - export enum PasswordOrFileCase { - PASSWORD_OR_FILE_NOT_SET = 0, - PASSWORD = 1, - PASSWORD_FILE = 2, - } - -} - -export class SessionTokenMessage extends jspb.Message { - getToken(): string; - setToken(value: string): SessionTokenMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SessionTokenMessage.AsObject; - static toObject(includeInstance: boolean, msg: SessionTokenMessage): SessionTokenMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SessionTokenMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SessionTokenMessage; - static deserializeBinaryFromReader(message: SessionTokenMessage, reader: jspb.BinaryReader): SessionTokenMessage; -} - -export namespace SessionTokenMessage { - export type AsObject = { - token: string, - } -} - -export class VaultListMessage extends jspb.Message { - getVaultName(): string; - setVaultName(value: string): VaultListMessage; - getVaultId(): string; - setVaultId(value: string): VaultListMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultListMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultListMessage): VaultListMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultListMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultListMessage; - static deserializeBinaryFromReader(message: VaultListMessage, reader: jspb.BinaryReader): VaultListMessage; -} - -export namespace VaultListMessage { - export type AsObject = { - vaultName: string, - vaultId: string, - } -} - -export class VaultMessage extends jspb.Message { - getNameOrId(): string; - setNameOrId(value: string): VaultMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultMessage): VaultMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultMessage; - static deserializeBinaryFromReader(message: VaultMessage, reader: jspb.BinaryReader): VaultMessage; -} - -export namespace VaultMessage { - export type AsObject = { - nameOrId: string, - } -} - -export class VaultRenameMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): VaultRenameMessage; - getNewName(): string; - setNewName(value: string): VaultRenameMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultRenameMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultRenameMessage): VaultRenameMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultRenameMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultRenameMessage; - static deserializeBinaryFromReader(message: VaultRenameMessage, reader: jspb.BinaryReader): VaultRenameMessage; -} - -export namespace VaultRenameMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - newName: string, - } -} - -export class VaultMkdirMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): VaultMkdirMessage; - getDirName(): string; - setDirName(value: string): VaultMkdirMessage; - getRecursive(): boolean; - setRecursive(value: boolean): VaultMkdirMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultMkdirMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultMkdirMessage): VaultMkdirMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultMkdirMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultMkdirMessage; - static deserializeBinaryFromReader(message: VaultMkdirMessage, reader: jspb.BinaryReader): VaultMkdirMessage; -} - -export namespace VaultMkdirMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - dirName: string, - recursive: boolean, - } -} - -export class VaultPullMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): VaultPullMessage; - - hasNode(): boolean; - clearNode(): void; - getNode(): NodeMessage | undefined; - setNode(value?: NodeMessage): VaultPullMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultPullMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultPullMessage): VaultPullMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultPullMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultPullMessage; - static deserializeBinaryFromReader(message: VaultPullMessage, reader: jspb.BinaryReader): VaultPullMessage; -} - -export namespace VaultPullMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - node?: NodeMessage.AsObject, - } -} - -export class VaultCloneMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): VaultCloneMessage; - - hasNode(): boolean; - clearNode(): void; - getNode(): NodeMessage | undefined; - setNode(value?: NodeMessage): VaultCloneMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultCloneMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultCloneMessage): VaultCloneMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultCloneMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultCloneMessage; - static deserializeBinaryFromReader(message: VaultCloneMessage, reader: jspb.BinaryReader): VaultCloneMessage; -} - -export namespace VaultCloneMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - node?: NodeMessage.AsObject, - } -} - -export class SecretRenameMessage extends jspb.Message { - - hasOldSecret(): boolean; - clearOldSecret(): void; - getOldSecret(): SecretMessage | undefined; - setOldSecret(value?: SecretMessage): SecretRenameMessage; - getNewName(): string; - setNewName(value: string): SecretRenameMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SecretRenameMessage.AsObject; - static toObject(includeInstance: boolean, msg: SecretRenameMessage): SecretRenameMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SecretRenameMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SecretRenameMessage; - static deserializeBinaryFromReader(message: SecretRenameMessage, reader: jspb.BinaryReader): SecretRenameMessage; -} - -export namespace SecretRenameMessage { - export type AsObject = { - oldSecret?: SecretMessage.AsObject, - newName: string, - } -} - -export class SecretMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): SecretMessage; - getSecretName(): string; - setSecretName(value: string): SecretMessage; - getSecretContent(): Uint8Array | string; - getSecretContent_asU8(): Uint8Array; - getSecretContent_asB64(): string; - setSecretContent(value: Uint8Array | string): SecretMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SecretMessage.AsObject; - static toObject(includeInstance: boolean, msg: SecretMessage): SecretMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SecretMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SecretMessage; - static deserializeBinaryFromReader(message: SecretMessage, reader: jspb.BinaryReader): SecretMessage; -} - -export namespace SecretMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - secretName: string, - secretContent: Uint8Array | string, - } -} - -export class SecretDirectoryMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): SecretDirectoryMessage; - getSecretDirectory(): string; - setSecretDirectory(value: string): SecretDirectoryMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SecretDirectoryMessage.AsObject; - static toObject(includeInstance: boolean, msg: SecretDirectoryMessage): SecretDirectoryMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SecretDirectoryMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SecretDirectoryMessage; - static deserializeBinaryFromReader(message: SecretDirectoryMessage, reader: jspb.BinaryReader): SecretDirectoryMessage; -} - -export namespace SecretDirectoryMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - secretDirectory: string, - } -} - -export class StatMessage extends jspb.Message { - getStats(): string; - setStats(value: string): StatMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StatMessage.AsObject; - static toObject(includeInstance: boolean, msg: StatMessage): StatMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StatMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StatMessage; - static deserializeBinaryFromReader(message: StatMessage, reader: jspb.BinaryReader): StatMessage; -} - -export namespace StatMessage { - export type AsObject = { - stats: string, - } -} - -export class SetVaultPermMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): SetVaultPermMessage; - - hasNode(): boolean; - clearNode(): void; - getNode(): NodeMessage | undefined; - setNode(value?: NodeMessage): SetVaultPermMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetVaultPermMessage.AsObject; - static toObject(includeInstance: boolean, msg: SetVaultPermMessage): SetVaultPermMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SetVaultPermMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetVaultPermMessage; - static deserializeBinaryFromReader(message: SetVaultPermMessage, reader: jspb.BinaryReader): SetVaultPermMessage; -} - -export namespace SetVaultPermMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - node?: NodeMessage.AsObject, - } -} - -export class UnsetVaultPermMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): UnsetVaultPermMessage; - - hasNode(): boolean; - clearNode(): void; - getNode(): NodeMessage | undefined; - setNode(value?: NodeMessage): UnsetVaultPermMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UnsetVaultPermMessage.AsObject; - static toObject(includeInstance: boolean, msg: UnsetVaultPermMessage): UnsetVaultPermMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UnsetVaultPermMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UnsetVaultPermMessage; - static deserializeBinaryFromReader(message: UnsetVaultPermMessage, reader: jspb.BinaryReader): UnsetVaultPermMessage; -} - -export namespace UnsetVaultPermMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - node?: NodeMessage.AsObject, - } -} - -export class GetVaultPermMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): GetVaultPermMessage; - - hasNode(): boolean; - clearNode(): void; - getNode(): NodeMessage | undefined; - setNode(value?: NodeMessage): GetVaultPermMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetVaultPermMessage.AsObject; - static toObject(includeInstance: boolean, msg: GetVaultPermMessage): GetVaultPermMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetVaultPermMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetVaultPermMessage; - static deserializeBinaryFromReader(message: GetVaultPermMessage, reader: jspb.BinaryReader): GetVaultPermMessage; -} - -export namespace GetVaultPermMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - node?: NodeMessage.AsObject, - } -} - -export class PermissionMessage extends jspb.Message { - getNodeId(): string; - setNodeId(value: string): PermissionMessage; - getAction(): string; - setAction(value: string): PermissionMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PermissionMessage.AsObject; - static toObject(includeInstance: boolean, msg: PermissionMessage): PermissionMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PermissionMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PermissionMessage; - static deserializeBinaryFromReader(message: PermissionMessage, reader: jspb.BinaryReader): PermissionMessage; -} - -export namespace PermissionMessage { - export type AsObject = { - nodeId: string, - action: string, - } -} - -export class VaultsVersionMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): VaultsVersionMessage; - getVersionId(): string; - setVersionId(value: string): VaultsVersionMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultsVersionMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultsVersionMessage): VaultsVersionMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultsVersionMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultsVersionMessage; - static deserializeBinaryFromReader(message: VaultsVersionMessage, reader: jspb.BinaryReader): VaultsVersionMessage; -} - -export namespace VaultsVersionMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - versionId: string, - } -} - -export class VaultsVersionResultMessage extends jspb.Message { - getIsLatestVersion(): boolean; - setIsLatestVersion(value: boolean): VaultsVersionResultMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultsVersionResultMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultsVersionResultMessage): VaultsVersionResultMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultsVersionResultMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultsVersionResultMessage; - static deserializeBinaryFromReader(message: VaultsVersionResultMessage, reader: jspb.BinaryReader): VaultsVersionResultMessage; -} - -export namespace VaultsVersionResultMessage { - export type AsObject = { - isLatestVersion: boolean, - } -} - -export class VaultsLogMessage extends jspb.Message { - - hasVault(): boolean; - clearVault(): void; - getVault(): VaultMessage | undefined; - setVault(value?: VaultMessage): VaultsLogMessage; - getLogDepth(): number; - setLogDepth(value: number): VaultsLogMessage; - getCommitId(): string; - setCommitId(value: string): VaultsLogMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultsLogMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultsLogMessage): VaultsLogMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultsLogMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultsLogMessage; - static deserializeBinaryFromReader(message: VaultsLogMessage, reader: jspb.BinaryReader): VaultsLogMessage; -} - -export namespace VaultsLogMessage { - export type AsObject = { - vault?: VaultMessage.AsObject, - logDepth: number, - commitId: string, - } -} - -export class VaultsLogEntryMessage extends jspb.Message { - getOid(): string; - setOid(value: string): VaultsLogEntryMessage; - getCommitter(): string; - setCommitter(value: string): VaultsLogEntryMessage; - getTimeStamp(): number; - setTimeStamp(value: number): VaultsLogEntryMessage; - getMessage(): string; - setMessage(value: string): VaultsLogEntryMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultsLogEntryMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultsLogEntryMessage): VaultsLogEntryMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultsLogEntryMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultsLogEntryMessage; - static deserializeBinaryFromReader(message: VaultsLogEntryMessage, reader: jspb.BinaryReader): VaultsLogEntryMessage; -} - -export namespace VaultsLogEntryMessage { - export type AsObject = { - oid: string, - committer: string, - timeStamp: number, - message: string, - } -} - -export class NodeMessage extends jspb.Message { - getNodeId(): string; - setNodeId(value: string): NodeMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeMessage.AsObject; - static toObject(includeInstance: boolean, msg: NodeMessage): NodeMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeMessage; - static deserializeBinaryFromReader(message: NodeMessage, reader: jspb.BinaryReader): NodeMessage; -} - -export namespace NodeMessage { - export type AsObject = { - nodeId: string, - } -} - -export class NodeAddressMessage extends jspb.Message { - getNodeId(): string; - setNodeId(value: string): NodeAddressMessage; - getHost(): string; - setHost(value: string): NodeAddressMessage; - getPort(): number; - setPort(value: number): NodeAddressMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeAddressMessage.AsObject; - static toObject(includeInstance: boolean, msg: NodeAddressMessage): NodeAddressMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeAddressMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeAddressMessage; - static deserializeBinaryFromReader(message: NodeAddressMessage, reader: jspb.BinaryReader): NodeAddressMessage; -} - -export namespace NodeAddressMessage { - export type AsObject = { - nodeId: string, - host: string, - port: number, - } -} - -export class NodeClaimMessage extends jspb.Message { - getNodeId(): string; - setNodeId(value: string): NodeClaimMessage; - getForceInvite(): boolean; - setForceInvite(value: boolean): NodeClaimMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeClaimMessage.AsObject; - static toObject(includeInstance: boolean, msg: NodeClaimMessage): NodeClaimMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeClaimMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeClaimMessage; - static deserializeBinaryFromReader(message: NodeClaimMessage, reader: jspb.BinaryReader): NodeClaimMessage; -} - -export namespace NodeClaimMessage { - export type AsObject = { - nodeId: string, - forceInvite: boolean, - } -} - -export class CryptoMessage extends jspb.Message { - getData(): string; - setData(value: string): CryptoMessage; - getSignature(): string; - setSignature(value: string): CryptoMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CryptoMessage.AsObject; - static toObject(includeInstance: boolean, msg: CryptoMessage): CryptoMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CryptoMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CryptoMessage; - static deserializeBinaryFromReader(message: CryptoMessage, reader: jspb.BinaryReader): CryptoMessage; -} - -export namespace CryptoMessage { - export type AsObject = { - data: string, - signature: string, - } -} - -export class KeyMessage extends jspb.Message { - getName(): string; - setName(value: string): KeyMessage; - getKey(): string; - setKey(value: string): KeyMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyMessage.AsObject; - static toObject(includeInstance: boolean, msg: KeyMessage): KeyMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyMessage; - static deserializeBinaryFromReader(message: KeyMessage, reader: jspb.BinaryReader): KeyMessage; -} - -export namespace KeyMessage { - export type AsObject = { - name: string, - key: string, - } -} - -export class KeyPairMessage extends jspb.Message { - getPublic(): string; - setPublic(value: string): KeyPairMessage; - getPrivate(): string; - setPrivate(value: string): KeyPairMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyPairMessage.AsObject; - static toObject(includeInstance: boolean, msg: KeyPairMessage): KeyPairMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyPairMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyPairMessage; - static deserializeBinaryFromReader(message: KeyPairMessage, reader: jspb.BinaryReader): KeyPairMessage; -} - -export namespace KeyPairMessage { - export type AsObject = { - pb_public: string, - pb_private: string, - } -} - -export class CertificateMessage extends jspb.Message { - getCert(): string; - setCert(value: string): CertificateMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CertificateMessage.AsObject; - static toObject(includeInstance: boolean, msg: CertificateMessage): CertificateMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CertificateMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CertificateMessage; - static deserializeBinaryFromReader(message: CertificateMessage, reader: jspb.BinaryReader): CertificateMessage; -} - -export namespace CertificateMessage { - export type AsObject = { - cert: string, - } -} - -export class ProviderMessage extends jspb.Message { - getProviderId(): string; - setProviderId(value: string): ProviderMessage; - getMessage(): string; - setMessage(value: string): ProviderMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProviderMessage.AsObject; - static toObject(includeInstance: boolean, msg: ProviderMessage): ProviderMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProviderMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProviderMessage; - static deserializeBinaryFromReader(message: ProviderMessage, reader: jspb.BinaryReader): ProviderMessage; -} - -export namespace ProviderMessage { - export type AsObject = { - providerId: string, - message: string, - } -} - -export class TokenSpecificMessage extends jspb.Message { - - hasProvider(): boolean; - clearProvider(): void; - getProvider(): ProviderMessage | undefined; - setProvider(value?: ProviderMessage): TokenSpecificMessage; - getToken(): string; - setToken(value: string): TokenSpecificMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TokenSpecificMessage.AsObject; - static toObject(includeInstance: boolean, msg: TokenSpecificMessage): TokenSpecificMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TokenSpecificMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TokenSpecificMessage; - static deserializeBinaryFromReader(message: TokenSpecificMessage, reader: jspb.BinaryReader): TokenSpecificMessage; -} - -export namespace TokenSpecificMessage { - export type AsObject = { - provider?: ProviderMessage.AsObject, - token: string, - } -} - -export class TokenMessage extends jspb.Message { - getToken(): string; - setToken(value: string): TokenMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TokenMessage.AsObject; - static toObject(includeInstance: boolean, msg: TokenMessage): TokenMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TokenMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TokenMessage; - static deserializeBinaryFromReader(message: TokenMessage, reader: jspb.BinaryReader): TokenMessage; -} - -export namespace TokenMessage { - export type AsObject = { - token: string, - } -} - -export class ProviderSearchMessage extends jspb.Message { - - hasProvider(): boolean; - clearProvider(): void; - getProvider(): ProviderMessage | undefined; - setProvider(value?: ProviderMessage): ProviderSearchMessage; - clearSearchTermList(): void; - getSearchTermList(): Array; - setSearchTermList(value: Array): ProviderSearchMessage; - addSearchTerm(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProviderSearchMessage.AsObject; - static toObject(includeInstance: boolean, msg: ProviderSearchMessage): ProviderSearchMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProviderSearchMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProviderSearchMessage; - static deserializeBinaryFromReader(message: ProviderSearchMessage, reader: jspb.BinaryReader): ProviderSearchMessage; -} - -export namespace ProviderSearchMessage { - export type AsObject = { - provider?: ProviderMessage.AsObject, - searchTermList: Array, - } -} - -export class IdentityInfoMessage extends jspb.Message { - - hasProvider(): boolean; - clearProvider(): void; - getProvider(): ProviderMessage | undefined; - setProvider(value?: ProviderMessage): IdentityInfoMessage; - getName(): string; - setName(value: string): IdentityInfoMessage; - getEmail(): string; - setEmail(value: string): IdentityInfoMessage; - getUrl(): string; - setUrl(value: string): IdentityInfoMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): IdentityInfoMessage.AsObject; - static toObject(includeInstance: boolean, msg: IdentityInfoMessage): IdentityInfoMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: IdentityInfoMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): IdentityInfoMessage; - static deserializeBinaryFromReader(message: IdentityInfoMessage, reader: jspb.BinaryReader): IdentityInfoMessage; -} - -export namespace IdentityInfoMessage { - export type AsObject = { - provider?: ProviderMessage.AsObject, - name: string, - email: string, - url: string, - } -} - -export class GestaltMessage extends jspb.Message { - getName(): string; - setName(value: string): GestaltMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GestaltMessage.AsObject; - static toObject(includeInstance: boolean, msg: GestaltMessage): GestaltMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GestaltMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GestaltMessage; - static deserializeBinaryFromReader(message: GestaltMessage, reader: jspb.BinaryReader): GestaltMessage; -} - -export namespace GestaltMessage { - export type AsObject = { - name: string, - } -} - -export class GestaltGraphMessage extends jspb.Message { - getGestaltGraph(): string; - setGestaltGraph(value: string): GestaltGraphMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GestaltGraphMessage.AsObject; - static toObject(includeInstance: boolean, msg: GestaltGraphMessage): GestaltGraphMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GestaltGraphMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GestaltGraphMessage; - static deserializeBinaryFromReader(message: GestaltGraphMessage, reader: jspb.BinaryReader): GestaltGraphMessage; -} - -export namespace GestaltGraphMessage { - export type AsObject = { - gestaltGraph: string, - } -} - -export class GestaltTrustMessage extends jspb.Message { - getProvider(): string; - setProvider(value: string): GestaltTrustMessage; - getName(): string; - setName(value: string): GestaltTrustMessage; - getSet(): boolean; - setSet(value: boolean): GestaltTrustMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GestaltTrustMessage.AsObject; - static toObject(includeInstance: boolean, msg: GestaltTrustMessage): GestaltTrustMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GestaltTrustMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GestaltTrustMessage; - static deserializeBinaryFromReader(message: GestaltTrustMessage, reader: jspb.BinaryReader): GestaltTrustMessage; -} - -export namespace GestaltTrustMessage { - export type AsObject = { - provider: string, - name: string, - set: boolean, - } -} - -export class ActionsMessage extends jspb.Message { - clearActionList(): void; - getActionList(): Array; - setActionList(value: Array): ActionsMessage; - addAction(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ActionsMessage.AsObject; - static toObject(includeInstance: boolean, msg: ActionsMessage): ActionsMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ActionsMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ActionsMessage; - static deserializeBinaryFromReader(message: ActionsMessage, reader: jspb.BinaryReader): ActionsMessage; -} - -export namespace ActionsMessage { - export type AsObject = { - actionList: Array, - } -} - -export class SetActionsMessage extends jspb.Message { - - hasNode(): boolean; - clearNode(): void; - getNode(): NodeMessage | undefined; - setNode(value?: NodeMessage): SetActionsMessage; - - hasIdentity(): boolean; - clearIdentity(): void; - getIdentity(): ProviderMessage | undefined; - setIdentity(value?: ProviderMessage): SetActionsMessage; - getAction(): string; - setAction(value: string): SetActionsMessage; - - getNodeOrProviderCase(): SetActionsMessage.NodeOrProviderCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetActionsMessage.AsObject; - static toObject(includeInstance: boolean, msg: SetActionsMessage): SetActionsMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SetActionsMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetActionsMessage; - static deserializeBinaryFromReader(message: SetActionsMessage, reader: jspb.BinaryReader): SetActionsMessage; -} - -export namespace SetActionsMessage { - export type AsObject = { - node?: NodeMessage.AsObject, - identity?: ProviderMessage.AsObject, - action: string, - } - - export enum NodeOrProviderCase { - NODE_OR_PROVIDER_NOT_SET = 0, - NODE = 1, - IDENTITY = 2, - } - -} - -export class NotificationsMessage extends jspb.Message { - - hasGeneral(): boolean; - clearGeneral(): void; - getGeneral(): GeneralTypeMessage | undefined; - setGeneral(value?: GeneralTypeMessage): NotificationsMessage; - - hasGestaltInvite(): boolean; - clearGestaltInvite(): void; - getGestaltInvite(): string; - setGestaltInvite(value: string): NotificationsMessage; - - hasVaultShare(): boolean; - clearVaultShare(): void; - getVaultShare(): VaultShareTypeMessage | undefined; - setVaultShare(value?: VaultShareTypeMessage): NotificationsMessage; - getSenderId(): string; - setSenderId(value: string): NotificationsMessage; - getIsRead(): boolean; - setIsRead(value: boolean): NotificationsMessage; - - getDataCase(): NotificationsMessage.DataCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NotificationsMessage.AsObject; - static toObject(includeInstance: boolean, msg: NotificationsMessage): NotificationsMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NotificationsMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NotificationsMessage; - static deserializeBinaryFromReader(message: NotificationsMessage, reader: jspb.BinaryReader): NotificationsMessage; -} - -export namespace NotificationsMessage { - export type AsObject = { - general?: GeneralTypeMessage.AsObject, - gestaltInvite: string, - vaultShare?: VaultShareTypeMessage.AsObject, - senderId: string, - isRead: boolean, - } - - export enum DataCase { - DATA_NOT_SET = 0, - GENERAL = 1, - GESTALT_INVITE = 2, - VAULT_SHARE = 3, - } - -} - -export class NotificationsSendMessage extends jspb.Message { - getReceiverId(): string; - setReceiverId(value: string): NotificationsSendMessage; - - hasData(): boolean; - clearData(): void; - getData(): GeneralTypeMessage | undefined; - setData(value?: GeneralTypeMessage): NotificationsSendMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NotificationsSendMessage.AsObject; - static toObject(includeInstance: boolean, msg: NotificationsSendMessage): NotificationsSendMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NotificationsSendMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NotificationsSendMessage; - static deserializeBinaryFromReader(message: NotificationsSendMessage, reader: jspb.BinaryReader): NotificationsSendMessage; -} - -export namespace NotificationsSendMessage { - export type AsObject = { - receiverId: string, - data?: GeneralTypeMessage.AsObject, - } -} - -export class NotificationsReadMessage extends jspb.Message { - getUnread(): boolean; - setUnread(value: boolean): NotificationsReadMessage; - getNumber(): string; - setNumber(value: string): NotificationsReadMessage; - getOrder(): string; - setOrder(value: string): NotificationsReadMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NotificationsReadMessage.AsObject; - static toObject(includeInstance: boolean, msg: NotificationsReadMessage): NotificationsReadMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NotificationsReadMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NotificationsReadMessage; - static deserializeBinaryFromReader(message: NotificationsReadMessage, reader: jspb.BinaryReader): NotificationsReadMessage; -} - -export namespace NotificationsReadMessage { - export type AsObject = { - unread: boolean, - number: string, - order: string, - } -} - -export class NotificationsListMessage extends jspb.Message { - clearNotificationList(): void; - getNotificationList(): Array; - setNotificationList(value: Array): NotificationsListMessage; - addNotification(value?: NotificationsMessage, index?: number): NotificationsMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NotificationsListMessage.AsObject; - static toObject(includeInstance: boolean, msg: NotificationsListMessage): NotificationsListMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NotificationsListMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NotificationsListMessage; - static deserializeBinaryFromReader(message: NotificationsListMessage, reader: jspb.BinaryReader): NotificationsListMessage; -} - -export namespace NotificationsListMessage { - export type AsObject = { - notificationList: Array, - } -} - -export class GeneralTypeMessage extends jspb.Message { - getMessage(): string; - setMessage(value: string): GeneralTypeMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GeneralTypeMessage.AsObject; - static toObject(includeInstance: boolean, msg: GeneralTypeMessage): GeneralTypeMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GeneralTypeMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GeneralTypeMessage; - static deserializeBinaryFromReader(message: GeneralTypeMessage, reader: jspb.BinaryReader): GeneralTypeMessage; -} - -export namespace GeneralTypeMessage { - export type AsObject = { - message: string, - } -} - -export class VaultShareTypeMessage extends jspb.Message { - getVaultId(): string; - setVaultId(value: string): VaultShareTypeMessage; - getVaultName(): string; - setVaultName(value: string): VaultShareTypeMessage; - clearActionsList(): void; - getActionsList(): Array; - setActionsList(value: Array): VaultShareTypeMessage; - addActions(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VaultShareTypeMessage.AsObject; - static toObject(includeInstance: boolean, msg: VaultShareTypeMessage): VaultShareTypeMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VaultShareTypeMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VaultShareTypeMessage; - static deserializeBinaryFromReader(message: VaultShareTypeMessage, reader: jspb.BinaryReader): VaultShareTypeMessage; -} - -export namespace VaultShareTypeMessage { - export type AsObject = { - vaultId: string, - vaultName: string, - actionsList: Array, - } -} diff --git a/src/proto/js/Client_pb.js b/src/proto/js/Client_pb.js deleted file mode 100644 index 71900712d..000000000 --- a/src/proto/js/Client_pb.js +++ /dev/null @@ -1,9153 +0,0 @@ -// source: Client.proto -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.clientInterface.ActionsMessage', null, global); -goog.exportSymbol('proto.clientInterface.CertificateMessage', null, global); -goog.exportSymbol('proto.clientInterface.CryptoMessage', null, global); -goog.exportSymbol('proto.clientInterface.EchoMessage', null, global); -goog.exportSymbol('proto.clientInterface.EmptyMessage', null, global); -goog.exportSymbol('proto.clientInterface.GeneralTypeMessage', null, global); -goog.exportSymbol('proto.clientInterface.GestaltGraphMessage', null, global); -goog.exportSymbol('proto.clientInterface.GestaltMessage', null, global); -goog.exportSymbol('proto.clientInterface.GestaltTrustMessage', null, global); -goog.exportSymbol('proto.clientInterface.GetVaultPermMessage', null, global); -goog.exportSymbol('proto.clientInterface.IdentityInfoMessage', null, global); -goog.exportSymbol('proto.clientInterface.KeyMessage', null, global); -goog.exportSymbol('proto.clientInterface.KeyPairMessage', null, global); -goog.exportSymbol('proto.clientInterface.NodeAddressMessage', null, global); -goog.exportSymbol('proto.clientInterface.NodeClaimMessage', null, global); -goog.exportSymbol('proto.clientInterface.NodeMessage', null, global); -goog.exportSymbol('proto.clientInterface.NotificationsListMessage', null, global); -goog.exportSymbol('proto.clientInterface.NotificationsMessage', null, global); -goog.exportSymbol('proto.clientInterface.NotificationsMessage.DataCase', null, global); -goog.exportSymbol('proto.clientInterface.NotificationsReadMessage', null, global); -goog.exportSymbol('proto.clientInterface.NotificationsSendMessage', null, global); -goog.exportSymbol('proto.clientInterface.PasswordMessage', null, global); -goog.exportSymbol('proto.clientInterface.PasswordMessage.PasswordOrFileCase', null, global); -goog.exportSymbol('proto.clientInterface.PermissionMessage', null, global); -goog.exportSymbol('proto.clientInterface.ProviderMessage', null, global); -goog.exportSymbol('proto.clientInterface.ProviderSearchMessage', null, global); -goog.exportSymbol('proto.clientInterface.SecretDirectoryMessage', null, global); -goog.exportSymbol('proto.clientInterface.SecretMessage', null, global); -goog.exportSymbol('proto.clientInterface.SecretRenameMessage', null, global); -goog.exportSymbol('proto.clientInterface.SessionTokenMessage', null, global); -goog.exportSymbol('proto.clientInterface.SetActionsMessage', null, global); -goog.exportSymbol('proto.clientInterface.SetActionsMessage.NodeOrProviderCase', null, global); -goog.exportSymbol('proto.clientInterface.SetVaultPermMessage', null, global); -goog.exportSymbol('proto.clientInterface.StatMessage', null, global); -goog.exportSymbol('proto.clientInterface.StatusMessage', null, global); -goog.exportSymbol('proto.clientInterface.TokenMessage', null, global); -goog.exportSymbol('proto.clientInterface.TokenSpecificMessage', null, global); -goog.exportSymbol('proto.clientInterface.UnsetVaultPermMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultCloneMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultListMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultMkdirMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultPullMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultRenameMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultShareTypeMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultsLogEntryMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultsLogMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultsVersionMessage', null, global); -goog.exportSymbol('proto.clientInterface.VaultsVersionResultMessage', null, global); -/** - * 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.clientInterface.EmptyMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.EmptyMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.EmptyMessage.displayName = 'proto.clientInterface.EmptyMessage'; -} -/** - * 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.clientInterface.StatusMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.StatusMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.StatusMessage.displayName = 'proto.clientInterface.StatusMessage'; -} -/** - * 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.clientInterface.EchoMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.EchoMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.EchoMessage.displayName = 'proto.clientInterface.EchoMessage'; -} -/** - * 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.clientInterface.PasswordMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.clientInterface.PasswordMessage.oneofGroups_); -}; -goog.inherits(proto.clientInterface.PasswordMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.PasswordMessage.displayName = 'proto.clientInterface.PasswordMessage'; -} -/** - * 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.clientInterface.SessionTokenMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.SessionTokenMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.SessionTokenMessage.displayName = 'proto.clientInterface.SessionTokenMessage'; -} -/** - * 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.clientInterface.VaultListMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.VaultListMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultListMessage.displayName = 'proto.clientInterface.VaultListMessage'; -} -/** - * 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.clientInterface.VaultMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.VaultMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultMessage.displayName = 'proto.clientInterface.VaultMessage'; -} -/** - * 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.clientInterface.VaultRenameMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.VaultRenameMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultRenameMessage.displayName = 'proto.clientInterface.VaultRenameMessage'; -} -/** - * 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.clientInterface.VaultMkdirMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.VaultMkdirMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultMkdirMessage.displayName = 'proto.clientInterface.VaultMkdirMessage'; -} -/** - * 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.clientInterface.VaultPullMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.VaultPullMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultPullMessage.displayName = 'proto.clientInterface.VaultPullMessage'; -} -/** - * 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.clientInterface.VaultCloneMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.VaultCloneMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultCloneMessage.displayName = 'proto.clientInterface.VaultCloneMessage'; -} -/** - * 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.clientInterface.SecretRenameMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.SecretRenameMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.SecretRenameMessage.displayName = 'proto.clientInterface.SecretRenameMessage'; -} -/** - * 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.clientInterface.SecretMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.SecretMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.SecretMessage.displayName = 'proto.clientInterface.SecretMessage'; -} -/** - * 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.clientInterface.SecretDirectoryMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.SecretDirectoryMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.SecretDirectoryMessage.displayName = 'proto.clientInterface.SecretDirectoryMessage'; -} -/** - * 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.clientInterface.StatMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.StatMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.StatMessage.displayName = 'proto.clientInterface.StatMessage'; -} -/** - * 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.clientInterface.SetVaultPermMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.SetVaultPermMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.SetVaultPermMessage.displayName = 'proto.clientInterface.SetVaultPermMessage'; -} -/** - * 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.clientInterface.UnsetVaultPermMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.UnsetVaultPermMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.UnsetVaultPermMessage.displayName = 'proto.clientInterface.UnsetVaultPermMessage'; -} -/** - * 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.clientInterface.GetVaultPermMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.GetVaultPermMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.GetVaultPermMessage.displayName = 'proto.clientInterface.GetVaultPermMessage'; -} -/** - * 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.clientInterface.PermissionMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.PermissionMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.PermissionMessage.displayName = 'proto.clientInterface.PermissionMessage'; -} -/** - * 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.clientInterface.VaultsVersionMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.VaultsVersionMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultsVersionMessage.displayName = 'proto.clientInterface.VaultsVersionMessage'; -} -/** - * 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.clientInterface.VaultsVersionResultMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.VaultsVersionResultMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultsVersionResultMessage.displayName = 'proto.clientInterface.VaultsVersionResultMessage'; -} -/** - * 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.clientInterface.VaultsLogMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.VaultsLogMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultsLogMessage.displayName = 'proto.clientInterface.VaultsLogMessage'; -} -/** - * 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.clientInterface.VaultsLogEntryMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.VaultsLogEntryMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultsLogEntryMessage.displayName = 'proto.clientInterface.VaultsLogEntryMessage'; -} -/** - * 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.clientInterface.NodeMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.NodeMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.NodeMessage.displayName = 'proto.clientInterface.NodeMessage'; -} -/** - * 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.clientInterface.NodeAddressMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.NodeAddressMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.NodeAddressMessage.displayName = 'proto.clientInterface.NodeAddressMessage'; -} -/** - * 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.clientInterface.NodeClaimMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.NodeClaimMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.NodeClaimMessage.displayName = 'proto.clientInterface.NodeClaimMessage'; -} -/** - * 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.clientInterface.CryptoMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.CryptoMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.CryptoMessage.displayName = 'proto.clientInterface.CryptoMessage'; -} -/** - * 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.clientInterface.KeyMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.KeyMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.KeyMessage.displayName = 'proto.clientInterface.KeyMessage'; -} -/** - * 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.clientInterface.KeyPairMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.KeyPairMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.KeyPairMessage.displayName = 'proto.clientInterface.KeyPairMessage'; -} -/** - * 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.clientInterface.CertificateMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.CertificateMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.CertificateMessage.displayName = 'proto.clientInterface.CertificateMessage'; -} -/** - * 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.clientInterface.ProviderMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.ProviderMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.ProviderMessage.displayName = 'proto.clientInterface.ProviderMessage'; -} -/** - * 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.clientInterface.TokenSpecificMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.TokenSpecificMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.TokenSpecificMessage.displayName = 'proto.clientInterface.TokenSpecificMessage'; -} -/** - * 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.clientInterface.TokenMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.TokenMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.TokenMessage.displayName = 'proto.clientInterface.TokenMessage'; -} -/** - * 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.clientInterface.ProviderSearchMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.clientInterface.ProviderSearchMessage.repeatedFields_, null); -}; -goog.inherits(proto.clientInterface.ProviderSearchMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.ProviderSearchMessage.displayName = 'proto.clientInterface.ProviderSearchMessage'; -} -/** - * 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.clientInterface.IdentityInfoMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.IdentityInfoMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.IdentityInfoMessage.displayName = 'proto.clientInterface.IdentityInfoMessage'; -} -/** - * 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.clientInterface.GestaltMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.GestaltMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.GestaltMessage.displayName = 'proto.clientInterface.GestaltMessage'; -} -/** - * 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.clientInterface.GestaltGraphMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.GestaltGraphMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.GestaltGraphMessage.displayName = 'proto.clientInterface.GestaltGraphMessage'; -} -/** - * 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.clientInterface.GestaltTrustMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.GestaltTrustMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.GestaltTrustMessage.displayName = 'proto.clientInterface.GestaltTrustMessage'; -} -/** - * 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.clientInterface.ActionsMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.clientInterface.ActionsMessage.repeatedFields_, null); -}; -goog.inherits(proto.clientInterface.ActionsMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.ActionsMessage.displayName = 'proto.clientInterface.ActionsMessage'; -} -/** - * 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.clientInterface.SetActionsMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.clientInterface.SetActionsMessage.oneofGroups_); -}; -goog.inherits(proto.clientInterface.SetActionsMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.SetActionsMessage.displayName = 'proto.clientInterface.SetActionsMessage'; -} -/** - * 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.clientInterface.NotificationsMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.clientInterface.NotificationsMessage.oneofGroups_); -}; -goog.inherits(proto.clientInterface.NotificationsMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.NotificationsMessage.displayName = 'proto.clientInterface.NotificationsMessage'; -} -/** - * 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.clientInterface.NotificationsSendMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.NotificationsSendMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.NotificationsSendMessage.displayName = 'proto.clientInterface.NotificationsSendMessage'; -} -/** - * 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.clientInterface.NotificationsReadMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.NotificationsReadMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.NotificationsReadMessage.displayName = 'proto.clientInterface.NotificationsReadMessage'; -} -/** - * 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.clientInterface.NotificationsListMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.clientInterface.NotificationsListMessage.repeatedFields_, null); -}; -goog.inherits(proto.clientInterface.NotificationsListMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.NotificationsListMessage.displayName = 'proto.clientInterface.NotificationsListMessage'; -} -/** - * 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.clientInterface.GeneralTypeMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.clientInterface.GeneralTypeMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.GeneralTypeMessage.displayName = 'proto.clientInterface.GeneralTypeMessage'; -} -/** - * 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.clientInterface.VaultShareTypeMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.clientInterface.VaultShareTypeMessage.repeatedFields_, null); -}; -goog.inherits(proto.clientInterface.VaultShareTypeMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.clientInterface.VaultShareTypeMessage.displayName = 'proto.clientInterface.VaultShareTypeMessage'; -} - - - -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.clientInterface.EmptyMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.EmptyMessage.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.clientInterface.EmptyMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.EmptyMessage.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.EmptyMessage} - */ -proto.clientInterface.EmptyMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.EmptyMessage; - return proto.clientInterface.EmptyMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.EmptyMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.EmptyMessage} - */ -proto.clientInterface.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.EmptyMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.EmptyMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.EmptyMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.EmptyMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.clientInterface.StatusMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.StatusMessage.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.clientInterface.StatusMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.StatusMessage.toObject = function(includeInstance, msg) { - var f, obj = { - success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.StatusMessage} - */ -proto.clientInterface.StatusMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.StatusMessage; - return proto.clientInterface.StatusMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.StatusMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.StatusMessage} - */ -proto.clientInterface.StatusMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccess(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.StatusMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.StatusMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.StatusMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.StatusMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSuccess(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool success = 1; - * @return {boolean} - */ -proto.clientInterface.StatusMessage.prototype.getSuccess = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.clientInterface.StatusMessage} returns this - */ -proto.clientInterface.StatusMessage.prototype.setSuccess = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, 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.clientInterface.EchoMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.EchoMessage.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.clientInterface.EchoMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.EchoMessage.toObject = function(includeInstance, msg) { - var f, obj = { - challenge: 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.clientInterface.EchoMessage} - */ -proto.clientInterface.EchoMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.EchoMessage; - return proto.clientInterface.EchoMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.EchoMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.EchoMessage} - */ -proto.clientInterface.EchoMessage.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.setChallenge(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.EchoMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.EchoMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.EchoMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.EchoMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChallenge(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string challenge = 1; - * @return {string} - */ -proto.clientInterface.EchoMessage.prototype.getChallenge = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.EchoMessage} returns this - */ -proto.clientInterface.EchoMessage.prototype.setChallenge = function(value) { - return jspb.Message.setProto3StringField(this, 1, 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.clientInterface.PasswordMessage.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.clientInterface.PasswordMessage.PasswordOrFileCase = { - PASSWORD_OR_FILE_NOT_SET: 0, - PASSWORD: 1, - PASSWORD_FILE: 2 -}; - -/** - * @return {proto.clientInterface.PasswordMessage.PasswordOrFileCase} - */ -proto.clientInterface.PasswordMessage.prototype.getPasswordOrFileCase = function() { - return /** @type {proto.clientInterface.PasswordMessage.PasswordOrFileCase} */(jspb.Message.computeOneofCase(this, proto.clientInterface.PasswordMessage.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.clientInterface.PasswordMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.PasswordMessage.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.clientInterface.PasswordMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.PasswordMessage.toObject = function(includeInstance, msg) { - var f, obj = { - password: jspb.Message.getFieldWithDefault(msg, 1, ""), - passwordFile: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.PasswordMessage} - */ -proto.clientInterface.PasswordMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.PasswordMessage; - return proto.clientInterface.PasswordMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.PasswordMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.PasswordMessage} - */ -proto.clientInterface.PasswordMessage.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.setPassword(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPasswordFile(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.PasswordMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.PasswordMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.PasswordMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.PasswordMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeString( - 1, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string password = 1; - * @return {string} - */ -proto.clientInterface.PasswordMessage.prototype.getPassword = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.PasswordMessage} returns this - */ -proto.clientInterface.PasswordMessage.prototype.setPassword = function(value) { - return jspb.Message.setOneofField(this, 1, proto.clientInterface.PasswordMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.clientInterface.PasswordMessage} returns this - */ -proto.clientInterface.PasswordMessage.prototype.clearPassword = function() { - return jspb.Message.setOneofField(this, 1, proto.clientInterface.PasswordMessage.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.PasswordMessage.prototype.hasPassword = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string password_file = 2; - * @return {string} - */ -proto.clientInterface.PasswordMessage.prototype.getPasswordFile = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.PasswordMessage} returns this - */ -proto.clientInterface.PasswordMessage.prototype.setPasswordFile = function(value) { - return jspb.Message.setOneofField(this, 2, proto.clientInterface.PasswordMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.clientInterface.PasswordMessage} returns this - */ -proto.clientInterface.PasswordMessage.prototype.clearPasswordFile = function() { - return jspb.Message.setOneofField(this, 2, proto.clientInterface.PasswordMessage.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.PasswordMessage.prototype.hasPasswordFile = function() { - return jspb.Message.getField(this, 2) != 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.clientInterface.SessionTokenMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.SessionTokenMessage.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.clientInterface.SessionTokenMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SessionTokenMessage.toObject = function(includeInstance, msg) { - var f, obj = { - token: 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.clientInterface.SessionTokenMessage} - */ -proto.clientInterface.SessionTokenMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.SessionTokenMessage; - return proto.clientInterface.SessionTokenMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.SessionTokenMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.SessionTokenMessage} - */ -proto.clientInterface.SessionTokenMessage.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.setToken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.SessionTokenMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.SessionTokenMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.SessionTokenMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SessionTokenMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getToken(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string token = 1; - * @return {string} - */ -proto.clientInterface.SessionTokenMessage.prototype.getToken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.SessionTokenMessage} returns this - */ -proto.clientInterface.SessionTokenMessage.prototype.setToken = function(value) { - return jspb.Message.setProto3StringField(this, 1, 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.clientInterface.VaultListMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultListMessage.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.clientInterface.VaultListMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultListMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vaultName: jspb.Message.getFieldWithDefault(msg, 1, ""), - vaultId: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.VaultListMessage} - */ -proto.clientInterface.VaultListMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultListMessage; - return proto.clientInterface.VaultListMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultListMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultListMessage} - */ -proto.clientInterface.VaultListMessage.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.setVaultName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setVaultId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultListMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultListMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultListMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultListMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVaultName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getVaultId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string vault_name = 1; - * @return {string} - */ -proto.clientInterface.VaultListMessage.prototype.getVaultName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultListMessage} returns this - */ -proto.clientInterface.VaultListMessage.prototype.setVaultName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string vault_id = 2; - * @return {string} - */ -proto.clientInterface.VaultListMessage.prototype.getVaultId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultListMessage} returns this - */ -proto.clientInterface.VaultListMessage.prototype.setVaultId = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.VaultMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultMessage.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.clientInterface.VaultMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultMessage.toObject = function(includeInstance, msg) { - var f, obj = { - nameOrId: 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.clientInterface.VaultMessage} - */ -proto.clientInterface.VaultMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultMessage; - return proto.clientInterface.VaultMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultMessage} - */ -proto.clientInterface.VaultMessage.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.setNameOrId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNameOrId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string name_or_Id = 1; - * @return {string} - */ -proto.clientInterface.VaultMessage.prototype.getNameOrId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultMessage} returns this - */ -proto.clientInterface.VaultMessage.prototype.setNameOrId = function(value) { - return jspb.Message.setProto3StringField(this, 1, 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.clientInterface.VaultRenameMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultRenameMessage.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.clientInterface.VaultRenameMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultRenameMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - newName: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.VaultRenameMessage} - */ -proto.clientInterface.VaultRenameMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultRenameMessage; - return proto.clientInterface.VaultRenameMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultRenameMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultRenameMessage} - */ -proto.clientInterface.VaultRenameMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNewName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultRenameMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultRenameMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultRenameMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultRenameMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getNewName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.VaultRenameMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.VaultRenameMessage} returns this -*/ -proto.clientInterface.VaultRenameMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.VaultRenameMessage} returns this - */ -proto.clientInterface.VaultRenameMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.VaultRenameMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string new_name = 2; - * @return {string} - */ -proto.clientInterface.VaultRenameMessage.prototype.getNewName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultRenameMessage} returns this - */ -proto.clientInterface.VaultRenameMessage.prototype.setNewName = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.VaultMkdirMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultMkdirMessage.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.clientInterface.VaultMkdirMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultMkdirMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - dirName: jspb.Message.getFieldWithDefault(msg, 2, ""), - recursive: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.VaultMkdirMessage} - */ -proto.clientInterface.VaultMkdirMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultMkdirMessage; - return proto.clientInterface.VaultMkdirMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultMkdirMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultMkdirMessage} - */ -proto.clientInterface.VaultMkdirMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDirName(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRecursive(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultMkdirMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultMkdirMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultMkdirMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultMkdirMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getDirName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRecursive(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.VaultMkdirMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.VaultMkdirMessage} returns this -*/ -proto.clientInterface.VaultMkdirMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.VaultMkdirMessage} returns this - */ -proto.clientInterface.VaultMkdirMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.VaultMkdirMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string dir_name = 2; - * @return {string} - */ -proto.clientInterface.VaultMkdirMessage.prototype.getDirName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultMkdirMessage} returns this - */ -proto.clientInterface.VaultMkdirMessage.prototype.setDirName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool recursive = 3; - * @return {boolean} - */ -proto.clientInterface.VaultMkdirMessage.prototype.getRecursive = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.clientInterface.VaultMkdirMessage} returns this - */ -proto.clientInterface.VaultMkdirMessage.prototype.setRecursive = function(value) { - return jspb.Message.setProto3BooleanField(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.clientInterface.VaultPullMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultPullMessage.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.clientInterface.VaultPullMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultPullMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - node: (f = msg.getNode()) && proto.clientInterface.NodeMessage.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.clientInterface.VaultPullMessage} - */ -proto.clientInterface.VaultPullMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultPullMessage; - return proto.clientInterface.VaultPullMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultPullMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultPullMessage} - */ -proto.clientInterface.VaultPullMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 2: - var value = new proto.clientInterface.NodeMessage; - reader.readMessage(value,proto.clientInterface.NodeMessage.deserializeBinaryFromReader); - msg.setNode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultPullMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultPullMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultPullMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultPullMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.clientInterface.NodeMessage.serializeBinaryToWriter - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.VaultPullMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.VaultPullMessage} returns this -*/ -proto.clientInterface.VaultPullMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.VaultPullMessage} returns this - */ -proto.clientInterface.VaultPullMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.VaultPullMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional NodeMessage node = 2; - * @return {?proto.clientInterface.NodeMessage} - */ -proto.clientInterface.VaultPullMessage.prototype.getNode = function() { - return /** @type{?proto.clientInterface.NodeMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.NodeMessage, 2)); -}; - - -/** - * @param {?proto.clientInterface.NodeMessage|undefined} value - * @return {!proto.clientInterface.VaultPullMessage} returns this -*/ -proto.clientInterface.VaultPullMessage.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.VaultPullMessage} returns this - */ -proto.clientInterface.VaultPullMessage.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.VaultPullMessage.prototype.hasNode = function() { - return jspb.Message.getField(this, 2) != 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.clientInterface.VaultCloneMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultCloneMessage.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.clientInterface.VaultCloneMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultCloneMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - node: (f = msg.getNode()) && proto.clientInterface.NodeMessage.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.clientInterface.VaultCloneMessage} - */ -proto.clientInterface.VaultCloneMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultCloneMessage; - return proto.clientInterface.VaultCloneMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultCloneMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultCloneMessage} - */ -proto.clientInterface.VaultCloneMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 2: - var value = new proto.clientInterface.NodeMessage; - reader.readMessage(value,proto.clientInterface.NodeMessage.deserializeBinaryFromReader); - msg.setNode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultCloneMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultCloneMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultCloneMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultCloneMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.clientInterface.NodeMessage.serializeBinaryToWriter - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.VaultCloneMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.VaultCloneMessage} returns this -*/ -proto.clientInterface.VaultCloneMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.VaultCloneMessage} returns this - */ -proto.clientInterface.VaultCloneMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.VaultCloneMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional NodeMessage node = 2; - * @return {?proto.clientInterface.NodeMessage} - */ -proto.clientInterface.VaultCloneMessage.prototype.getNode = function() { - return /** @type{?proto.clientInterface.NodeMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.NodeMessage, 2)); -}; - - -/** - * @param {?proto.clientInterface.NodeMessage|undefined} value - * @return {!proto.clientInterface.VaultCloneMessage} returns this -*/ -proto.clientInterface.VaultCloneMessage.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.VaultCloneMessage} returns this - */ -proto.clientInterface.VaultCloneMessage.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.VaultCloneMessage.prototype.hasNode = function() { - return jspb.Message.getField(this, 2) != 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.clientInterface.SecretRenameMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.SecretRenameMessage.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.clientInterface.SecretRenameMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SecretRenameMessage.toObject = function(includeInstance, msg) { - var f, obj = { - oldSecret: (f = msg.getOldSecret()) && proto.clientInterface.SecretMessage.toObject(includeInstance, f), - newName: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.SecretRenameMessage} - */ -proto.clientInterface.SecretRenameMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.SecretRenameMessage; - return proto.clientInterface.SecretRenameMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.SecretRenameMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.SecretRenameMessage} - */ -proto.clientInterface.SecretRenameMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.SecretMessage; - reader.readMessage(value,proto.clientInterface.SecretMessage.deserializeBinaryFromReader); - msg.setOldSecret(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNewName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.SecretRenameMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.SecretRenameMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.SecretRenameMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SecretRenameMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOldSecret(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.SecretMessage.serializeBinaryToWriter - ); - } - f = message.getNewName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional SecretMessage old_secret = 1; - * @return {?proto.clientInterface.SecretMessage} - */ -proto.clientInterface.SecretRenameMessage.prototype.getOldSecret = function() { - return /** @type{?proto.clientInterface.SecretMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.SecretMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.SecretMessage|undefined} value - * @return {!proto.clientInterface.SecretRenameMessage} returns this -*/ -proto.clientInterface.SecretRenameMessage.prototype.setOldSecret = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.SecretRenameMessage} returns this - */ -proto.clientInterface.SecretRenameMessage.prototype.clearOldSecret = function() { - return this.setOldSecret(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.SecretRenameMessage.prototype.hasOldSecret = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string new_name = 2; - * @return {string} - */ -proto.clientInterface.SecretRenameMessage.prototype.getNewName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.SecretRenameMessage} returns this - */ -proto.clientInterface.SecretRenameMessage.prototype.setNewName = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.SecretMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.SecretMessage.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.clientInterface.SecretMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SecretMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - secretName: jspb.Message.getFieldWithDefault(msg, 2, ""), - secretContent: msg.getSecretContent_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.SecretMessage} - */ -proto.clientInterface.SecretMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.SecretMessage; - return proto.clientInterface.SecretMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.SecretMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.SecretMessage} - */ -proto.clientInterface.SecretMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSecretName(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSecretContent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.SecretMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.SecretMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.SecretMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SecretMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getSecretName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSecretContent_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.SecretMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.SecretMessage} returns this -*/ -proto.clientInterface.SecretMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.SecretMessage} returns this - */ -proto.clientInterface.SecretMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.SecretMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string secret_name = 2; - * @return {string} - */ -proto.clientInterface.SecretMessage.prototype.getSecretName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.SecretMessage} returns this - */ -proto.clientInterface.SecretMessage.prototype.setSecretName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bytes secret_content = 3; - * @return {!(string|Uint8Array)} - */ -proto.clientInterface.SecretMessage.prototype.getSecretContent = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes secret_content = 3; - * This is a type-conversion wrapper around `getSecretContent()` - * @return {string} - */ -proto.clientInterface.SecretMessage.prototype.getSecretContent_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSecretContent())); -}; - - -/** - * optional bytes secret_content = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSecretContent()` - * @return {!Uint8Array} - */ -proto.clientInterface.SecretMessage.prototype.getSecretContent_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSecretContent())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.clientInterface.SecretMessage} returns this - */ -proto.clientInterface.SecretMessage.prototype.setSecretContent = function(value) { - return jspb.Message.setProto3BytesField(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.clientInterface.SecretDirectoryMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.SecretDirectoryMessage.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.clientInterface.SecretDirectoryMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SecretDirectoryMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - secretDirectory: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.SecretDirectoryMessage} - */ -proto.clientInterface.SecretDirectoryMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.SecretDirectoryMessage; - return proto.clientInterface.SecretDirectoryMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.SecretDirectoryMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.SecretDirectoryMessage} - */ -proto.clientInterface.SecretDirectoryMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSecretDirectory(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.SecretDirectoryMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.SecretDirectoryMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.SecretDirectoryMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SecretDirectoryMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getSecretDirectory(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.SecretDirectoryMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.SecretDirectoryMessage} returns this -*/ -proto.clientInterface.SecretDirectoryMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.SecretDirectoryMessage} returns this - */ -proto.clientInterface.SecretDirectoryMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.SecretDirectoryMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string secret_directory = 2; - * @return {string} - */ -proto.clientInterface.SecretDirectoryMessage.prototype.getSecretDirectory = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.SecretDirectoryMessage} returns this - */ -proto.clientInterface.SecretDirectoryMessage.prototype.setSecretDirectory = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.StatMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.StatMessage.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.clientInterface.StatMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.StatMessage.toObject = function(includeInstance, msg) { - var f, obj = { - stats: 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.clientInterface.StatMessage} - */ -proto.clientInterface.StatMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.StatMessage; - return proto.clientInterface.StatMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.StatMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.StatMessage} - */ -proto.clientInterface.StatMessage.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.setStats(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.StatMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.StatMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.StatMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.StatMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStats(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string stats = 1; - * @return {string} - */ -proto.clientInterface.StatMessage.prototype.getStats = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.StatMessage} returns this - */ -proto.clientInterface.StatMessage.prototype.setStats = function(value) { - return jspb.Message.setProto3StringField(this, 1, 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.clientInterface.SetVaultPermMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.SetVaultPermMessage.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.clientInterface.SetVaultPermMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SetVaultPermMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - node: (f = msg.getNode()) && proto.clientInterface.NodeMessage.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.clientInterface.SetVaultPermMessage} - */ -proto.clientInterface.SetVaultPermMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.SetVaultPermMessage; - return proto.clientInterface.SetVaultPermMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.SetVaultPermMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.SetVaultPermMessage} - */ -proto.clientInterface.SetVaultPermMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 2: - var value = new proto.clientInterface.NodeMessage; - reader.readMessage(value,proto.clientInterface.NodeMessage.deserializeBinaryFromReader); - msg.setNode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.SetVaultPermMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.SetVaultPermMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.SetVaultPermMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SetVaultPermMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.clientInterface.NodeMessage.serializeBinaryToWriter - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.SetVaultPermMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.SetVaultPermMessage} returns this -*/ -proto.clientInterface.SetVaultPermMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.SetVaultPermMessage} returns this - */ -proto.clientInterface.SetVaultPermMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.SetVaultPermMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional NodeMessage node = 2; - * @return {?proto.clientInterface.NodeMessage} - */ -proto.clientInterface.SetVaultPermMessage.prototype.getNode = function() { - return /** @type{?proto.clientInterface.NodeMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.NodeMessage, 2)); -}; - - -/** - * @param {?proto.clientInterface.NodeMessage|undefined} value - * @return {!proto.clientInterface.SetVaultPermMessage} returns this -*/ -proto.clientInterface.SetVaultPermMessage.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.SetVaultPermMessage} returns this - */ -proto.clientInterface.SetVaultPermMessage.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.SetVaultPermMessage.prototype.hasNode = function() { - return jspb.Message.getField(this, 2) != 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.clientInterface.UnsetVaultPermMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.UnsetVaultPermMessage.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.clientInterface.UnsetVaultPermMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.UnsetVaultPermMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - node: (f = msg.getNode()) && proto.clientInterface.NodeMessage.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.clientInterface.UnsetVaultPermMessage} - */ -proto.clientInterface.UnsetVaultPermMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.UnsetVaultPermMessage; - return proto.clientInterface.UnsetVaultPermMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.UnsetVaultPermMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.UnsetVaultPermMessage} - */ -proto.clientInterface.UnsetVaultPermMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 2: - var value = new proto.clientInterface.NodeMessage; - reader.readMessage(value,proto.clientInterface.NodeMessage.deserializeBinaryFromReader); - msg.setNode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.UnsetVaultPermMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.UnsetVaultPermMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.UnsetVaultPermMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.UnsetVaultPermMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.clientInterface.NodeMessage.serializeBinaryToWriter - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.UnsetVaultPermMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.UnsetVaultPermMessage} returns this -*/ -proto.clientInterface.UnsetVaultPermMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.UnsetVaultPermMessage} returns this - */ -proto.clientInterface.UnsetVaultPermMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.UnsetVaultPermMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional NodeMessage node = 2; - * @return {?proto.clientInterface.NodeMessage} - */ -proto.clientInterface.UnsetVaultPermMessage.prototype.getNode = function() { - return /** @type{?proto.clientInterface.NodeMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.NodeMessage, 2)); -}; - - -/** - * @param {?proto.clientInterface.NodeMessage|undefined} value - * @return {!proto.clientInterface.UnsetVaultPermMessage} returns this -*/ -proto.clientInterface.UnsetVaultPermMessage.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.UnsetVaultPermMessage} returns this - */ -proto.clientInterface.UnsetVaultPermMessage.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.UnsetVaultPermMessage.prototype.hasNode = function() { - return jspb.Message.getField(this, 2) != 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.clientInterface.GetVaultPermMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.GetVaultPermMessage.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.clientInterface.GetVaultPermMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.GetVaultPermMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - node: (f = msg.getNode()) && proto.clientInterface.NodeMessage.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.clientInterface.GetVaultPermMessage} - */ -proto.clientInterface.GetVaultPermMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.GetVaultPermMessage; - return proto.clientInterface.GetVaultPermMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.GetVaultPermMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.GetVaultPermMessage} - */ -proto.clientInterface.GetVaultPermMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 2: - var value = new proto.clientInterface.NodeMessage; - reader.readMessage(value,proto.clientInterface.NodeMessage.deserializeBinaryFromReader); - msg.setNode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.GetVaultPermMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.GetVaultPermMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.GetVaultPermMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.GetVaultPermMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.clientInterface.NodeMessage.serializeBinaryToWriter - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.GetVaultPermMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.GetVaultPermMessage} returns this -*/ -proto.clientInterface.GetVaultPermMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.GetVaultPermMessage} returns this - */ -proto.clientInterface.GetVaultPermMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.GetVaultPermMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional NodeMessage node = 2; - * @return {?proto.clientInterface.NodeMessage} - */ -proto.clientInterface.GetVaultPermMessage.prototype.getNode = function() { - return /** @type{?proto.clientInterface.NodeMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.NodeMessage, 2)); -}; - - -/** - * @param {?proto.clientInterface.NodeMessage|undefined} value - * @return {!proto.clientInterface.GetVaultPermMessage} returns this -*/ -proto.clientInterface.GetVaultPermMessage.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.GetVaultPermMessage} returns this - */ -proto.clientInterface.GetVaultPermMessage.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.GetVaultPermMessage.prototype.hasNode = function() { - return jspb.Message.getField(this, 2) != 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.clientInterface.PermissionMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.PermissionMessage.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.clientInterface.PermissionMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.PermissionMessage.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - action: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.PermissionMessage} - */ -proto.clientInterface.PermissionMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.PermissionMessage; - return proto.clientInterface.PermissionMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.PermissionMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.PermissionMessage} - */ -proto.clientInterface.PermissionMessage.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.setNodeId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.PermissionMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.PermissionMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.PermissionMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.PermissionMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAction(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.clientInterface.PermissionMessage.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.PermissionMessage} returns this - */ -proto.clientInterface.PermissionMessage.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string action = 2; - * @return {string} - */ -proto.clientInterface.PermissionMessage.prototype.getAction = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.PermissionMessage} returns this - */ -proto.clientInterface.PermissionMessage.prototype.setAction = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.VaultsVersionMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultsVersionMessage.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.clientInterface.VaultsVersionMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultsVersionMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - versionId: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.VaultsVersionMessage} - */ -proto.clientInterface.VaultsVersionMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultsVersionMessage; - return proto.clientInterface.VaultsVersionMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultsVersionMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultsVersionMessage} - */ -proto.clientInterface.VaultsVersionMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setVersionId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultsVersionMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultsVersionMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultsVersionMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultsVersionMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getVersionId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.VaultsVersionMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.VaultsVersionMessage} returns this -*/ -proto.clientInterface.VaultsVersionMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.VaultsVersionMessage} returns this - */ -proto.clientInterface.VaultsVersionMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.VaultsVersionMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string version_id = 2; - * @return {string} - */ -proto.clientInterface.VaultsVersionMessage.prototype.getVersionId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultsVersionMessage} returns this - */ -proto.clientInterface.VaultsVersionMessage.prototype.setVersionId = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.VaultsVersionResultMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultsVersionResultMessage.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.clientInterface.VaultsVersionResultMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultsVersionResultMessage.toObject = function(includeInstance, msg) { - var f, obj = { - isLatestVersion: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.VaultsVersionResultMessage} - */ -proto.clientInterface.VaultsVersionResultMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultsVersionResultMessage; - return proto.clientInterface.VaultsVersionResultMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultsVersionResultMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultsVersionResultMessage} - */ -proto.clientInterface.VaultsVersionResultMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsLatestVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultsVersionResultMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultsVersionResultMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultsVersionResultMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultsVersionResultMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIsLatestVersion(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool is_latest_version = 1; - * @return {boolean} - */ -proto.clientInterface.VaultsVersionResultMessage.prototype.getIsLatestVersion = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.clientInterface.VaultsVersionResultMessage} returns this - */ -proto.clientInterface.VaultsVersionResultMessage.prototype.setIsLatestVersion = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, 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.clientInterface.VaultsLogMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultsLogMessage.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.clientInterface.VaultsLogMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultsLogMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vault: (f = msg.getVault()) && proto.clientInterface.VaultMessage.toObject(includeInstance, f), - logDepth: jspb.Message.getFieldWithDefault(msg, 3, 0), - commitId: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.VaultsLogMessage} - */ -proto.clientInterface.VaultsLogMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultsLogMessage; - return proto.clientInterface.VaultsLogMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultsLogMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultsLogMessage} - */ -proto.clientInterface.VaultsLogMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.VaultMessage; - reader.readMessage(value,proto.clientInterface.VaultMessage.deserializeBinaryFromReader); - msg.setVault(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setLogDepth(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setCommitId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultsLogMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultsLogMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultsLogMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultsLogMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVault(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.VaultMessage.serializeBinaryToWriter - ); - } - f = message.getLogDepth(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getCommitId(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional VaultMessage vault = 1; - * @return {?proto.clientInterface.VaultMessage} - */ -proto.clientInterface.VaultsLogMessage.prototype.getVault = function() { - return /** @type{?proto.clientInterface.VaultMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.VaultMessage|undefined} value - * @return {!proto.clientInterface.VaultsLogMessage} returns this -*/ -proto.clientInterface.VaultsLogMessage.prototype.setVault = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.VaultsLogMessage} returns this - */ -proto.clientInterface.VaultsLogMessage.prototype.clearVault = function() { - return this.setVault(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.VaultsLogMessage.prototype.hasVault = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int32 log_depth = 3; - * @return {number} - */ -proto.clientInterface.VaultsLogMessage.prototype.getLogDepth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.clientInterface.VaultsLogMessage} returns this - */ -proto.clientInterface.VaultsLogMessage.prototype.setLogDepth = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional string commit_id = 4; - * @return {string} - */ -proto.clientInterface.VaultsLogMessage.prototype.getCommitId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultsLogMessage} returns this - */ -proto.clientInterface.VaultsLogMessage.prototype.setCommitId = function(value) { - return jspb.Message.setProto3StringField(this, 4, 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.clientInterface.VaultsLogEntryMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultsLogEntryMessage.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.clientInterface.VaultsLogEntryMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultsLogEntryMessage.toObject = function(includeInstance, msg) { - var f, obj = { - oid: jspb.Message.getFieldWithDefault(msg, 1, ""), - committer: jspb.Message.getFieldWithDefault(msg, 2, ""), - timeStamp: jspb.Message.getFieldWithDefault(msg, 4, 0), - message: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.VaultsLogEntryMessage} - */ -proto.clientInterface.VaultsLogEntryMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultsLogEntryMessage; - return proto.clientInterface.VaultsLogEntryMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultsLogEntryMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultsLogEntryMessage} - */ -proto.clientInterface.VaultsLogEntryMessage.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.setOid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCommitter(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimeStamp(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultsLogEntryMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultsLogEntryMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultsLogEntryMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultsLogEntryMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCommitter(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTimeStamp(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string oid = 1; - * @return {string} - */ -proto.clientInterface.VaultsLogEntryMessage.prototype.getOid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultsLogEntryMessage} returns this - */ -proto.clientInterface.VaultsLogEntryMessage.prototype.setOid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string committer = 2; - * @return {string} - */ -proto.clientInterface.VaultsLogEntryMessage.prototype.getCommitter = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultsLogEntryMessage} returns this - */ -proto.clientInterface.VaultsLogEntryMessage.prototype.setCommitter = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional uint64 time_stamp = 4; - * @return {number} - */ -proto.clientInterface.VaultsLogEntryMessage.prototype.getTimeStamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.clientInterface.VaultsLogEntryMessage} returns this - */ -proto.clientInterface.VaultsLogEntryMessage.prototype.setTimeStamp = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string message = 3; - * @return {string} - */ -proto.clientInterface.VaultsLogEntryMessage.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultsLogEntryMessage} returns this - */ -proto.clientInterface.VaultsLogEntryMessage.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(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.clientInterface.NodeMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.NodeMessage.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.clientInterface.NodeMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NodeMessage.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: 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.clientInterface.NodeMessage} - */ -proto.clientInterface.NodeMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.NodeMessage; - return proto.clientInterface.NodeMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.NodeMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.NodeMessage} - */ -proto.clientInterface.NodeMessage.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.setNodeId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.NodeMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.NodeMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.NodeMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NodeMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.clientInterface.NodeMessage.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.NodeMessage} returns this - */ -proto.clientInterface.NodeMessage.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, 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.clientInterface.NodeAddressMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.NodeAddressMessage.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.clientInterface.NodeAddressMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NodeAddressMessage.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - host: jspb.Message.getFieldWithDefault(msg, 2, ""), - port: 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.clientInterface.NodeAddressMessage} - */ -proto.clientInterface.NodeAddressMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.NodeAddressMessage; - return proto.clientInterface.NodeAddressMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.NodeAddressMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.NodeAddressMessage} - */ -proto.clientInterface.NodeAddressMessage.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.setNodeId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setHost(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPort(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.NodeAddressMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.NodeAddressMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.NodeAddressMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NodeAddressMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHost(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPort(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.clientInterface.NodeAddressMessage.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.NodeAddressMessage} returns this - */ -proto.clientInterface.NodeAddressMessage.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string host = 2; - * @return {string} - */ -proto.clientInterface.NodeAddressMessage.prototype.getHost = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.NodeAddressMessage} returns this - */ -proto.clientInterface.NodeAddressMessage.prototype.setHost = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int32 port = 3; - * @return {number} - */ -proto.clientInterface.NodeAddressMessage.prototype.getPort = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.clientInterface.NodeAddressMessage} returns this - */ -proto.clientInterface.NodeAddressMessage.prototype.setPort = function(value) { - return jspb.Message.setProto3IntField(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.clientInterface.NodeClaimMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.NodeClaimMessage.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.clientInterface.NodeClaimMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NodeClaimMessage.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - forceInvite: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.NodeClaimMessage} - */ -proto.clientInterface.NodeClaimMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.NodeClaimMessage; - return proto.clientInterface.NodeClaimMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.NodeClaimMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.NodeClaimMessage} - */ -proto.clientInterface.NodeClaimMessage.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.setNodeId(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setForceInvite(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.NodeClaimMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.NodeClaimMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.NodeClaimMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NodeClaimMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getForceInvite(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.clientInterface.NodeClaimMessage.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.NodeClaimMessage} returns this - */ -proto.clientInterface.NodeClaimMessage.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bool force_invite = 2; - * @return {boolean} - */ -proto.clientInterface.NodeClaimMessage.prototype.getForceInvite = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.clientInterface.NodeClaimMessage} returns this - */ -proto.clientInterface.NodeClaimMessage.prototype.setForceInvite = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, 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.clientInterface.CryptoMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.CryptoMessage.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.clientInterface.CryptoMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.CryptoMessage.toObject = function(includeInstance, msg) { - var f, obj = { - data: jspb.Message.getFieldWithDefault(msg, 1, ""), - signature: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.CryptoMessage} - */ -proto.clientInterface.CryptoMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.CryptoMessage; - return proto.clientInterface.CryptoMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.CryptoMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.CryptoMessage} - */ -proto.clientInterface.CryptoMessage.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.setData(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.CryptoMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.CryptoMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.CryptoMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.CryptoMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string data = 1; - * @return {string} - */ -proto.clientInterface.CryptoMessage.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.CryptoMessage} returns this - */ -proto.clientInterface.CryptoMessage.prototype.setData = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string signature = 2; - * @return {string} - */ -proto.clientInterface.CryptoMessage.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.CryptoMessage} returns this - */ -proto.clientInterface.CryptoMessage.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.KeyMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.KeyMessage.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.clientInterface.KeyMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.KeyMessage.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - key: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.KeyMessage} - */ -proto.clientInterface.KeyMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.KeyMessage; - return proto.clientInterface.KeyMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.KeyMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.KeyMessage} - */ -proto.clientInterface.KeyMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.KeyMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.KeyMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.KeyMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.KeyMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getKey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.clientInterface.KeyMessage.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.KeyMessage} returns this - */ -proto.clientInterface.KeyMessage.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string key = 2; - * @return {string} - */ -proto.clientInterface.KeyMessage.prototype.getKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.KeyMessage} returns this - */ -proto.clientInterface.KeyMessage.prototype.setKey = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.KeyPairMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.KeyPairMessage.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.clientInterface.KeyPairMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.KeyPairMessage.toObject = function(includeInstance, msg) { - var f, obj = { - pb_public: jspb.Message.getFieldWithDefault(msg, 1, ""), - pb_private: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.KeyPairMessage} - */ -proto.clientInterface.KeyPairMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.KeyPairMessage; - return proto.clientInterface.KeyPairMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.KeyPairMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.KeyPairMessage} - */ -proto.clientInterface.KeyPairMessage.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.setPublic(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPrivate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.KeyPairMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.KeyPairMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.KeyPairMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.KeyPairMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPublic(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPrivate(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string public = 1; - * @return {string} - */ -proto.clientInterface.KeyPairMessage.prototype.getPublic = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.KeyPairMessage} returns this - */ -proto.clientInterface.KeyPairMessage.prototype.setPublic = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string private = 2; - * @return {string} - */ -proto.clientInterface.KeyPairMessage.prototype.getPrivate = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.KeyPairMessage} returns this - */ -proto.clientInterface.KeyPairMessage.prototype.setPrivate = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.CertificateMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.CertificateMessage.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.clientInterface.CertificateMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.CertificateMessage.toObject = function(includeInstance, msg) { - var f, obj = { - cert: 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.clientInterface.CertificateMessage} - */ -proto.clientInterface.CertificateMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.CertificateMessage; - return proto.clientInterface.CertificateMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.CertificateMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.CertificateMessage} - */ -proto.clientInterface.CertificateMessage.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.setCert(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.CertificateMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.CertificateMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.CertificateMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.CertificateMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCert(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string cert = 1; - * @return {string} - */ -proto.clientInterface.CertificateMessage.prototype.getCert = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.CertificateMessage} returns this - */ -proto.clientInterface.CertificateMessage.prototype.setCert = function(value) { - return jspb.Message.setProto3StringField(this, 1, 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.clientInterface.ProviderMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.ProviderMessage.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.clientInterface.ProviderMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.ProviderMessage.toObject = function(includeInstance, msg) { - var f, obj = { - providerId: jspb.Message.getFieldWithDefault(msg, 1, ""), - message: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.ProviderMessage} - */ -proto.clientInterface.ProviderMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.ProviderMessage; - return proto.clientInterface.ProviderMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.ProviderMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.ProviderMessage} - */ -proto.clientInterface.ProviderMessage.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.setProviderId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.ProviderMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.ProviderMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.ProviderMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.ProviderMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProviderId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string provider_id = 1; - * @return {string} - */ -proto.clientInterface.ProviderMessage.prototype.getProviderId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.ProviderMessage} returns this - */ -proto.clientInterface.ProviderMessage.prototype.setProviderId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.clientInterface.ProviderMessage.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.ProviderMessage} returns this - */ -proto.clientInterface.ProviderMessage.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.TokenSpecificMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.TokenSpecificMessage.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.clientInterface.TokenSpecificMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.TokenSpecificMessage.toObject = function(includeInstance, msg) { - var f, obj = { - provider: (f = msg.getProvider()) && proto.clientInterface.ProviderMessage.toObject(includeInstance, f), - token: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.TokenSpecificMessage} - */ -proto.clientInterface.TokenSpecificMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.TokenSpecificMessage; - return proto.clientInterface.TokenSpecificMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.TokenSpecificMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.TokenSpecificMessage} - */ -proto.clientInterface.TokenSpecificMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.ProviderMessage; - reader.readMessage(value,proto.clientInterface.ProviderMessage.deserializeBinaryFromReader); - msg.setProvider(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setToken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.TokenSpecificMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.TokenSpecificMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.TokenSpecificMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.TokenSpecificMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProvider(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.ProviderMessage.serializeBinaryToWriter - ); - } - f = message.getToken(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional ProviderMessage provider = 1; - * @return {?proto.clientInterface.ProviderMessage} - */ -proto.clientInterface.TokenSpecificMessage.prototype.getProvider = function() { - return /** @type{?proto.clientInterface.ProviderMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.ProviderMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.ProviderMessage|undefined} value - * @return {!proto.clientInterface.TokenSpecificMessage} returns this -*/ -proto.clientInterface.TokenSpecificMessage.prototype.setProvider = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.TokenSpecificMessage} returns this - */ -proto.clientInterface.TokenSpecificMessage.prototype.clearProvider = function() { - return this.setProvider(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.TokenSpecificMessage.prototype.hasProvider = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string token = 2; - * @return {string} - */ -proto.clientInterface.TokenSpecificMessage.prototype.getToken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.TokenSpecificMessage} returns this - */ -proto.clientInterface.TokenSpecificMessage.prototype.setToken = function(value) { - return jspb.Message.setProto3StringField(this, 2, 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.clientInterface.TokenMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.TokenMessage.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.clientInterface.TokenMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.TokenMessage.toObject = function(includeInstance, msg) { - var f, obj = { - token: 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.clientInterface.TokenMessage} - */ -proto.clientInterface.TokenMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.TokenMessage; - return proto.clientInterface.TokenMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.TokenMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.TokenMessage} - */ -proto.clientInterface.TokenMessage.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.setToken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.TokenMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.TokenMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.TokenMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.TokenMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getToken(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string token = 1; - * @return {string} - */ -proto.clientInterface.TokenMessage.prototype.getToken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.TokenMessage} returns this - */ -proto.clientInterface.TokenMessage.prototype.setToken = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.clientInterface.ProviderSearchMessage.repeatedFields_ = [2]; - - - -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.clientInterface.ProviderSearchMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.ProviderSearchMessage.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.clientInterface.ProviderSearchMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.ProviderSearchMessage.toObject = function(includeInstance, msg) { - var f, obj = { - provider: (f = msg.getProvider()) && proto.clientInterface.ProviderMessage.toObject(includeInstance, f), - searchTermList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : 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.clientInterface.ProviderSearchMessage} - */ -proto.clientInterface.ProviderSearchMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.ProviderSearchMessage; - return proto.clientInterface.ProviderSearchMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.ProviderSearchMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.ProviderSearchMessage} - */ -proto.clientInterface.ProviderSearchMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.ProviderMessage; - reader.readMessage(value,proto.clientInterface.ProviderMessage.deserializeBinaryFromReader); - msg.setProvider(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addSearchTerm(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.ProviderSearchMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.ProviderSearchMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.ProviderSearchMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.ProviderSearchMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProvider(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.ProviderMessage.serializeBinaryToWriter - ); - } - f = message.getSearchTermList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } -}; - - -/** - * optional ProviderMessage provider = 1; - * @return {?proto.clientInterface.ProviderMessage} - */ -proto.clientInterface.ProviderSearchMessage.prototype.getProvider = function() { - return /** @type{?proto.clientInterface.ProviderMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.ProviderMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.ProviderMessage|undefined} value - * @return {!proto.clientInterface.ProviderSearchMessage} returns this -*/ -proto.clientInterface.ProviderSearchMessage.prototype.setProvider = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.ProviderSearchMessage} returns this - */ -proto.clientInterface.ProviderSearchMessage.prototype.clearProvider = function() { - return this.setProvider(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.ProviderSearchMessage.prototype.hasProvider = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated string search_term = 2; - * @return {!Array} - */ -proto.clientInterface.ProviderSearchMessage.prototype.getSearchTermList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.clientInterface.ProviderSearchMessage} returns this - */ -proto.clientInterface.ProviderSearchMessage.prototype.setSearchTermList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.clientInterface.ProviderSearchMessage} returns this - */ -proto.clientInterface.ProviderSearchMessage.prototype.addSearchTerm = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.clientInterface.ProviderSearchMessage} returns this - */ -proto.clientInterface.ProviderSearchMessage.prototype.clearSearchTermList = function() { - return this.setSearchTermList([]); -}; - - - - - -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.clientInterface.IdentityInfoMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.IdentityInfoMessage.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.clientInterface.IdentityInfoMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.IdentityInfoMessage.toObject = function(includeInstance, msg) { - var f, obj = { - provider: (f = msg.getProvider()) && proto.clientInterface.ProviderMessage.toObject(includeInstance, f), - name: jspb.Message.getFieldWithDefault(msg, 3, ""), - email: jspb.Message.getFieldWithDefault(msg, 4, ""), - url: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.IdentityInfoMessage} - */ -proto.clientInterface.IdentityInfoMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.IdentityInfoMessage; - return proto.clientInterface.IdentityInfoMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.IdentityInfoMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.IdentityInfoMessage} - */ -proto.clientInterface.IdentityInfoMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.ProviderMessage; - reader.readMessage(value,proto.clientInterface.ProviderMessage.deserializeBinaryFromReader); - msg.setProvider(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setEmail(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.IdentityInfoMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.IdentityInfoMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.IdentityInfoMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.IdentityInfoMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProvider(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.ProviderMessage.serializeBinaryToWriter - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getEmail(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional ProviderMessage provider = 1; - * @return {?proto.clientInterface.ProviderMessage} - */ -proto.clientInterface.IdentityInfoMessage.prototype.getProvider = function() { - return /** @type{?proto.clientInterface.ProviderMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.ProviderMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.ProviderMessage|undefined} value - * @return {!proto.clientInterface.IdentityInfoMessage} returns this -*/ -proto.clientInterface.IdentityInfoMessage.prototype.setProvider = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.IdentityInfoMessage} returns this - */ -proto.clientInterface.IdentityInfoMessage.prototype.clearProvider = function() { - return this.setProvider(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.IdentityInfoMessage.prototype.hasProvider = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string name = 3; - * @return {string} - */ -proto.clientInterface.IdentityInfoMessage.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.IdentityInfoMessage} returns this - */ -proto.clientInterface.IdentityInfoMessage.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string email = 4; - * @return {string} - */ -proto.clientInterface.IdentityInfoMessage.prototype.getEmail = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.IdentityInfoMessage} returns this - */ -proto.clientInterface.IdentityInfoMessage.prototype.setEmail = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string url = 5; - * @return {string} - */ -proto.clientInterface.IdentityInfoMessage.prototype.getUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.IdentityInfoMessage} returns this - */ -proto.clientInterface.IdentityInfoMessage.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 5, 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.clientInterface.GestaltMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.GestaltMessage.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.clientInterface.GestaltMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.GestaltMessage.toObject = function(includeInstance, msg) { - var f, obj = { - name: 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.clientInterface.GestaltMessage} - */ -proto.clientInterface.GestaltMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.GestaltMessage; - return proto.clientInterface.GestaltMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.GestaltMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.GestaltMessage} - */ -proto.clientInterface.GestaltMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.GestaltMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.GestaltMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.GestaltMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.GestaltMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.clientInterface.GestaltMessage.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.GestaltMessage} returns this - */ -proto.clientInterface.GestaltMessage.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, 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.clientInterface.GestaltGraphMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.GestaltGraphMessage.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.clientInterface.GestaltGraphMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.GestaltGraphMessage.toObject = function(includeInstance, msg) { - var f, obj = { - gestaltGraph: 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.clientInterface.GestaltGraphMessage} - */ -proto.clientInterface.GestaltGraphMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.GestaltGraphMessage; - return proto.clientInterface.GestaltGraphMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.GestaltGraphMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.GestaltGraphMessage} - */ -proto.clientInterface.GestaltGraphMessage.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.setGestaltGraph(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.GestaltGraphMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.GestaltGraphMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.GestaltGraphMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.GestaltGraphMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGestaltGraph(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string gestalt_graph = 1; - * @return {string} - */ -proto.clientInterface.GestaltGraphMessage.prototype.getGestaltGraph = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.GestaltGraphMessage} returns this - */ -proto.clientInterface.GestaltGraphMessage.prototype.setGestaltGraph = function(value) { - return jspb.Message.setProto3StringField(this, 1, 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.clientInterface.GestaltTrustMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.GestaltTrustMessage.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.clientInterface.GestaltTrustMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.GestaltTrustMessage.toObject = function(includeInstance, msg) { - var f, obj = { - provider: jspb.Message.getFieldWithDefault(msg, 1, ""), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - set: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.GestaltTrustMessage} - */ -proto.clientInterface.GestaltTrustMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.GestaltTrustMessage; - return proto.clientInterface.GestaltTrustMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.GestaltTrustMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.GestaltTrustMessage} - */ -proto.clientInterface.GestaltTrustMessage.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.setProvider(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSet(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.GestaltTrustMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.GestaltTrustMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.GestaltTrustMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.GestaltTrustMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProvider(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSet(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional string provider = 1; - * @return {string} - */ -proto.clientInterface.GestaltTrustMessage.prototype.getProvider = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.GestaltTrustMessage} returns this - */ -proto.clientInterface.GestaltTrustMessage.prototype.setProvider = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.clientInterface.GestaltTrustMessage.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.GestaltTrustMessage} returns this - */ -proto.clientInterface.GestaltTrustMessage.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool set = 3; - * @return {boolean} - */ -proto.clientInterface.GestaltTrustMessage.prototype.getSet = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.clientInterface.GestaltTrustMessage} returns this - */ -proto.clientInterface.GestaltTrustMessage.prototype.setSet = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.clientInterface.ActionsMessage.repeatedFields_ = [1]; - - - -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.clientInterface.ActionsMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.ActionsMessage.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.clientInterface.ActionsMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.ActionsMessage.toObject = function(includeInstance, msg) { - var f, obj = { - actionList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.clientInterface.ActionsMessage} - */ -proto.clientInterface.ActionsMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.ActionsMessage; - return proto.clientInterface.ActionsMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.ActionsMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.ActionsMessage} - */ -proto.clientInterface.ActionsMessage.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.addAction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.ActionsMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.ActionsMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.ActionsMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.ActionsMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getActionList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string action = 1; - * @return {!Array} - */ -proto.clientInterface.ActionsMessage.prototype.getActionList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.clientInterface.ActionsMessage} returns this - */ -proto.clientInterface.ActionsMessage.prototype.setActionList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.clientInterface.ActionsMessage} returns this - */ -proto.clientInterface.ActionsMessage.prototype.addAction = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.clientInterface.ActionsMessage} returns this - */ -proto.clientInterface.ActionsMessage.prototype.clearActionList = function() { - return this.setActionList([]); -}; - - - -/** - * 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.clientInterface.SetActionsMessage.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.clientInterface.SetActionsMessage.NodeOrProviderCase = { - NODE_OR_PROVIDER_NOT_SET: 0, - NODE: 1, - IDENTITY: 2 -}; - -/** - * @return {proto.clientInterface.SetActionsMessage.NodeOrProviderCase} - */ -proto.clientInterface.SetActionsMessage.prototype.getNodeOrProviderCase = function() { - return /** @type {proto.clientInterface.SetActionsMessage.NodeOrProviderCase} */(jspb.Message.computeOneofCase(this, proto.clientInterface.SetActionsMessage.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.clientInterface.SetActionsMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.SetActionsMessage.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.clientInterface.SetActionsMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SetActionsMessage.toObject = function(includeInstance, msg) { - var f, obj = { - node: (f = msg.getNode()) && proto.clientInterface.NodeMessage.toObject(includeInstance, f), - identity: (f = msg.getIdentity()) && proto.clientInterface.ProviderMessage.toObject(includeInstance, f), - action: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.SetActionsMessage} - */ -proto.clientInterface.SetActionsMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.SetActionsMessage; - return proto.clientInterface.SetActionsMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.SetActionsMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.SetActionsMessage} - */ -proto.clientInterface.SetActionsMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.NodeMessage; - reader.readMessage(value,proto.clientInterface.NodeMessage.deserializeBinaryFromReader); - msg.setNode(value); - break; - case 2: - var value = new proto.clientInterface.ProviderMessage; - reader.readMessage(value,proto.clientInterface.ProviderMessage.deserializeBinaryFromReader); - msg.setIdentity(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.SetActionsMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.SetActionsMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.SetActionsMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.SetActionsMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.NodeMessage.serializeBinaryToWriter - ); - } - f = message.getIdentity(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.clientInterface.ProviderMessage.serializeBinaryToWriter - ); - } - f = message.getAction(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional NodeMessage node = 1; - * @return {?proto.clientInterface.NodeMessage} - */ -proto.clientInterface.SetActionsMessage.prototype.getNode = function() { - return /** @type{?proto.clientInterface.NodeMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.NodeMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.NodeMessage|undefined} value - * @return {!proto.clientInterface.SetActionsMessage} returns this -*/ -proto.clientInterface.SetActionsMessage.prototype.setNode = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.clientInterface.SetActionsMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.SetActionsMessage} returns this - */ -proto.clientInterface.SetActionsMessage.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.SetActionsMessage.prototype.hasNode = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ProviderMessage identity = 2; - * @return {?proto.clientInterface.ProviderMessage} - */ -proto.clientInterface.SetActionsMessage.prototype.getIdentity = function() { - return /** @type{?proto.clientInterface.ProviderMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.ProviderMessage, 2)); -}; - - -/** - * @param {?proto.clientInterface.ProviderMessage|undefined} value - * @return {!proto.clientInterface.SetActionsMessage} returns this -*/ -proto.clientInterface.SetActionsMessage.prototype.setIdentity = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.clientInterface.SetActionsMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.SetActionsMessage} returns this - */ -proto.clientInterface.SetActionsMessage.prototype.clearIdentity = function() { - return this.setIdentity(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.SetActionsMessage.prototype.hasIdentity = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string action = 3; - * @return {string} - */ -proto.clientInterface.SetActionsMessage.prototype.getAction = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.SetActionsMessage} returns this - */ -proto.clientInterface.SetActionsMessage.prototype.setAction = function(value) { - return jspb.Message.setProto3StringField(this, 3, 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.clientInterface.NotificationsMessage.oneofGroups_ = [[1,2,3]]; - -/** - * @enum {number} - */ -proto.clientInterface.NotificationsMessage.DataCase = { - DATA_NOT_SET: 0, - GENERAL: 1, - GESTALT_INVITE: 2, - VAULT_SHARE: 3 -}; - -/** - * @return {proto.clientInterface.NotificationsMessage.DataCase} - */ -proto.clientInterface.NotificationsMessage.prototype.getDataCase = function() { - return /** @type {proto.clientInterface.NotificationsMessage.DataCase} */(jspb.Message.computeOneofCase(this, proto.clientInterface.NotificationsMessage.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.clientInterface.NotificationsMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.NotificationsMessage.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.clientInterface.NotificationsMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NotificationsMessage.toObject = function(includeInstance, msg) { - var f, obj = { - general: (f = msg.getGeneral()) && proto.clientInterface.GeneralTypeMessage.toObject(includeInstance, f), - gestaltInvite: jspb.Message.getFieldWithDefault(msg, 2, ""), - vaultShare: (f = msg.getVaultShare()) && proto.clientInterface.VaultShareTypeMessage.toObject(includeInstance, f), - senderId: jspb.Message.getFieldWithDefault(msg, 4, ""), - isRead: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.NotificationsMessage} - */ -proto.clientInterface.NotificationsMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.NotificationsMessage; - return proto.clientInterface.NotificationsMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.NotificationsMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.NotificationsMessage} - */ -proto.clientInterface.NotificationsMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.GeneralTypeMessage; - reader.readMessage(value,proto.clientInterface.GeneralTypeMessage.deserializeBinaryFromReader); - msg.setGeneral(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setGestaltInvite(value); - break; - case 3: - var value = new proto.clientInterface.VaultShareTypeMessage; - reader.readMessage(value,proto.clientInterface.VaultShareTypeMessage.deserializeBinaryFromReader); - msg.setVaultShare(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSenderId(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsRead(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.NotificationsMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.NotificationsMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.NotificationsMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NotificationsMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGeneral(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.clientInterface.GeneralTypeMessage.serializeBinaryToWriter - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( - 2, - f - ); - } - f = message.getVaultShare(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.clientInterface.VaultShareTypeMessage.serializeBinaryToWriter - ); - } - f = message.getSenderId(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getIsRead(); - if (f) { - writer.writeBool( - 5, - f - ); - } -}; - - -/** - * optional GeneralTypeMessage general = 1; - * @return {?proto.clientInterface.GeneralTypeMessage} - */ -proto.clientInterface.NotificationsMessage.prototype.getGeneral = function() { - return /** @type{?proto.clientInterface.GeneralTypeMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.GeneralTypeMessage, 1)); -}; - - -/** - * @param {?proto.clientInterface.GeneralTypeMessage|undefined} value - * @return {!proto.clientInterface.NotificationsMessage} returns this -*/ -proto.clientInterface.NotificationsMessage.prototype.setGeneral = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.clientInterface.NotificationsMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.NotificationsMessage} returns this - */ -proto.clientInterface.NotificationsMessage.prototype.clearGeneral = function() { - return this.setGeneral(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.NotificationsMessage.prototype.hasGeneral = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string gestalt_invite = 2; - * @return {string} - */ -proto.clientInterface.NotificationsMessage.prototype.getGestaltInvite = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.NotificationsMessage} returns this - */ -proto.clientInterface.NotificationsMessage.prototype.setGestaltInvite = function(value) { - return jspb.Message.setOneofField(this, 2, proto.clientInterface.NotificationsMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.clientInterface.NotificationsMessage} returns this - */ -proto.clientInterface.NotificationsMessage.prototype.clearGestaltInvite = function() { - return jspb.Message.setOneofField(this, 2, proto.clientInterface.NotificationsMessage.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.NotificationsMessage.prototype.hasGestaltInvite = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional VaultShareTypeMessage vault_share = 3; - * @return {?proto.clientInterface.VaultShareTypeMessage} - */ -proto.clientInterface.NotificationsMessage.prototype.getVaultShare = function() { - return /** @type{?proto.clientInterface.VaultShareTypeMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.VaultShareTypeMessage, 3)); -}; - - -/** - * @param {?proto.clientInterface.VaultShareTypeMessage|undefined} value - * @return {!proto.clientInterface.NotificationsMessage} returns this -*/ -proto.clientInterface.NotificationsMessage.prototype.setVaultShare = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.clientInterface.NotificationsMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.NotificationsMessage} returns this - */ -proto.clientInterface.NotificationsMessage.prototype.clearVaultShare = function() { - return this.setVaultShare(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.NotificationsMessage.prototype.hasVaultShare = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string sender_id = 4; - * @return {string} - */ -proto.clientInterface.NotificationsMessage.prototype.getSenderId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.NotificationsMessage} returns this - */ -proto.clientInterface.NotificationsMessage.prototype.setSenderId = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional bool is_read = 5; - * @return {boolean} - */ -proto.clientInterface.NotificationsMessage.prototype.getIsRead = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.clientInterface.NotificationsMessage} returns this - */ -proto.clientInterface.NotificationsMessage.prototype.setIsRead = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, 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.clientInterface.NotificationsSendMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.NotificationsSendMessage.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.clientInterface.NotificationsSendMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NotificationsSendMessage.toObject = function(includeInstance, msg) { - var f, obj = { - receiverId: jspb.Message.getFieldWithDefault(msg, 1, ""), - data: (f = msg.getData()) && proto.clientInterface.GeneralTypeMessage.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.clientInterface.NotificationsSendMessage} - */ -proto.clientInterface.NotificationsSendMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.NotificationsSendMessage; - return proto.clientInterface.NotificationsSendMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.NotificationsSendMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.NotificationsSendMessage} - */ -proto.clientInterface.NotificationsSendMessage.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.setReceiverId(value); - break; - case 2: - var value = new proto.clientInterface.GeneralTypeMessage; - reader.readMessage(value,proto.clientInterface.GeneralTypeMessage.deserializeBinaryFromReader); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.NotificationsSendMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.NotificationsSendMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.NotificationsSendMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NotificationsSendMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getReceiverId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getData(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.clientInterface.GeneralTypeMessage.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string receiver_id = 1; - * @return {string} - */ -proto.clientInterface.NotificationsSendMessage.prototype.getReceiverId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.NotificationsSendMessage} returns this - */ -proto.clientInterface.NotificationsSendMessage.prototype.setReceiverId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional GeneralTypeMessage data = 2; - * @return {?proto.clientInterface.GeneralTypeMessage} - */ -proto.clientInterface.NotificationsSendMessage.prototype.getData = function() { - return /** @type{?proto.clientInterface.GeneralTypeMessage} */ ( - jspb.Message.getWrapperField(this, proto.clientInterface.GeneralTypeMessage, 2)); -}; - - -/** - * @param {?proto.clientInterface.GeneralTypeMessage|undefined} value - * @return {!proto.clientInterface.NotificationsSendMessage} returns this -*/ -proto.clientInterface.NotificationsSendMessage.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.clientInterface.NotificationsSendMessage} returns this - */ -proto.clientInterface.NotificationsSendMessage.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.clientInterface.NotificationsSendMessage.prototype.hasData = function() { - return jspb.Message.getField(this, 2) != 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.clientInterface.NotificationsReadMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.NotificationsReadMessage.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.clientInterface.NotificationsReadMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NotificationsReadMessage.toObject = function(includeInstance, msg) { - var f, obj = { - unread: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - number: jspb.Message.getFieldWithDefault(msg, 2, ""), - order: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.NotificationsReadMessage} - */ -proto.clientInterface.NotificationsReadMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.NotificationsReadMessage; - return proto.clientInterface.NotificationsReadMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.NotificationsReadMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.NotificationsReadMessage} - */ -proto.clientInterface.NotificationsReadMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUnread(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNumber(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setOrder(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.NotificationsReadMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.NotificationsReadMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.NotificationsReadMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NotificationsReadMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUnread(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getNumber(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getOrder(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional bool unread = 1; - * @return {boolean} - */ -proto.clientInterface.NotificationsReadMessage.prototype.getUnread = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.clientInterface.NotificationsReadMessage} returns this - */ -proto.clientInterface.NotificationsReadMessage.prototype.setUnread = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional string number = 2; - * @return {string} - */ -proto.clientInterface.NotificationsReadMessage.prototype.getNumber = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.NotificationsReadMessage} returns this - */ -proto.clientInterface.NotificationsReadMessage.prototype.setNumber = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string order = 3; - * @return {string} - */ -proto.clientInterface.NotificationsReadMessage.prototype.getOrder = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.NotificationsReadMessage} returns this - */ -proto.clientInterface.NotificationsReadMessage.prototype.setOrder = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.clientInterface.NotificationsListMessage.repeatedFields_ = [1]; - - - -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.clientInterface.NotificationsListMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.NotificationsListMessage.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.clientInterface.NotificationsListMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NotificationsListMessage.toObject = function(includeInstance, msg) { - var f, obj = { - notificationList: jspb.Message.toObjectList(msg.getNotificationList(), - proto.clientInterface.NotificationsMessage.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.clientInterface.NotificationsListMessage} - */ -proto.clientInterface.NotificationsListMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.NotificationsListMessage; - return proto.clientInterface.NotificationsListMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.NotificationsListMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.NotificationsListMessage} - */ -proto.clientInterface.NotificationsListMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.clientInterface.NotificationsMessage; - reader.readMessage(value,proto.clientInterface.NotificationsMessage.deserializeBinaryFromReader); - msg.addNotification(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.NotificationsListMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.NotificationsListMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.NotificationsListMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.NotificationsListMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNotificationList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.clientInterface.NotificationsMessage.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated NotificationsMessage notification = 1; - * @return {!Array} - */ -proto.clientInterface.NotificationsListMessage.prototype.getNotificationList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.clientInterface.NotificationsMessage, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.clientInterface.NotificationsListMessage} returns this -*/ -proto.clientInterface.NotificationsListMessage.prototype.setNotificationList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.clientInterface.NotificationsMessage=} opt_value - * @param {number=} opt_index - * @return {!proto.clientInterface.NotificationsMessage} - */ -proto.clientInterface.NotificationsListMessage.prototype.addNotification = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.clientInterface.NotificationsMessage, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.clientInterface.NotificationsListMessage} returns this - */ -proto.clientInterface.NotificationsListMessage.prototype.clearNotificationList = function() { - return this.setNotificationList([]); -}; - - - - - -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.clientInterface.GeneralTypeMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.GeneralTypeMessage.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.clientInterface.GeneralTypeMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.GeneralTypeMessage.toObject = function(includeInstance, msg) { - var f, obj = { - message: 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.clientInterface.GeneralTypeMessage} - */ -proto.clientInterface.GeneralTypeMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.GeneralTypeMessage; - return proto.clientInterface.GeneralTypeMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.GeneralTypeMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.GeneralTypeMessage} - */ -proto.clientInterface.GeneralTypeMessage.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.setMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.GeneralTypeMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.GeneralTypeMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.GeneralTypeMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.GeneralTypeMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string message = 1; - * @return {string} - */ -proto.clientInterface.GeneralTypeMessage.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.GeneralTypeMessage} returns this - */ -proto.clientInterface.GeneralTypeMessage.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.clientInterface.VaultShareTypeMessage.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.clientInterface.VaultShareTypeMessage.prototype.toObject = function(opt_includeInstance) { - return proto.clientInterface.VaultShareTypeMessage.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.clientInterface.VaultShareTypeMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultShareTypeMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vaultId: jspb.Message.getFieldWithDefault(msg, 1, ""), - vaultName: jspb.Message.getFieldWithDefault(msg, 2, ""), - actionsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : 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.clientInterface.VaultShareTypeMessage} - */ -proto.clientInterface.VaultShareTypeMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.clientInterface.VaultShareTypeMessage; - return proto.clientInterface.VaultShareTypeMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.clientInterface.VaultShareTypeMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.clientInterface.VaultShareTypeMessage} - */ -proto.clientInterface.VaultShareTypeMessage.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.setVaultId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setVaultName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.addActions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.clientInterface.VaultShareTypeMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.clientInterface.VaultShareTypeMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.clientInterface.VaultShareTypeMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.clientInterface.VaultShareTypeMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVaultId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getVaultName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getActionsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } -}; - - -/** - * optional string vault_id = 1; - * @return {string} - */ -proto.clientInterface.VaultShareTypeMessage.prototype.getVaultId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultShareTypeMessage} returns this - */ -proto.clientInterface.VaultShareTypeMessage.prototype.setVaultId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string vault_name = 2; - * @return {string} - */ -proto.clientInterface.VaultShareTypeMessage.prototype.getVaultName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.clientInterface.VaultShareTypeMessage} returns this - */ -proto.clientInterface.VaultShareTypeMessage.prototype.setVaultName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * repeated string actions = 3; - * @return {!Array} - */ -proto.clientInterface.VaultShareTypeMessage.prototype.getActionsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.clientInterface.VaultShareTypeMessage} returns this - */ -proto.clientInterface.VaultShareTypeMessage.prototype.setActionsList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.clientInterface.VaultShareTypeMessage} returns this - */ -proto.clientInterface.VaultShareTypeMessage.prototype.addActions = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.clientInterface.VaultShareTypeMessage} returns this - */ -proto.clientInterface.VaultShareTypeMessage.prototype.clearActionsList = function() { - return this.setActionsList([]); -}; - - -goog.object.extend(exports, proto.clientInterface); diff --git a/src/proto/js/Test_grpc_pb.d.ts b/src/proto/js/Test_grpc_pb.d.ts deleted file mode 100644 index aa4e3711c..000000000 --- a/src/proto/js/Test_grpc_pb.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -// package: testInterface -// file: Test.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as Test_pb from "./Test_pb"; - -interface ITestService extends grpc.ServiceDefinition { - unary: ITestService_IUnary; - serverStream: ITestService_IServerStream; - clientStream: ITestService_IClientStream; - duplexStream: ITestService_IDuplexStream; -} - -interface ITestService_IUnary extends grpc.MethodDefinition { - path: "/testInterface.Test/Unary"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface ITestService_IServerStream extends grpc.MethodDefinition { - path: "/testInterface.Test/ServerStream"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface ITestService_IClientStream extends grpc.MethodDefinition { - path: "/testInterface.Test/ClientStream"; - requestStream: true; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface ITestService_IDuplexStream extends grpc.MethodDefinition { - path: "/testInterface.Test/DuplexStream"; - requestStream: true; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const TestService: ITestService; - -export interface ITestServer extends grpc.UntypedServiceImplementation { - unary: grpc.handleUnaryCall; - serverStream: grpc.handleServerStreamingCall; - clientStream: grpc.handleClientStreamingCall; - duplexStream: grpc.handleBidiStreamingCall; -} - -export interface ITestClient { - unary(request: Test_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientUnaryCall; - unary(request: Test_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientUnaryCall; - unary(request: Test_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientUnaryCall; - serverStream(request: Test_pb.EchoMessage, options?: Partial): grpc.ClientReadableStream; - serverStream(request: Test_pb.EchoMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - clientStream(callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientWritableStream; - clientStream(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientWritableStream; - clientStream(options: Partial, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientWritableStream; - clientStream(metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientWritableStream; - duplexStream(): grpc.ClientDuplexStream; - duplexStream(options: Partial): grpc.ClientDuplexStream; - duplexStream(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; -} - -export class TestClient extends grpc.Client implements ITestClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public unary(request: Test_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientUnaryCall; - public unary(request: Test_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientUnaryCall; - public unary(request: Test_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientUnaryCall; - public serverStream(request: Test_pb.EchoMessage, options?: Partial): grpc.ClientReadableStream; - public serverStream(request: Test_pb.EchoMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public clientStream(callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientWritableStream; - public clientStream(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientWritableStream; - public clientStream(options: Partial, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientWritableStream; - public clientStream(metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Test_pb.EchoMessage) => void): grpc.ClientWritableStream; - public duplexStream(options?: Partial): grpc.ClientDuplexStream; - public duplexStream(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; -} diff --git a/src/proto/js/Test_grpc_pb.js b/src/proto/js/Test_grpc_pb.js deleted file mode 100644 index 165c85e83..000000000 --- a/src/proto/js/Test_grpc_pb.js +++ /dev/null @@ -1,66 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var Test_pb = require('./Test_pb.js'); - -function serialize_testInterface_EchoMessage(arg) { - if (!(arg instanceof Test_pb.EchoMessage)) { - throw new Error('Expected argument of type testInterface.EchoMessage'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_testInterface_EchoMessage(buffer_arg) { - return Test_pb.EchoMessage.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -var TestService = exports.TestService = { - unary: { - path: '/testInterface.Test/Unary', - requestStream: false, - responseStream: false, - requestType: Test_pb.EchoMessage, - responseType: Test_pb.EchoMessage, - requestSerialize: serialize_testInterface_EchoMessage, - requestDeserialize: deserialize_testInterface_EchoMessage, - responseSerialize: serialize_testInterface_EchoMessage, - responseDeserialize: deserialize_testInterface_EchoMessage, - }, - serverStream: { - path: '/testInterface.Test/ServerStream', - requestStream: false, - responseStream: true, - requestType: Test_pb.EchoMessage, - responseType: Test_pb.EchoMessage, - requestSerialize: serialize_testInterface_EchoMessage, - requestDeserialize: deserialize_testInterface_EchoMessage, - responseSerialize: serialize_testInterface_EchoMessage, - responseDeserialize: deserialize_testInterface_EchoMessage, - }, - clientStream: { - path: '/testInterface.Test/ClientStream', - requestStream: true, - responseStream: false, - requestType: Test_pb.EchoMessage, - responseType: Test_pb.EchoMessage, - requestSerialize: serialize_testInterface_EchoMessage, - requestDeserialize: deserialize_testInterface_EchoMessage, - responseSerialize: serialize_testInterface_EchoMessage, - responseDeserialize: deserialize_testInterface_EchoMessage, - }, - duplexStream: { - path: '/testInterface.Test/DuplexStream', - requestStream: true, - responseStream: true, - requestType: Test_pb.EchoMessage, - responseType: Test_pb.EchoMessage, - requestSerialize: serialize_testInterface_EchoMessage, - requestDeserialize: deserialize_testInterface_EchoMessage, - responseSerialize: serialize_testInterface_EchoMessage, - responseDeserialize: deserialize_testInterface_EchoMessage, - }, -}; - -exports.TestClient = grpc.makeGenericClientConstructor(TestService); diff --git a/src/proto/js/Test_pb.d.ts b/src/proto/js/Test_pb.d.ts deleted file mode 100644 index 63280a18a..000000000 --- a/src/proto/js/Test_pb.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -// package: testInterface -// file: Test.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class EchoMessage extends jspb.Message { - getChallenge(): string; - setChallenge(value: string): EchoMessage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EchoMessage.AsObject; - static toObject(includeInstance: boolean, msg: EchoMessage): EchoMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EchoMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EchoMessage; - static deserializeBinaryFromReader(message: EchoMessage, reader: jspb.BinaryReader): EchoMessage; -} - -export namespace EchoMessage { - export type AsObject = { - challenge: string, - } -} diff --git a/src/proto/js/google/protobuf/any_grpc_pb.js b/src/proto/js/google/protobuf/any_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/google/protobuf/any_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/google/protobuf/any_pb.d.ts b/src/proto/js/google/protobuf/any_pb.d.ts new file mode 100644 index 000000000..be862a10a --- /dev/null +++ b/src/proto/js/google/protobuf/any_pb.d.ts @@ -0,0 +1,32 @@ +// package: google.protobuf +// file: google/protobuf/any.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Any extends jspb.Message { + getTypeUrl(): string; + setTypeUrl(value: string): Any; + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): Any; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Any.AsObject; + static toObject(includeInstance: boolean, msg: Any): Any.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Any, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Any; + static deserializeBinaryFromReader(message: Any, reader: jspb.BinaryReader): Any; +} + +export namespace Any { + export type AsObject = { + typeUrl: string, + value: Uint8Array | string, + } +} diff --git a/src/proto/js/google/protobuf/any_pb.js b/src/proto/js/google/protobuf/any_pb.js new file mode 100644 index 000000000..2154f2078 --- /dev/null +++ b/src/proto/js/google/protobuf/any_pb.js @@ -0,0 +1,274 @@ +// source: google/protobuf/any.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.Any', null, global); +/** + * 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.google.protobuf.Any = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Any, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Any.displayName = 'proto.google.protobuf.Any'; +} + + + +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.google.protobuf.Any.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Any.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.google.protobuf.Any} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Any.toObject = function(includeInstance, msg) { + var f, obj = { + typeUrl: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.Any} + */ +proto.google.protobuf.Any.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Any; + return proto.google.protobuf.Any.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Any} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Any} + */ +proto.google.protobuf.Any.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.setTypeUrl(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Any.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Any.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Any} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Any.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTypeUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string type_url = 1; + * @return {string} + */ +proto.google.protobuf.Any.prototype.getTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.Any} returns this + */ +proto.google.protobuf.Any.prototype.setTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.google.protobuf.Any.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes value = 2; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.google.protobuf.Any.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.google.protobuf.Any.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.protobuf.Any} returns this + */ +proto.google.protobuf.Any.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.protobuf); +/* This code will be inserted into generated code for + * google/protobuf/any.proto. */ + +/** + * Returns the type name contained in this instance, if any. + * @return {string|undefined} + */ +proto.google.protobuf.Any.prototype.getTypeName = function() { + return this.getTypeUrl().split('/').pop(); +}; + + +/** + * Packs the given message instance into this Any. + * For binary format usage only. + * @param {!Uint8Array} serialized The serialized data to pack. + * @param {string} name The type name of this message object. + * @param {string=} opt_typeUrlPrefix the type URL prefix. + */ +proto.google.protobuf.Any.prototype.pack = function(serialized, name, + opt_typeUrlPrefix) { + if (!opt_typeUrlPrefix) { + opt_typeUrlPrefix = 'type.googleapis.com/'; + } + + if (opt_typeUrlPrefix.substr(-1) != '/') { + this.setTypeUrl(opt_typeUrlPrefix + '/' + name); + } else { + this.setTypeUrl(opt_typeUrlPrefix + name); + } + + this.setValue(serialized); +}; + + +/** + * @template T + * Unpacks this Any into the given message object. + * @param {function(Uint8Array):T} deserialize Function that will deserialize + * the binary data properly. + * @param {string} name The expected type name of this message object. + * @return {?T} If the name matched the expected name, returns the deserialized + * object, otherwise returns null. + */ +proto.google.protobuf.Any.prototype.unpack = function(deserialize, name) { + if (this.getTypeName() == name) { + return deserialize(this.getValue_asU8()); + } else { + return null; + } +}; diff --git a/src/proto/js/google/protobuf/descriptor_grpc_pb.js b/src/proto/js/google/protobuf/descriptor_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/google/protobuf/descriptor_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/google/protobuf/descriptor_pb.d.ts b/src/proto/js/google/protobuf/descriptor_pb.d.ts new file mode 100644 index 000000000..ba83b0214 --- /dev/null +++ b/src/proto/js/google/protobuf/descriptor_pb.d.ts @@ -0,0 +1,1247 @@ +// package: google.protobuf +// file: google/protobuf/descriptor.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class FileDescriptorSet extends jspb.Message { + clearFileList(): void; + getFileList(): Array; + setFileList(value: Array): FileDescriptorSet; + addFile(value?: FileDescriptorProto, index?: number): FileDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorSet.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorSet): FileDescriptorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorSet; + static deserializeBinaryFromReader(message: FileDescriptorSet, reader: jspb.BinaryReader): FileDescriptorSet; +} + +export namespace FileDescriptorSet { + export type AsObject = { + fileList: Array, + } +} + +export class FileDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): FileDescriptorProto; + + hasPackage(): boolean; + clearPackage(): void; + getPackage(): string | undefined; + setPackage(value: string): FileDescriptorProto; + clearDependencyList(): void; + getDependencyList(): Array; + setDependencyList(value: Array): FileDescriptorProto; + addDependency(value: string, index?: number): string; + clearPublicDependencyList(): void; + getPublicDependencyList(): Array; + setPublicDependencyList(value: Array): FileDescriptorProto; + addPublicDependency(value: number, index?: number): number; + clearWeakDependencyList(): void; + getWeakDependencyList(): Array; + setWeakDependencyList(value: Array): FileDescriptorProto; + addWeakDependency(value: number, index?: number): number; + clearMessageTypeList(): void; + getMessageTypeList(): Array; + setMessageTypeList(value: Array): FileDescriptorProto; + addMessageType(value?: DescriptorProto, index?: number): DescriptorProto; + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): FileDescriptorProto; + addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; + clearServiceList(): void; + getServiceList(): Array; + setServiceList(value: Array): FileDescriptorProto; + addService(value?: ServiceDescriptorProto, index?: number): ServiceDescriptorProto; + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): FileDescriptorProto; + addExtension$(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FileOptions | undefined; + setOptions(value?: FileOptions): FileDescriptorProto; + + hasSourceCodeInfo(): boolean; + clearSourceCodeInfo(): void; + getSourceCodeInfo(): SourceCodeInfo | undefined; + setSourceCodeInfo(value?: SourceCodeInfo): FileDescriptorProto; + + hasSyntax(): boolean; + clearSyntax(): void; + getSyntax(): string | undefined; + setSyntax(value: string): FileDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorProto): FileDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorProto; + static deserializeBinaryFromReader(message: FileDescriptorProto, reader: jspb.BinaryReader): FileDescriptorProto; +} + +export namespace FileDescriptorProto { + export type AsObject = { + name?: string, + pb_package?: string, + dependencyList: Array, + publicDependencyList: Array, + weakDependencyList: Array, + messageTypeList: Array, + enumTypeList: Array, + serviceList: Array, + extensionList: Array, + options?: FileOptions.AsObject, + sourceCodeInfo?: SourceCodeInfo.AsObject, + syntax?: string, + } +} + +export class DescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): DescriptorProto; + clearFieldList(): void; + getFieldList(): Array; + setFieldList(value: Array): DescriptorProto; + addField(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): DescriptorProto; + addExtension$(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + clearNestedTypeList(): void; + getNestedTypeList(): Array; + setNestedTypeList(value: Array): DescriptorProto; + addNestedType(value?: DescriptorProto, index?: number): DescriptorProto; + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): DescriptorProto; + addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; + clearExtensionRangeList(): void; + getExtensionRangeList(): Array; + setExtensionRangeList(value: Array): DescriptorProto; + addExtensionRange(value?: DescriptorProto.ExtensionRange, index?: number): DescriptorProto.ExtensionRange; + clearOneofDeclList(): void; + getOneofDeclList(): Array; + setOneofDeclList(value: Array): DescriptorProto; + addOneofDecl(value?: OneofDescriptorProto, index?: number): OneofDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MessageOptions | undefined; + setOptions(value?: MessageOptions): DescriptorProto; + clearReservedRangeList(): void; + getReservedRangeList(): Array; + setReservedRangeList(value: Array): DescriptorProto; + addReservedRange(value?: DescriptorProto.ReservedRange, index?: number): DescriptorProto.ReservedRange; + clearReservedNameList(): void; + getReservedNameList(): Array; + setReservedNameList(value: Array): DescriptorProto; + addReservedName(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: DescriptorProto): DescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DescriptorProto; + static deserializeBinaryFromReader(message: DescriptorProto, reader: jspb.BinaryReader): DescriptorProto; +} + +export namespace DescriptorProto { + export type AsObject = { + name?: string, + fieldList: Array, + extensionList: Array, + nestedTypeList: Array, + enumTypeList: Array, + extensionRangeList: Array, + oneofDeclList: Array, + options?: MessageOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + + + export class ExtensionRange extends jspb.Message { + + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): ExtensionRange; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): ExtensionRange; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): ExtensionRangeOptions | undefined; + setOptions(value?: ExtensionRangeOptions): ExtensionRange; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtensionRange.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRange): ExtensionRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtensionRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtensionRange; + static deserializeBinaryFromReader(message: ExtensionRange, reader: jspb.BinaryReader): ExtensionRange; + } + + export namespace ExtensionRange { + export type AsObject = { + start?: number, + end?: number, + options?: ExtensionRangeOptions.AsObject, + } + } + + export class ReservedRange extends jspb.Message { + + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): ReservedRange; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): ReservedRange; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: ReservedRange): ReservedRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ReservedRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReservedRange; + static deserializeBinaryFromReader(message: ReservedRange, reader: jspb.BinaryReader): ReservedRange; + } + + export namespace ReservedRange { + export type AsObject = { + start?: number, + end?: number, + } + } + +} + +export class ExtensionRangeOptions extends jspb.Message { + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): ExtensionRangeOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtensionRangeOptions.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRangeOptions): ExtensionRangeOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtensionRangeOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtensionRangeOptions; + static deserializeBinaryFromReader(message: ExtensionRangeOptions, reader: jspb.BinaryReader): ExtensionRangeOptions; +} + +export namespace ExtensionRangeOptions { + export type AsObject = { + uninterpretedOptionList: Array, + } +} + +export class FieldDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): FieldDescriptorProto; + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number | undefined; + setNumber(value: number): FieldDescriptorProto; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): FieldDescriptorProto.Label | undefined; + setLabel(value: FieldDescriptorProto.Label): FieldDescriptorProto; + + hasType(): boolean; + clearType(): void; + getType(): FieldDescriptorProto.Type | undefined; + setType(value: FieldDescriptorProto.Type): FieldDescriptorProto; + + hasTypeName(): boolean; + clearTypeName(): void; + getTypeName(): string | undefined; + setTypeName(value: string): FieldDescriptorProto; + + hasExtendee(): boolean; + clearExtendee(): void; + getExtendee(): string | undefined; + setExtendee(value: string): FieldDescriptorProto; + + hasDefaultValue(): boolean; + clearDefaultValue(): void; + getDefaultValue(): string | undefined; + setDefaultValue(value: string): FieldDescriptorProto; + + hasOneofIndex(): boolean; + clearOneofIndex(): void; + getOneofIndex(): number | undefined; + setOneofIndex(value: number): FieldDescriptorProto; + + hasJsonName(): boolean; + clearJsonName(): void; + getJsonName(): string | undefined; + setJsonName(value: string): FieldDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FieldOptions | undefined; + setOptions(value?: FieldOptions): FieldDescriptorProto; + + hasProto3Optional(): boolean; + clearProto3Optional(): void; + getProto3Optional(): boolean | undefined; + setProto3Optional(value: boolean): FieldDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FieldDescriptorProto): FieldDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldDescriptorProto; + static deserializeBinaryFromReader(message: FieldDescriptorProto, reader: jspb.BinaryReader): FieldDescriptorProto; +} + +export namespace FieldDescriptorProto { + export type AsObject = { + name?: string, + number?: number, + label?: FieldDescriptorProto.Label, + type?: FieldDescriptorProto.Type, + typeName?: string, + extendee?: string, + defaultValue?: string, + oneofIndex?: number, + jsonName?: string, + options?: FieldOptions.AsObject, + proto3Optional?: boolean, + } + + export enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18, + } + + export enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, + } + +} + +export class OneofDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): OneofDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): OneofOptions | undefined; + setOptions(value?: OneofOptions): OneofDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: OneofDescriptorProto): OneofDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofDescriptorProto; + static deserializeBinaryFromReader(message: OneofDescriptorProto, reader: jspb.BinaryReader): OneofDescriptorProto; +} + +export namespace OneofDescriptorProto { + export type AsObject = { + name?: string, + options?: OneofOptions.AsObject, + } +} + +export class EnumDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): EnumDescriptorProto; + clearValueList(): void; + getValueList(): Array; + setValueList(value: Array): EnumDescriptorProto; + addValue(value?: EnumValueDescriptorProto, index?: number): EnumValueDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumOptions | undefined; + setOptions(value?: EnumOptions): EnumDescriptorProto; + clearReservedRangeList(): void; + getReservedRangeList(): Array; + setReservedRangeList(value: Array): EnumDescriptorProto; + addReservedRange(value?: EnumDescriptorProto.EnumReservedRange, index?: number): EnumDescriptorProto.EnumReservedRange; + clearReservedNameList(): void; + getReservedNameList(): Array; + setReservedNameList(value: Array): EnumDescriptorProto; + addReservedName(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumDescriptorProto): EnumDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumDescriptorProto; + static deserializeBinaryFromReader(message: EnumDescriptorProto, reader: jspb.BinaryReader): EnumDescriptorProto; +} + +export namespace EnumDescriptorProto { + export type AsObject = { + name?: string, + valueList: Array, + options?: EnumOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + + + export class EnumReservedRange extends jspb.Message { + + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): EnumReservedRange; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): EnumReservedRange; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: EnumReservedRange): EnumReservedRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumReservedRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumReservedRange; + static deserializeBinaryFromReader(message: EnumReservedRange, reader: jspb.BinaryReader): EnumReservedRange; + } + + export namespace EnumReservedRange { + export type AsObject = { + start?: number, + end?: number, + } + } + +} + +export class EnumValueDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): EnumValueDescriptorProto; + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number | undefined; + setNumber(value: number): EnumValueDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumValueOptions | undefined; + setOptions(value?: EnumValueOptions): EnumValueDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueDescriptorProto): EnumValueDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueDescriptorProto; + static deserializeBinaryFromReader(message: EnumValueDescriptorProto, reader: jspb.BinaryReader): EnumValueDescriptorProto; +} + +export namespace EnumValueDescriptorProto { + export type AsObject = { + name?: string, + number?: number, + options?: EnumValueOptions.AsObject, + } +} + +export class ServiceDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): ServiceDescriptorProto; + clearMethodList(): void; + getMethodList(): Array; + setMethodList(value: Array): ServiceDescriptorProto; + addMethod(value?: MethodDescriptorProto, index?: number): MethodDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): ServiceOptions | undefined; + setOptions(value?: ServiceOptions): ServiceDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: ServiceDescriptorProto): ServiceDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceDescriptorProto; + static deserializeBinaryFromReader(message: ServiceDescriptorProto, reader: jspb.BinaryReader): ServiceDescriptorProto; +} + +export namespace ServiceDescriptorProto { + export type AsObject = { + name?: string, + methodList: Array, + options?: ServiceOptions.AsObject, + } +} + +export class MethodDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): MethodDescriptorProto; + + hasInputType(): boolean; + clearInputType(): void; + getInputType(): string | undefined; + setInputType(value: string): MethodDescriptorProto; + + hasOutputType(): boolean; + clearOutputType(): void; + getOutputType(): string | undefined; + setOutputType(value: string): MethodDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MethodOptions | undefined; + setOptions(value?: MethodOptions): MethodDescriptorProto; + + hasClientStreaming(): boolean; + clearClientStreaming(): void; + getClientStreaming(): boolean | undefined; + setClientStreaming(value: boolean): MethodDescriptorProto; + + hasServerStreaming(): boolean; + clearServerStreaming(): void; + getServerStreaming(): boolean | undefined; + setServerStreaming(value: boolean): MethodDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: MethodDescriptorProto): MethodDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodDescriptorProto; + static deserializeBinaryFromReader(message: MethodDescriptorProto, reader: jspb.BinaryReader): MethodDescriptorProto; +} + +export namespace MethodDescriptorProto { + export type AsObject = { + name?: string, + inputType?: string, + outputType?: string, + options?: MethodOptions.AsObject, + clientStreaming?: boolean, + serverStreaming?: boolean, + } +} + +export class FileOptions extends jspb.Message { + + hasJavaPackage(): boolean; + clearJavaPackage(): void; + getJavaPackage(): string | undefined; + setJavaPackage(value: string): FileOptions; + + hasJavaOuterClassname(): boolean; + clearJavaOuterClassname(): void; + getJavaOuterClassname(): string | undefined; + setJavaOuterClassname(value: string): FileOptions; + + hasJavaMultipleFiles(): boolean; + clearJavaMultipleFiles(): void; + getJavaMultipleFiles(): boolean | undefined; + setJavaMultipleFiles(value: boolean): FileOptions; + + hasJavaGenerateEqualsAndHash(): boolean; + clearJavaGenerateEqualsAndHash(): void; + getJavaGenerateEqualsAndHash(): boolean | undefined; + setJavaGenerateEqualsAndHash(value: boolean): FileOptions; + + hasJavaStringCheckUtf8(): boolean; + clearJavaStringCheckUtf8(): void; + getJavaStringCheckUtf8(): boolean | undefined; + setJavaStringCheckUtf8(value: boolean): FileOptions; + + hasOptimizeFor(): boolean; + clearOptimizeFor(): void; + getOptimizeFor(): FileOptions.OptimizeMode | undefined; + setOptimizeFor(value: FileOptions.OptimizeMode): FileOptions; + + hasGoPackage(): boolean; + clearGoPackage(): void; + getGoPackage(): string | undefined; + setGoPackage(value: string): FileOptions; + + hasCcGenericServices(): boolean; + clearCcGenericServices(): void; + getCcGenericServices(): boolean | undefined; + setCcGenericServices(value: boolean): FileOptions; + + hasJavaGenericServices(): boolean; + clearJavaGenericServices(): void; + getJavaGenericServices(): boolean | undefined; + setJavaGenericServices(value: boolean): FileOptions; + + hasPyGenericServices(): boolean; + clearPyGenericServices(): void; + getPyGenericServices(): boolean | undefined; + setPyGenericServices(value: boolean): FileOptions; + + hasPhpGenericServices(): boolean; + clearPhpGenericServices(): void; + getPhpGenericServices(): boolean | undefined; + setPhpGenericServices(value: boolean): FileOptions; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): FileOptions; + + hasCcEnableArenas(): boolean; + clearCcEnableArenas(): void; + getCcEnableArenas(): boolean | undefined; + setCcEnableArenas(value: boolean): FileOptions; + + hasObjcClassPrefix(): boolean; + clearObjcClassPrefix(): void; + getObjcClassPrefix(): string | undefined; + setObjcClassPrefix(value: string): FileOptions; + + hasCsharpNamespace(): boolean; + clearCsharpNamespace(): void; + getCsharpNamespace(): string | undefined; + setCsharpNamespace(value: string): FileOptions; + + hasSwiftPrefix(): boolean; + clearSwiftPrefix(): void; + getSwiftPrefix(): string | undefined; + setSwiftPrefix(value: string): FileOptions; + + hasPhpClassPrefix(): boolean; + clearPhpClassPrefix(): void; + getPhpClassPrefix(): string | undefined; + setPhpClassPrefix(value: string): FileOptions; + + hasPhpNamespace(): boolean; + clearPhpNamespace(): void; + getPhpNamespace(): string | undefined; + setPhpNamespace(value: string): FileOptions; + + hasPhpMetadataNamespace(): boolean; + clearPhpMetadataNamespace(): void; + getPhpMetadataNamespace(): string | undefined; + setPhpMetadataNamespace(value: string): FileOptions; + + hasRubyPackage(): boolean; + clearRubyPackage(): void; + getRubyPackage(): string | undefined; + setRubyPackage(value: string): FileOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): FileOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileOptions.AsObject; + static toObject(includeInstance: boolean, msg: FileOptions): FileOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileOptions; + static deserializeBinaryFromReader(message: FileOptions, reader: jspb.BinaryReader): FileOptions; +} + +export namespace FileOptions { + export type AsObject = { + javaPackage?: string, + javaOuterClassname?: string, + javaMultipleFiles?: boolean, + javaGenerateEqualsAndHash?: boolean, + javaStringCheckUtf8?: boolean, + optimizeFor?: FileOptions.OptimizeMode, + goPackage?: string, + ccGenericServices?: boolean, + javaGenericServices?: boolean, + pyGenericServices?: boolean, + phpGenericServices?: boolean, + deprecated?: boolean, + ccEnableArenas?: boolean, + objcClassPrefix?: string, + csharpNamespace?: string, + swiftPrefix?: string, + phpClassPrefix?: string, + phpNamespace?: string, + phpMetadataNamespace?: string, + rubyPackage?: string, + uninterpretedOptionList: Array, + } + + export enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3, + } + +} + +export class MessageOptions extends jspb.Message { + + hasMessageSetWireFormat(): boolean; + clearMessageSetWireFormat(): void; + getMessageSetWireFormat(): boolean | undefined; + setMessageSetWireFormat(value: boolean): MessageOptions; + + hasNoStandardDescriptorAccessor(): boolean; + clearNoStandardDescriptorAccessor(): void; + getNoStandardDescriptorAccessor(): boolean | undefined; + setNoStandardDescriptorAccessor(value: boolean): MessageOptions; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): MessageOptions; + + hasMapEntry(): boolean; + clearMapEntry(): void; + getMapEntry(): boolean | undefined; + setMapEntry(value: boolean): MessageOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): MessageOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MessageOptions.AsObject; + static toObject(includeInstance: boolean, msg: MessageOptions): MessageOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MessageOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MessageOptions; + static deserializeBinaryFromReader(message: MessageOptions, reader: jspb.BinaryReader): MessageOptions; +} + +export namespace MessageOptions { + export type AsObject = { + messageSetWireFormat?: boolean, + noStandardDescriptorAccessor?: boolean, + deprecated?: boolean, + mapEntry?: boolean, + uninterpretedOptionList: Array, + } +} + +export class FieldOptions extends jspb.Message { + + hasCtype(): boolean; + clearCtype(): void; + getCtype(): FieldOptions.CType | undefined; + setCtype(value: FieldOptions.CType): FieldOptions; + + hasPacked(): boolean; + clearPacked(): void; + getPacked(): boolean | undefined; + setPacked(value: boolean): FieldOptions; + + hasJstype(): boolean; + clearJstype(): void; + getJstype(): FieldOptions.JSType | undefined; + setJstype(value: FieldOptions.JSType): FieldOptions; + + hasLazy(): boolean; + clearLazy(): void; + getLazy(): boolean | undefined; + setLazy(value: boolean): FieldOptions; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): FieldOptions; + + hasWeak(): boolean; + clearWeak(): void; + getWeak(): boolean | undefined; + setWeak(value: boolean): FieldOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): FieldOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldOptions.AsObject; + static toObject(includeInstance: boolean, msg: FieldOptions): FieldOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldOptions; + static deserializeBinaryFromReader(message: FieldOptions, reader: jspb.BinaryReader): FieldOptions; +} + +export namespace FieldOptions { + export type AsObject = { + ctype?: FieldOptions.CType, + packed?: boolean, + jstype?: FieldOptions.JSType, + lazy?: boolean, + deprecated?: boolean, + weak?: boolean, + uninterpretedOptionList: Array, + } + + export enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2, + } + + export enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2, + } + +} + +export class OneofOptions extends jspb.Message { + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): OneofOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofOptions.AsObject; + static toObject(includeInstance: boolean, msg: OneofOptions): OneofOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofOptions; + static deserializeBinaryFromReader(message: OneofOptions, reader: jspb.BinaryReader): OneofOptions; +} + +export namespace OneofOptions { + export type AsObject = { + uninterpretedOptionList: Array, + } +} + +export class EnumOptions extends jspb.Message { + + hasAllowAlias(): boolean; + clearAllowAlias(): void; + getAllowAlias(): boolean | undefined; + setAllowAlias(value: boolean): EnumOptions; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): EnumOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): EnumOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumOptions): EnumOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumOptions; + static deserializeBinaryFromReader(message: EnumOptions, reader: jspb.BinaryReader): EnumOptions; +} + +export namespace EnumOptions { + export type AsObject = { + allowAlias?: boolean, + deprecated?: boolean, + uninterpretedOptionList: Array, + } +} + +export class EnumValueOptions extends jspb.Message { + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): EnumValueOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): EnumValueOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueOptions): EnumValueOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueOptions; + static deserializeBinaryFromReader(message: EnumValueOptions, reader: jspb.BinaryReader): EnumValueOptions; +} + +export namespace EnumValueOptions { + export type AsObject = { + deprecated?: boolean, + uninterpretedOptionList: Array, + } +} + +export class ServiceOptions extends jspb.Message { + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): ServiceOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): ServiceOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceOptions.AsObject; + static toObject(includeInstance: boolean, msg: ServiceOptions): ServiceOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceOptions; + static deserializeBinaryFromReader(message: ServiceOptions, reader: jspb.BinaryReader): ServiceOptions; +} + +export namespace ServiceOptions { + export type AsObject = { + deprecated?: boolean, + uninterpretedOptionList: Array, + } +} + +export class MethodOptions extends jspb.Message { + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): MethodOptions; + + hasIdempotencyLevel(): boolean; + clearIdempotencyLevel(): void; + getIdempotencyLevel(): MethodOptions.IdempotencyLevel | undefined; + setIdempotencyLevel(value: MethodOptions.IdempotencyLevel): MethodOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): MethodOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodOptions.AsObject; + static toObject(includeInstance: boolean, msg: MethodOptions): MethodOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodOptions; + static deserializeBinaryFromReader(message: MethodOptions, reader: jspb.BinaryReader): MethodOptions; +} + +export namespace MethodOptions { + export type AsObject = { + deprecated?: boolean, + idempotencyLevel?: MethodOptions.IdempotencyLevel, + uninterpretedOptionList: Array, + } + + export enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2, + } + +} + +export class UninterpretedOption extends jspb.Message { + clearNameList(): void; + getNameList(): Array; + setNameList(value: Array): UninterpretedOption; + addName(value?: UninterpretedOption.NamePart, index?: number): UninterpretedOption.NamePart; + + hasIdentifierValue(): boolean; + clearIdentifierValue(): void; + getIdentifierValue(): string | undefined; + setIdentifierValue(value: string): UninterpretedOption; + + hasPositiveIntValue(): boolean; + clearPositiveIntValue(): void; + getPositiveIntValue(): number | undefined; + setPositiveIntValue(value: number): UninterpretedOption; + + hasNegativeIntValue(): boolean; + clearNegativeIntValue(): void; + getNegativeIntValue(): number | undefined; + setNegativeIntValue(value: number): UninterpretedOption; + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number | undefined; + setDoubleValue(value: number): UninterpretedOption; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): Uint8Array | string; + getStringValue_asU8(): Uint8Array; + getStringValue_asB64(): string; + setStringValue(value: Uint8Array | string): UninterpretedOption; + + hasAggregateValue(): boolean; + clearAggregateValue(): void; + getAggregateValue(): string | undefined; + setAggregateValue(value: string): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UninterpretedOption.AsObject; + static toObject(includeInstance: boolean, msg: UninterpretedOption): UninterpretedOption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UninterpretedOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UninterpretedOption; + static deserializeBinaryFromReader(message: UninterpretedOption, reader: jspb.BinaryReader): UninterpretedOption; +} + +export namespace UninterpretedOption { + export type AsObject = { + nameList: Array, + identifierValue?: string, + positiveIntValue?: number, + negativeIntValue?: number, + doubleValue?: number, + stringValue: Uint8Array | string, + aggregateValue?: string, + } + + + export class NamePart extends jspb.Message { + + hasNamePart(): boolean; + clearNamePart(): void; + getNamePart(): string | undefined; + setNamePart(value: string): NamePart; + + hasIsExtension(): boolean; + clearIsExtension(): void; + getIsExtension(): boolean | undefined; + setIsExtension(value: boolean): NamePart; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NamePart.AsObject; + static toObject(includeInstance: boolean, msg: NamePart): NamePart.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NamePart, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NamePart; + static deserializeBinaryFromReader(message: NamePart, reader: jspb.BinaryReader): NamePart; + } + + export namespace NamePart { + export type AsObject = { + namePart?: string, + isExtension?: boolean, + } + } + +} + +export class SourceCodeInfo extends jspb.Message { + clearLocationList(): void; + getLocationList(): Array; + setLocationList(value: Array): SourceCodeInfo; + addLocation(value?: SourceCodeInfo.Location, index?: number): SourceCodeInfo.Location; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourceCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: SourceCodeInfo): SourceCodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourceCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourceCodeInfo; + static deserializeBinaryFromReader(message: SourceCodeInfo, reader: jspb.BinaryReader): SourceCodeInfo; +} + +export namespace SourceCodeInfo { + export type AsObject = { + locationList: Array, + } + + + export class Location extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): Location; + addPath(value: number, index?: number): number; + clearSpanList(): void; + getSpanList(): Array; + setSpanList(value: Array): Location; + addSpan(value: number, index?: number): number; + + hasLeadingComments(): boolean; + clearLeadingComments(): void; + getLeadingComments(): string | undefined; + setLeadingComments(value: string): Location; + + hasTrailingComments(): boolean; + clearTrailingComments(): void; + getTrailingComments(): string | undefined; + setTrailingComments(value: string): Location; + clearLeadingDetachedCommentsList(): void; + getLeadingDetachedCommentsList(): Array; + setLeadingDetachedCommentsList(value: Array): Location; + addLeadingDetachedComments(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Location.AsObject; + static toObject(includeInstance: boolean, msg: Location): Location.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Location; + static deserializeBinaryFromReader(message: Location, reader: jspb.BinaryReader): Location; + } + + export namespace Location { + export type AsObject = { + pathList: Array, + spanList: Array, + leadingComments?: string, + trailingComments?: string, + leadingDetachedCommentsList: Array, + } + } + +} + +export class GeneratedCodeInfo extends jspb.Message { + clearAnnotationList(): void; + getAnnotationList(): Array; + setAnnotationList(value: Array): GeneratedCodeInfo; + addAnnotation(value?: GeneratedCodeInfo.Annotation, index?: number): GeneratedCodeInfo.Annotation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GeneratedCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: GeneratedCodeInfo): GeneratedCodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GeneratedCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GeneratedCodeInfo; + static deserializeBinaryFromReader(message: GeneratedCodeInfo, reader: jspb.BinaryReader): GeneratedCodeInfo; +} + +export namespace GeneratedCodeInfo { + export type AsObject = { + annotationList: Array, + } + + + export class Annotation extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): Annotation; + addPath(value: number, index?: number): number; + + hasSourceFile(): boolean; + clearSourceFile(): void; + getSourceFile(): string | undefined; + setSourceFile(value: string): Annotation; + + hasBegin(): boolean; + clearBegin(): void; + getBegin(): number | undefined; + setBegin(value: number): Annotation; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): Annotation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Annotation.AsObject; + static toObject(includeInstance: boolean, msg: Annotation): Annotation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Annotation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Annotation; + static deserializeBinaryFromReader(message: Annotation, reader: jspb.BinaryReader): Annotation; + } + + export namespace Annotation { + export type AsObject = { + pathList: Array, + sourceFile?: string, + begin?: number, + end?: number, + } + } + +} diff --git a/src/proto/js/google/protobuf/descriptor_pb.js b/src/proto/js/google/protobuf/descriptor_pb.js new file mode 100644 index 000000000..64e84878b --- /dev/null +++ b/src/proto/js/google/protobuf/descriptor_pb.js @@ -0,0 +1,10069 @@ +// source: google/protobuf/descriptor.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.DescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.DescriptorProto.ExtensionRange', null, global); +goog.exportSymbol('proto.google.protobuf.DescriptorProto.ReservedRange', null, global); +goog.exportSymbol('proto.google.protobuf.EnumDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.EnumDescriptorProto.EnumReservedRange', null, global); +goog.exportSymbol('proto.google.protobuf.EnumOptions', null, global); +goog.exportSymbol('proto.google.protobuf.EnumValueDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.EnumValueOptions', null, global); +goog.exportSymbol('proto.google.protobuf.ExtensionRangeOptions', null, global); +goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto.Label', null, global); +goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto.Type', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions.CType', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions.JSType', null, global); +goog.exportSymbol('proto.google.protobuf.FileDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.FileDescriptorSet', null, global); +goog.exportSymbol('proto.google.protobuf.FileOptions', null, global); +goog.exportSymbol('proto.google.protobuf.FileOptions.OptimizeMode', null, global); +goog.exportSymbol('proto.google.protobuf.GeneratedCodeInfo', null, global); +goog.exportSymbol('proto.google.protobuf.GeneratedCodeInfo.Annotation', null, global); +goog.exportSymbol('proto.google.protobuf.MessageOptions', null, global); +goog.exportSymbol('proto.google.protobuf.MethodDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.MethodOptions', null, global); +goog.exportSymbol('proto.google.protobuf.MethodOptions.IdempotencyLevel', null, global); +goog.exportSymbol('proto.google.protobuf.OneofDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.OneofOptions', null, global); +goog.exportSymbol('proto.google.protobuf.ServiceDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.ServiceOptions', null, global); +goog.exportSymbol('proto.google.protobuf.SourceCodeInfo', null, global); +goog.exportSymbol('proto.google.protobuf.SourceCodeInfo.Location', null, global); +goog.exportSymbol('proto.google.protobuf.UninterpretedOption', null, global); +goog.exportSymbol('proto.google.protobuf.UninterpretedOption.NamePart', null, global); +/** + * 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.google.protobuf.FileDescriptorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorSet.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileDescriptorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileDescriptorSet.displayName = 'proto.google.protobuf.FileDescriptorSet'; +} +/** + * 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.google.protobuf.FileDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileDescriptorProto.displayName = 'proto.google.protobuf.FileDescriptorProto'; +} +/** + * 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.google.protobuf.DescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.DescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.displayName = 'proto.google.protobuf.DescriptorProto'; +} +/** + * 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.google.protobuf.DescriptorProto.ExtensionRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto.ExtensionRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.ExtensionRange.displayName = 'proto.google.protobuf.DescriptorProto.ExtensionRange'; +} +/** + * 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.google.protobuf.DescriptorProto.ReservedRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto.ReservedRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.ReservedRange.displayName = 'proto.google.protobuf.DescriptorProto.ReservedRange'; +} +/** + * 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.google.protobuf.ExtensionRangeOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ExtensionRangeOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ExtensionRangeOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ExtensionRangeOptions.displayName = 'proto.google.protobuf.ExtensionRangeOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.extensionsBinary = {}; + +/** + * 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.google.protobuf.FieldDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.FieldDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldDescriptorProto.displayName = 'proto.google.protobuf.FieldDescriptorProto'; +} +/** + * 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.google.protobuf.OneofDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.OneofDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.OneofDescriptorProto.displayName = 'proto.google.protobuf.OneofDescriptorProto'; +} +/** + * 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.google.protobuf.EnumDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.EnumDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumDescriptorProto.displayName = 'proto.google.protobuf.EnumDescriptorProto'; +} +/** + * 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.google.protobuf.EnumDescriptorProto.EnumReservedRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.displayName = 'proto.google.protobuf.EnumDescriptorProto.EnumReservedRange'; +} +/** + * 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.google.protobuf.EnumValueDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.EnumValueDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumValueDescriptorProto.displayName = 'proto.google.protobuf.EnumValueDescriptorProto'; +} +/** + * 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.google.protobuf.ServiceDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ServiceDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ServiceDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ServiceDescriptorProto.displayName = 'proto.google.protobuf.ServiceDescriptorProto'; +} +/** + * 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.google.protobuf.MethodDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.MethodDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MethodDescriptorProto.displayName = 'proto.google.protobuf.MethodDescriptorProto'; +} +/** + * 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.google.protobuf.FileOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FileOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileOptions.displayName = 'proto.google.protobuf.FileOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FileOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FileOptions.extensionsBinary = {}; + +/** + * 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.google.protobuf.MessageOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MessageOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.MessageOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MessageOptions.displayName = 'proto.google.protobuf.MessageOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MessageOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MessageOptions.extensionsBinary = {}; + +/** + * 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.google.protobuf.FieldOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FieldOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FieldOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldOptions.displayName = 'proto.google.protobuf.FieldOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FieldOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FieldOptions.extensionsBinary = {}; + +/** + * 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.google.protobuf.OneofOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.OneofOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.OneofOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.OneofOptions.displayName = 'proto.google.protobuf.OneofOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.OneofOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.OneofOptions.extensionsBinary = {}; + +/** + * 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.google.protobuf.EnumOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumOptions.displayName = 'proto.google.protobuf.EnumOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumOptions.extensionsBinary = {}; + +/** + * 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.google.protobuf.EnumValueOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumValueOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumValueOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumValueOptions.displayName = 'proto.google.protobuf.EnumValueOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumValueOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumValueOptions.extensionsBinary = {}; + +/** + * 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.google.protobuf.ServiceOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ServiceOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ServiceOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ServiceOptions.displayName = 'proto.google.protobuf.ServiceOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ServiceOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ServiceOptions.extensionsBinary = {}; + +/** + * 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.google.protobuf.MethodOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MethodOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.MethodOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MethodOptions.displayName = 'proto.google.protobuf.MethodOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MethodOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MethodOptions.extensionsBinary = {}; + +/** + * 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.google.protobuf.UninterpretedOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.UninterpretedOption.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.UninterpretedOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.UninterpretedOption.displayName = 'proto.google.protobuf.UninterpretedOption'; +} +/** + * 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.google.protobuf.UninterpretedOption.NamePart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.UninterpretedOption.NamePart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.UninterpretedOption.NamePart.displayName = 'proto.google.protobuf.UninterpretedOption.NamePart'; +} +/** + * 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.google.protobuf.SourceCodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.SourceCodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.SourceCodeInfo.displayName = 'proto.google.protobuf.SourceCodeInfo'; +} +/** + * 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.google.protobuf.SourceCodeInfo.Location = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.SourceCodeInfo.Location, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.SourceCodeInfo.Location.displayName = 'proto.google.protobuf.SourceCodeInfo.Location'; +} +/** + * 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.google.protobuf.GeneratedCodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.GeneratedCodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.GeneratedCodeInfo.displayName = 'proto.google.protobuf.GeneratedCodeInfo'; +} +/** + * 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.google.protobuf.GeneratedCodeInfo.Annotation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.GeneratedCodeInfo.Annotation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.GeneratedCodeInfo.Annotation.displayName = 'proto.google.protobuf.GeneratedCodeInfo.Annotation'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FileDescriptorSet.repeatedFields_ = [1]; + + + +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.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FileDescriptorSet.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.google.protobuf.FileDescriptorSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorSet.toObject = function(includeInstance, msg) { + var f, obj = { + fileList: jspb.Message.toObjectList(msg.getFileList(), + proto.google.protobuf.FileDescriptorProto.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FileDescriptorSet} + */ +proto.google.protobuf.FileDescriptorSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FileDescriptorSet; + return proto.google.protobuf.FileDescriptorSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FileDescriptorSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FileDescriptorSet} + */ +proto.google.protobuf.FileDescriptorSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.FileDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader); + msg.addFile(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FileDescriptorSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FileDescriptorSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FileDescriptorSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFileList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FileDescriptorProto file = 1; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorSet.prototype.getFileList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FileDescriptorProto, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorSet} returns this +*/ +proto.google.protobuf.FileDescriptorSet.prototype.setFileList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.FileDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} + */ +proto.google.protobuf.FileDescriptorSet.prototype.addFile = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.FileDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorSet} returns this + */ +proto.google.protobuf.FileDescriptorSet.prototype.clearFileList = function() { + return this.setFileList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FileDescriptorProto.repeatedFields_ = [3,10,11,4,5,6,7]; + + + +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.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FileDescriptorProto.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.google.protobuf.FileDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + pb_package: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + dependencyList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + publicDependencyList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + weakDependencyList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, + messageTypeList: jspb.Message.toObjectList(msg.getMessageTypeList(), + proto.google.protobuf.DescriptorProto.toObject, includeInstance), + enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(), + proto.google.protobuf.EnumDescriptorProto.toObject, includeInstance), + serviceList: jspb.Message.toObjectList(msg.getServiceList(), + proto.google.protobuf.ServiceDescriptorProto.toObject, includeInstance), + extensionList: jspb.Message.toObjectList(msg.getExtensionList(), + proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), + options: (f = msg.getOptions()) && proto.google.protobuf.FileOptions.toObject(includeInstance, f), + sourceCodeInfo: (f = msg.getSourceCodeInfo()) && proto.google.protobuf.SourceCodeInfo.toObject(includeInstance, f), + syntax: (f = jspb.Message.getField(msg, 12)) == null ? undefined : 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.google.protobuf.FileDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FileDescriptorProto; + return proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FileDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FileDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPackage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addDependency(value); + break; + case 10: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addPublicDependency(values[i]); + } + break; + case 11: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addWeakDependency(values[i]); + } + break; + case 4: + var value = new proto.google.protobuf.DescriptorProto; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader); + msg.addMessageType(value); + break; + case 5: + var value = new proto.google.protobuf.EnumDescriptorProto; + reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader); + msg.addEnumType(value); + break; + case 6: + var value = new proto.google.protobuf.ServiceDescriptorProto; + reader.readMessage(value,proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader); + msg.addService(value); + break; + case 7: + var value = new proto.google.protobuf.FieldDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader); + msg.addExtension$(value); + break; + case 8: + var value = new proto.google.protobuf.FileOptions; + reader.readMessage(value,proto.google.protobuf.FileOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 9: + var value = new proto.google.protobuf.SourceCodeInfo; + reader.readMessage(value,proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader); + msg.setSourceCodeInfo(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setSyntax(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FileDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getDependencyList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getPublicDependencyList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 10, + f + ); + } + f = message.getWeakDependencyList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 11, + f + ); + } + f = message.getMessageTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.google.protobuf.DescriptorProto.serializeBinaryToWriter + ); + } + f = message.getEnumTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getServiceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getExtensionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.protobuf.FileOptions.serializeBinaryToWriter + ); + } + f = message.getSourceCodeInfo(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeString( + 12, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string package = 2; + * @return {string} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setPackage = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearPackage = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasPackage = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated string dependency = 3; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getDependencyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setDependencyList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.addDependency = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearDependencyList = function() { + return this.setDependencyList([]); +}; + + +/** + * repeated int32 public_dependency = 10; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getPublicDependencyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setPublicDependencyList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.addPublicDependency = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearPublicDependencyList = function() { + return this.setPublicDependencyList([]); +}; + + +/** + * repeated int32 weak_dependency = 11; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getWeakDependencyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setWeakDependencyList = function(value) { + return jspb.Message.setField(this, 11, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.addWeakDependency = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 11, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearWeakDependencyList = function() { + return this.setWeakDependencyList([]); +}; + + +/** + * repeated DescriptorProto message_type = 4; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getMessageTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setMessageTypeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addMessageType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.DescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearMessageTypeList = function() { + return this.setMessageTypeList([]); +}; + + +/** + * repeated EnumDescriptorProto enum_type = 5; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getEnumTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setEnumTypeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addEnumType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.google.protobuf.EnumDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearEnumTypeList = function() { + return this.setEnumTypeList([]); +}; + + +/** + * repeated ServiceDescriptorProto service = 6; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getServiceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.ServiceDescriptorProto, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setServiceList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.google.protobuf.ServiceDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.ServiceDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addService = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.ServiceDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearServiceList = function() { + return this.setServiceList([]); +}; + + +/** + * repeated FieldDescriptorProto extension = 7; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getExtensionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setExtensionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addExtension$ = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearExtensionList = function() { + return this.setExtensionList([]); +}; + + +/** + * optional FileOptions options = 8; + * @return {?proto.google.protobuf.FileOptions} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.FileOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FileOptions, 8)); +}; + + +/** + * @param {?proto.google.protobuf.FileOptions|undefined} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional SourceCodeInfo source_code_info = 9; + * @return {?proto.google.protobuf.SourceCodeInfo} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getSourceCodeInfo = function() { + return /** @type{?proto.google.protobuf.SourceCodeInfo} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.SourceCodeInfo, 9)); +}; + + +/** + * @param {?proto.google.protobuf.SourceCodeInfo|undefined} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setSourceCodeInfo = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearSourceCodeInfo = function() { + return this.setSourceCodeInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasSourceCodeInfo = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string syntax = 12; + * @return {string} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getSyntax = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setSyntax = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearSyntax = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasSyntax = function() { + return jspb.Message.getField(this, 12) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.DescriptorProto.repeatedFields_ = [2,6,3,4,5,8,9,10]; + + + +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.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.DescriptorProto.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.google.protobuf.DescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + fieldList: jspb.Message.toObjectList(msg.getFieldList(), + proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), + extensionList: jspb.Message.toObjectList(msg.getExtensionList(), + proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), + nestedTypeList: jspb.Message.toObjectList(msg.getNestedTypeList(), + proto.google.protobuf.DescriptorProto.toObject, includeInstance), + enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(), + proto.google.protobuf.EnumDescriptorProto.toObject, includeInstance), + extensionRangeList: jspb.Message.toObjectList(msg.getExtensionRangeList(), + proto.google.protobuf.DescriptorProto.ExtensionRange.toObject, includeInstance), + oneofDeclList: jspb.Message.toObjectList(msg.getOneofDeclList(), + proto.google.protobuf.OneofDescriptorProto.toObject, includeInstance), + options: (f = msg.getOptions()) && proto.google.protobuf.MessageOptions.toObject(includeInstance, f), + reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), + proto.google.protobuf.DescriptorProto.ReservedRange.toObject, includeInstance), + reservedNameList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : 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.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.DescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.DescriptorProto; + return proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.DescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.FieldDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader); + msg.addField(value); + break; + case 6: + var value = new proto.google.protobuf.FieldDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader); + msg.addExtension$(value); + break; + case 3: + var value = new proto.google.protobuf.DescriptorProto; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader); + msg.addNestedType(value); + break; + case 4: + var value = new proto.google.protobuf.EnumDescriptorProto; + reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader); + msg.addEnumType(value); + break; + case 5: + var value = new proto.google.protobuf.DescriptorProto.ExtensionRange; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader); + msg.addExtensionRange(value); + break; + case 8: + var value = new proto.google.protobuf.OneofDescriptorProto; + reader.readMessage(value,proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader); + msg.addOneofDecl(value); + break; + case 7: + var value = new proto.google.protobuf.MessageOptions; + reader.readMessage(value,proto.google.protobuf.MessageOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 9: + var value = new proto.google.protobuf.DescriptorProto.ReservedRange; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader); + msg.addReservedRange(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.addReservedName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.DescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.DescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.DescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getFieldList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getExtensionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getNestedTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.google.protobuf.DescriptorProto.serializeBinaryToWriter + ); + } + f = message.getEnumTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getExtensionRangeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter + ); + } + f = message.getOneofDeclList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.google.protobuf.MessageOptions.serializeBinaryToWriter + ); + } + f = message.getReservedRangeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter + ); + } + f = message.getReservedNameList(); + if (f.length > 0) { + writer.writeRepeatedString( + 10, + f + ); + } +}; + + + + + +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.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.DescriptorProto.ExtensionRange.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.google.protobuf.DescriptorProto.ExtensionRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.toObject = function(includeInstance, msg) { + var f, obj = { + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + options: (f = msg.getOptions()) && proto.google.protobuf.ExtensionRangeOptions.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.google.protobuf.DescriptorProto.ExtensionRange} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.DescriptorProto.ExtensionRange; + return proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.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.setStart(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + case 3: + var value = new proto.google.protobuf.ExtensionRangeOptions; + reader.readMessage(value,proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 start = 1; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getStart = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setStart = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearStart = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 end = 2; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setEnd = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearEnd = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ExtensionRangeOptions options = 3; + * @return {?proto.google.protobuf.ExtensionRangeOptions} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.ExtensionRangeOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.ExtensionRangeOptions, 3)); +}; + + +/** + * @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this +*/ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasOptions = 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.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.DescriptorProto.ReservedRange.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.google.protobuf.DescriptorProto.ReservedRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ReservedRange.toObject = function(includeInstance, msg) { + var f, obj = { + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : 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.google.protobuf.DescriptorProto.ReservedRange} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.DescriptorProto.ReservedRange; + return proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.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.setStart(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int32 start = 1; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getStart = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setStart = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearStart = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 end = 2; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setEnd = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearEnd = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.DescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated FieldDescriptorProto field = 2; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getFieldList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setFieldList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addField = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearFieldList = function() { + return this.setFieldList([]); +}; + + +/** + * repeated FieldDescriptorProto extension = 6; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getExtensionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setExtensionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addExtension$ = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearExtensionList = function() { + return this.setExtensionList([]); +}; + + +/** + * repeated DescriptorProto nested_type = 3; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getNestedTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setNestedTypeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addNestedType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.DescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearNestedTypeList = function() { + return this.setNestedTypeList([]); +}; + + +/** + * repeated EnumDescriptorProto enum_type = 4; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getEnumTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setEnumTypeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addEnumType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.EnumDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearEnumTypeList = function() { + return this.setEnumTypeList([]); +}; + + +/** + * repeated ExtensionRange extension_range = 5; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getExtensionRangeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto.ExtensionRange, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setExtensionRangeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} + */ +proto.google.protobuf.DescriptorProto.prototype.addExtensionRange = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.google.protobuf.DescriptorProto.ExtensionRange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearExtensionRangeList = function() { + return this.setExtensionRangeList([]); +}; + + +/** + * repeated OneofDescriptorProto oneof_decl = 8; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getOneofDeclList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.OneofDescriptorProto, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setOneofDeclList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.google.protobuf.OneofDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.OneofDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addOneofDecl = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.protobuf.OneofDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearOneofDeclList = function() { + return this.setOneofDeclList([]); +}; + + +/** + * optional MessageOptions options = 7; + * @return {?proto.google.protobuf.MessageOptions} + */ +proto.google.protobuf.DescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.MessageOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.MessageOptions, 7)); +}; + + +/** + * @param {?proto.google.protobuf.MessageOptions|undefined} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated ReservedRange reserved_range = 9; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getReservedRangeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto.ReservedRange, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setReservedRangeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} + */ +proto.google.protobuf.DescriptorProto.prototype.addReservedRange = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.google.protobuf.DescriptorProto.ReservedRange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearReservedRangeList = function() { + return this.setReservedRangeList([]); +}; + + +/** + * repeated string reserved_name = 10; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getReservedNameList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.setReservedNameList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.addReservedName = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearReservedNameList = function() { + return this.setReservedNameList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ExtensionRangeOptions.repeatedFields_ = [999]; + + + +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.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ExtensionRangeOptions.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.google.protobuf.ExtensionRangeOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ExtensionRangeOptions.toObject = function(includeInstance, msg) { + var f, obj = { + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.ExtensionRangeOptions.extensions, proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ExtensionRangeOptions} + */ +proto.google.protobuf.ExtensionRangeOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ExtensionRangeOptions; + return proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ExtensionRangeOptions} + */ +proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, + proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension, + proto.google.protobuf.ExtensionRangeOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ExtensionRangeOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension); +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this +*/ +proto.google.protobuf.ExtensionRangeOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + + + +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.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FieldDescriptorProto.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.google.protobuf.FieldDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + number: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + label: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + type: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + typeName: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, + extendee: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + defaultValue: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f, + oneofIndex: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f, + jsonName: (f = jspb.Message.getField(msg, 10)) == null ? undefined : f, + options: (f = msg.getOptions()) && proto.google.protobuf.FieldOptions.toObject(includeInstance, f), + proto3Optional: (f = jspb.Message.getBooleanField(msg, 17)) == null ? undefined : 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.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.FieldDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FieldDescriptorProto; + return proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FieldDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 4: + var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (reader.readEnum()); + msg.setLabel(value); + break; + case 5: + var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (reader.readEnum()); + msg.setType(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setTypeName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setExtendee(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setDefaultValue(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt32()); + msg.setOneofIndex(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setJsonName(value); + break; + case 8: + var value = new proto.google.protobuf.FieldOptions; + reader.readMessage(value,proto.google.protobuf.FieldOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProto3Optional(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FieldDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt32( + 3, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeEnum( + 4, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeEnum( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeInt32( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString( + 10, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.protobuf.FieldOptions.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeBool( + 17, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.FieldDescriptorProto.Type = { + TYPE_DOUBLE: 1, + TYPE_FLOAT: 2, + TYPE_INT64: 3, + TYPE_UINT64: 4, + TYPE_INT32: 5, + TYPE_FIXED64: 6, + TYPE_FIXED32: 7, + TYPE_BOOL: 8, + TYPE_STRING: 9, + TYPE_GROUP: 10, + TYPE_MESSAGE: 11, + TYPE_BYTES: 12, + TYPE_UINT32: 13, + TYPE_ENUM: 14, + TYPE_SFIXED32: 15, + TYPE_SFIXED64: 16, + TYPE_SINT32: 17, + TYPE_SINT64: 18 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FieldDescriptorProto.Label = { + LABEL_OPTIONAL: 1, + LABEL_REQUIRED: 2, + LABEL_REPEATED: 3 +}; + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 number = 3; + * @return {number} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setNumber = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearNumber = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasNumber = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Label label = 4; + * @return {!proto.google.protobuf.FieldDescriptorProto.Label} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getLabel = function() { + return /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (jspb.Message.getFieldWithDefault(this, 4, 1)); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Label} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearLabel = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasLabel = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Type type = 5; + * @return {!proto.google.protobuf.FieldDescriptorProto.Type} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getType = function() { + return /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getFieldWithDefault(this, 5, 1)); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Type} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setType = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearType = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasType = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string type_name = 6; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setTypeName = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearTypeName = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasTypeName = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string extendee = 2; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getExtendee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setExtendee = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearExtendee = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasExtendee = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string default_value = 7; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getDefaultValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setDefaultValue = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearDefaultValue = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasDefaultValue = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional int32 oneof_index = 9; + * @return {number} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getOneofIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setOneofIndex = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearOneofIndex = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasOneofIndex = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string json_name = 10; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getJsonName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setJsonName = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearJsonName = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasJsonName = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional FieldOptions options = 8; + * @return {?proto.google.protobuf.FieldOptions} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.FieldOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FieldOptions, 8)); +}; + + +/** + * @param {?proto.google.protobuf.FieldOptions|undefined} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this +*/ +proto.google.protobuf.FieldDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional bool proto3_optional = 17; + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getProto3Optional = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setProto3Optional = function(value) { + return jspb.Message.setField(this, 17, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearProto3Optional = function() { + return jspb.Message.setField(this, 17, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasProto3Optional = function() { + return jspb.Message.getField(this, 17) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.OneofDescriptorProto.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.google.protobuf.OneofDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + options: (f = msg.getOptions()) && proto.google.protobuf.OneofOptions.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.google.protobuf.OneofDescriptorProto} + */ +proto.google.protobuf.OneofDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.OneofDescriptorProto; + return proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.OneofDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.OneofDescriptorProto} + */ +proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.OneofOptions; + reader.readMessage(value,proto.google.protobuf.OneofOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.OneofDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.protobuf.OneofOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ +proto.google.protobuf.OneofDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ +proto.google.protobuf.OneofDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional OneofOptions options = 2; + * @return {?proto.google.protobuf.OneofOptions} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.OneofOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.OneofOptions, 2)); +}; + + +/** + * @param {?proto.google.protobuf.OneofOptions|undefined} value + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this +*/ +proto.google.protobuf.OneofDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ +proto.google.protobuf.OneofDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.EnumDescriptorProto.repeatedFields_ = [2,4,5]; + + + +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.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumDescriptorProto.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.google.protobuf.EnumDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + valueList: jspb.Message.toObjectList(msg.getValueList(), + proto.google.protobuf.EnumValueDescriptorProto.toObject, includeInstance), + options: (f = msg.getOptions()) && proto.google.protobuf.EnumOptions.toObject(includeInstance, f), + reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject, includeInstance), + reservedNameList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : 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.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.EnumDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumDescriptorProto; + return proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.EnumValueDescriptorProto; + reader.readMessage(value,proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader); + msg.addValue(value); + break; + case 3: + var value = new proto.google.protobuf.EnumOptions; + reader.readMessage(value,proto.google.protobuf.EnumOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 4: + var value = new proto.google.protobuf.EnumDescriptorProto.EnumReservedRange; + reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader); + msg.addReservedRange(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addReservedName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getValueList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.EnumOptions.serializeBinaryToWriter + ); + } + f = message.getReservedRangeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter + ); + } + f = message.getReservedNameList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } +}; + + + + + +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.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.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.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject = function(includeInstance, msg) { + var f, obj = { + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : 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.google.protobuf.EnumDescriptorProto.EnumReservedRange} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumDescriptorProto.EnumReservedRange; + return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.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.setStart(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int32 start = 1; + * @return {number} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getStart = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setStart = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearStart = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 end = 2; + * @return {number} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setEnd = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearEnd = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated EnumValueDescriptorProto value = 2; + * @return {!Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getValueList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumValueDescriptorProto, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ +proto.google.protobuf.EnumDescriptorProto.prototype.setValueList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumValueDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumValueDescriptorProto} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.addValue = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.EnumValueDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearValueList = function() { + return this.setValueList([]); +}; + + +/** + * optional EnumOptions options = 3; + * @return {?proto.google.protobuf.EnumOptions} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.EnumOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.EnumOptions, 3)); +}; + + +/** + * @param {?proto.google.protobuf.EnumOptions|undefined} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ +proto.google.protobuf.EnumDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated EnumReservedRange reserved_range = 4; + * @return {!Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getReservedRangeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ +proto.google.protobuf.EnumDescriptorProto.prototype.setReservedRangeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.addReservedRange = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedRangeList = function() { + return this.setReservedRangeList([]); +}; + + +/** + * repeated string reserved_name = 5; + * @return {!Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getReservedNameList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.setReservedNameList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.addReservedName = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList = function() { + return this.setReservedNameList([]); +}; + + + + + +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.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumValueDescriptorProto.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.google.protobuf.EnumValueDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + number: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + options: (f = msg.getOptions()) && proto.google.protobuf.EnumValueOptions.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.google.protobuf.EnumValueDescriptorProto} + */ +proto.google.protobuf.EnumValueDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumValueDescriptorProto; + return proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} + */ +proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 3: + var value = new proto.google.protobuf.EnumValueOptions; + reader.readMessage(value,proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumValueDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 number = 2; + * @return {number} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.setNumber = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.clearNumber = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.hasNumber = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional EnumValueOptions options = 3; + * @return {?proto.google.protobuf.EnumValueOptions} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.EnumValueOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.EnumValueOptions, 3)); +}; + + +/** + * @param {?proto.google.protobuf.EnumValueOptions|undefined} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this +*/ +proto.google.protobuf.EnumValueDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ServiceDescriptorProto.repeatedFields_ = [2]; + + + +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.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ServiceDescriptorProto.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.google.protobuf.ServiceDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + methodList: jspb.Message.toObjectList(msg.getMethodList(), + proto.google.protobuf.MethodDescriptorProto.toObject, includeInstance), + options: (f = msg.getOptions()) && proto.google.protobuf.ServiceOptions.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.google.protobuf.ServiceDescriptorProto} + */ +proto.google.protobuf.ServiceDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ServiceDescriptorProto; + return proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ServiceDescriptorProto} + */ +proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.MethodDescriptorProto; + reader.readMessage(value,proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader); + msg.addMethod(value); + break; + case 3: + var value = new proto.google.protobuf.ServiceOptions; + reader.readMessage(value,proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ServiceDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getMethodList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.ServiceOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated MethodDescriptorProto method = 2; + * @return {!Array} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.getMethodList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.MethodDescriptorProto, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this +*/ +proto.google.protobuf.ServiceDescriptorProto.prototype.setMethodList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.MethodDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.MethodDescriptorProto} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.addMethod = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.MethodDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.clearMethodList = function() { + return this.setMethodList([]); +}; + + +/** + * optional ServiceOptions options = 3; + * @return {?proto.google.protobuf.ServiceOptions} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.ServiceOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.ServiceOptions, 3)); +}; + + +/** + * @param {?proto.google.protobuf.ServiceOptions|undefined} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this +*/ +proto.google.protobuf.ServiceDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.hasOptions = 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.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.MethodDescriptorProto.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.google.protobuf.MethodDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + inputType: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + outputType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + options: (f = msg.getOptions()) && proto.google.protobuf.MethodOptions.toObject(includeInstance, f), + clientStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + serverStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.MethodDescriptorProto} + */ +proto.google.protobuf.MethodDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.MethodDescriptorProto; + return proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.MethodDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.MethodDescriptorProto} + */ +proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setInputType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOutputType(value); + break; + case 4: + var value = new proto.google.protobuf.MethodOptions; + reader.readMessage(value,proto.google.protobuf.MethodOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setClientStreaming(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setServerStreaming(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.MethodDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.protobuf.MethodOptions.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBool( + 5, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBool( + 6, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string input_type = 2; + * @return {string} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getInputType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.setInputType = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearInputType = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasInputType = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string output_type = 3; + * @return {string} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getOutputType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.setOutputType = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearOutputType = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasOutputType = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional MethodOptions options = 4; + * @return {?proto.google.protobuf.MethodOptions} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.MethodOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.MethodOptions, 4)); +}; + + +/** + * @param {?proto.google.protobuf.MethodOptions|undefined} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this +*/ +proto.google.protobuf.MethodDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool client_streaming = 5; + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getClientStreaming = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.setClientStreaming = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearClientStreaming = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasClientStreaming = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool server_streaming = 6; + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getServerStreaming = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.setServerStreaming = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearServerStreaming = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasServerStreaming = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FileOptions.repeatedFields_ = [999]; + + + +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.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FileOptions.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.google.protobuf.FileOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileOptions.toObject = function(includeInstance, msg) { + var f, obj = { + javaPackage: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + javaOuterClassname: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f, + javaMultipleFiles: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + javaGenerateEqualsAndHash: (f = jspb.Message.getBooleanField(msg, 20)) == null ? undefined : f, + javaStringCheckUtf8: jspb.Message.getBooleanFieldWithDefault(msg, 27, false), + optimizeFor: jspb.Message.getFieldWithDefault(msg, 9, 1), + goPackage: (f = jspb.Message.getField(msg, 11)) == null ? undefined : f, + ccGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), + javaGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), + pyGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), + phpGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 42, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 23, false), + ccEnableArenas: jspb.Message.getBooleanFieldWithDefault(msg, 31, true), + objcClassPrefix: (f = jspb.Message.getField(msg, 36)) == null ? undefined : f, + csharpNamespace: (f = jspb.Message.getField(msg, 37)) == null ? undefined : f, + swiftPrefix: (f = jspb.Message.getField(msg, 39)) == null ? undefined : f, + phpClassPrefix: (f = jspb.Message.getField(msg, 40)) == null ? undefined : f, + phpNamespace: (f = jspb.Message.getField(msg, 41)) == null ? undefined : f, + phpMetadataNamespace: (f = jspb.Message.getField(msg, 44)) == null ? undefined : f, + rubyPackage: (f = jspb.Message.getField(msg, 45)) == null ? undefined : f, + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.FileOptions.extensions, proto.google.protobuf.FileOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FileOptions} + */ +proto.google.protobuf.FileOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FileOptions; + return proto.google.protobuf.FileOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FileOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FileOptions} + */ +proto.google.protobuf.FileOptions.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.setJavaPackage(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setJavaOuterClassname(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaMultipleFiles(value); + break; + case 20: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaGenerateEqualsAndHash(value); + break; + case 27: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaStringCheckUtf8(value); + break; + case 9: + var value = /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (reader.readEnum()); + msg.setOptimizeFor(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setGoPackage(value); + break; + case 16: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCcGenericServices(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaGenericServices(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPyGenericServices(value); + break; + case 42: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPhpGenericServices(value); + break; + case 23: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 31: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCcEnableArenas(value); + break; + case 36: + var value = /** @type {string} */ (reader.readString()); + msg.setObjcClassPrefix(value); + break; + case 37: + var value = /** @type {string} */ (reader.readString()); + msg.setCsharpNamespace(value); + break; + case 39: + var value = /** @type {string} */ (reader.readString()); + msg.setSwiftPrefix(value); + break; + case 40: + var value = /** @type {string} */ (reader.readString()); + msg.setPhpClassPrefix(value); + break; + case 41: + var value = /** @type {string} */ (reader.readString()); + msg.setPhpNamespace(value); + break; + case 44: + var value = /** @type {string} */ (reader.readString()); + msg.setPhpMetadataNamespace(value); + break; + case 45: + var value = /** @type {string} */ (reader.readString()); + msg.setRubyPackage(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.FileOptions.extensionsBinary, + proto.google.protobuf.FileOptions.prototype.getExtension, + proto.google.protobuf.FileOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FileOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FileOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FileOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBool( + 10, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 20)); + if (f != null) { + writer.writeBool( + 20, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 27)); + if (f != null) { + writer.writeBool( + 27, + f + ); + } + f = /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeEnum( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 16)); + if (f != null) { + writer.writeBool( + 16, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeBool( + 17, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 18)); + if (f != null) { + writer.writeBool( + 18, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 42)); + if (f != null) { + writer.writeBool( + 42, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 23)); + if (f != null) { + writer.writeBool( + 23, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 31)); + if (f != null) { + writer.writeBool( + 31, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 36)); + if (f != null) { + writer.writeString( + 36, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 37)); + if (f != null) { + writer.writeString( + 37, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 39)); + if (f != null) { + writer.writeString( + 39, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 40)); + if (f != null) { + writer.writeString( + 40, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 41)); + if (f != null) { + writer.writeString( + 41, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 44)); + if (f != null) { + writer.writeString( + 44, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 45)); + if (f != null) { + writer.writeString( + 45, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.FileOptions.extensionsBinary, proto.google.protobuf.FileOptions.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.FileOptions.OptimizeMode = { + SPEED: 1, + CODE_SIZE: 2, + LITE_RUNTIME: 3 +}; + +/** + * optional string java_package = 1; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getJavaPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaPackage = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaPackage = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaPackage = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string java_outer_classname = 8; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getJavaOuterClassname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaOuterClassname = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaOuterClassname = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaOuterClassname = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional bool java_multiple_files = 10; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaMultipleFiles = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaMultipleFiles = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaMultipleFiles = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaMultipleFiles = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional bool java_generate_equals_and_hash = 20; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaGenerateEqualsAndHash = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 20, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaGenerateEqualsAndHash = function(value) { + return jspb.Message.setField(this, 20, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaGenerateEqualsAndHash = function() { + return jspb.Message.setField(this, 20, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaGenerateEqualsAndHash = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional bool java_string_check_utf8 = 27; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaStringCheckUtf8 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaStringCheckUtf8 = function(value) { + return jspb.Message.setField(this, 27, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaStringCheckUtf8 = function() { + return jspb.Message.setField(this, 27, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaStringCheckUtf8 = function() { + return jspb.Message.getField(this, 27) != null; +}; + + +/** + * optional OptimizeMode optimize_for = 9; + * @return {!proto.google.protobuf.FileOptions.OptimizeMode} + */ +proto.google.protobuf.FileOptions.prototype.getOptimizeFor = function() { + return /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (jspb.Message.getFieldWithDefault(this, 9, 1)); +}; + + +/** + * @param {!proto.google.protobuf.FileOptions.OptimizeMode} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setOptimizeFor = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearOptimizeFor = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasOptimizeFor = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string go_package = 11; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getGoPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setGoPackage = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearGoPackage = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasGoPackage = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional bool cc_generic_services = 16; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getCcGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setCcGenericServices = function(value) { + return jspb.Message.setField(this, 16, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearCcGenericServices = function() { + return jspb.Message.setField(this, 16, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasCcGenericServices = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional bool java_generic_services = 17; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaGenericServices = function(value) { + return jspb.Message.setField(this, 17, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaGenericServices = function() { + return jspb.Message.setField(this, 17, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaGenericServices = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional bool py_generic_services = 18; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getPyGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setPyGenericServices = function(value) { + return jspb.Message.setField(this, 18, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearPyGenericServices = function() { + return jspb.Message.setField(this, 18, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPyGenericServices = function() { + return jspb.Message.getField(this, 18) != null; +}; + + +/** + * optional bool php_generic_services = 42; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getPhpGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 42, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setPhpGenericServices = function(value) { + return jspb.Message.setField(this, 42, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearPhpGenericServices = function() { + return jspb.Message.setField(this, 42, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpGenericServices = function() { + return jspb.Message.getField(this, 42) != null; +}; + + +/** + * optional bool deprecated = 23; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 23, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 23, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 23, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 23) != null; +}; + + +/** + * optional bool cc_enable_arenas = 31; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getCcEnableArenas = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 31, true)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setCcEnableArenas = function(value) { + return jspb.Message.setField(this, 31, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearCcEnableArenas = function() { + return jspb.Message.setField(this, 31, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasCcEnableArenas = function() { + return jspb.Message.getField(this, 31) != null; +}; + + +/** + * optional string objc_class_prefix = 36; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getObjcClassPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 36, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setObjcClassPrefix = function(value) { + return jspb.Message.setField(this, 36, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearObjcClassPrefix = function() { + return jspb.Message.setField(this, 36, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasObjcClassPrefix = function() { + return jspb.Message.getField(this, 36) != null; +}; + + +/** + * optional string csharp_namespace = 37; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getCsharpNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 37, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setCsharpNamespace = function(value) { + return jspb.Message.setField(this, 37, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearCsharpNamespace = function() { + return jspb.Message.setField(this, 37, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasCsharpNamespace = function() { + return jspb.Message.getField(this, 37) != null; +}; + + +/** + * optional string swift_prefix = 39; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getSwiftPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 39, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setSwiftPrefix = function(value) { + return jspb.Message.setField(this, 39, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearSwiftPrefix = function() { + return jspb.Message.setField(this, 39, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasSwiftPrefix = function() { + return jspb.Message.getField(this, 39) != null; +}; + + +/** + * optional string php_class_prefix = 40; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getPhpClassPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 40, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setPhpClassPrefix = function(value) { + return jspb.Message.setField(this, 40, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearPhpClassPrefix = function() { + return jspb.Message.setField(this, 40, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpClassPrefix = function() { + return jspb.Message.getField(this, 40) != null; +}; + + +/** + * optional string php_namespace = 41; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getPhpNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 41, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setPhpNamespace = function(value) { + return jspb.Message.setField(this, 41, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearPhpNamespace = function() { + return jspb.Message.setField(this, 41, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpNamespace = function() { + return jspb.Message.getField(this, 41) != null; +}; + + +/** + * optional string php_metadata_namespace = 44; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getPhpMetadataNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 44, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setPhpMetadataNamespace = function(value) { + return jspb.Message.setField(this, 44, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearPhpMetadataNamespace = function() { + return jspb.Message.setField(this, 44, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpMetadataNamespace = function() { + return jspb.Message.getField(this, 44) != null; +}; + + +/** + * optional string ruby_package = 45; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getRubyPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 45, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setRubyPackage = function(value) { + return jspb.Message.setField(this, 45, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearRubyPackage = function() { + return jspb.Message.setField(this, 45, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasRubyPackage = function() { + return jspb.Message.getField(this, 45) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.FileOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileOptions} returns this +*/ +proto.google.protobuf.FileOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.FileOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.MessageOptions.repeatedFields_ = [999]; + + + +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.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.MessageOptions.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.google.protobuf.MessageOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MessageOptions.toObject = function(includeInstance, msg) { + var f, obj = { + messageSetWireFormat: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + noStandardDescriptorAccessor: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + mapEntry: (f = jspb.Message.getBooleanField(msg, 7)) == null ? undefined : f, + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.MessageOptions.extensions, proto.google.protobuf.MessageOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.MessageOptions} + */ +proto.google.protobuf.MessageOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.MessageOptions; + return proto.google.protobuf.MessageOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.MessageOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.MessageOptions} + */ +proto.google.protobuf.MessageOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMessageSetWireFormat(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNoStandardDescriptorAccessor(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMapEntry(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.MessageOptions.extensionsBinary, + proto.google.protobuf.MessageOptions.prototype.getExtension, + proto.google.protobuf.MessageOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.MessageOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.MessageOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.MessageOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MessageOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBool( + 7, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.MessageOptions.extensionsBinary, proto.google.protobuf.MessageOptions.prototype.getExtension); +}; + + +/** + * optional bool message_set_wire_format = 1; + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getMessageSetWireFormat = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.setMessageSetWireFormat = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearMessageSetWireFormat = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasMessageSetWireFormat = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool no_standard_descriptor_accessor = 2; + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getNoStandardDescriptorAccessor = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.setNoStandardDescriptorAccessor = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearNoStandardDescriptorAccessor = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasNoStandardDescriptorAccessor = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool deprecated = 3; + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool map_entry = 7; + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getMapEntry = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.setMapEntry = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearMapEntry = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasMapEntry = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.MessageOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.MessageOptions} returns this +*/ +proto.google.protobuf.MessageOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.MessageOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FieldOptions.repeatedFields_ = [999]; + + + +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.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FieldOptions.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.google.protobuf.FieldOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldOptions.toObject = function(includeInstance, msg) { + var f, obj = { + ctype: jspb.Message.getFieldWithDefault(msg, 1, 0), + packed: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, + jstype: jspb.Message.getFieldWithDefault(msg, 6, 0), + lazy: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + weak: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.FieldOptions.extensions, proto.google.protobuf.FieldOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FieldOptions} + */ +proto.google.protobuf.FieldOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FieldOptions; + return proto.google.protobuf.FieldOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FieldOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FieldOptions} + */ +proto.google.protobuf.FieldOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.google.protobuf.FieldOptions.CType} */ (reader.readEnum()); + msg.setCtype(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPacked(value); + break; + case 6: + var value = /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (reader.readEnum()); + msg.setJstype(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLazy(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setWeak(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.FieldOptions.extensionsBinary, + proto.google.protobuf.FieldOptions.prototype.getExtension, + proto.google.protobuf.FieldOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FieldOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FieldOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FieldOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.FieldOptions.CType} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeEnum( + 6, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBool( + 5, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBool( + 10, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.FieldOptions.extensionsBinary, proto.google.protobuf.FieldOptions.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.FieldOptions.CType = { + STRING: 0, + CORD: 1, + STRING_PIECE: 2 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FieldOptions.JSType = { + JS_NORMAL: 0, + JS_STRING: 1, + JS_NUMBER: 2 +}; + +/** + * optional CType ctype = 1; + * @return {!proto.google.protobuf.FieldOptions.CType} + */ +proto.google.protobuf.FieldOptions.prototype.getCtype = function() { + return /** @type {!proto.google.protobuf.FieldOptions.CType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FieldOptions.CType} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setCtype = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearCtype = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasCtype = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool packed = 2; + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getPacked = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setPacked = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearPacked = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasPacked = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional JSType jstype = 6; + * @return {!proto.google.protobuf.FieldOptions.JSType} + */ +proto.google.protobuf.FieldOptions.prototype.getJstype = function() { + return /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FieldOptions.JSType} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setJstype = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearJstype = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasJstype = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bool lazy = 5; + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getLazy = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setLazy = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearLazy = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasLazy = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool deprecated = 3; + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool weak = 10; + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getWeak = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setWeak = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearWeak = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasWeak = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.FieldOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FieldOptions} returns this +*/ +proto.google.protobuf.FieldOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.FieldOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.OneofOptions.repeatedFields_ = [999]; + + + +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.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.OneofOptions.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.google.protobuf.OneofOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofOptions.toObject = function(includeInstance, msg) { + var f, obj = { + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.OneofOptions.extensions, proto.google.protobuf.OneofOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.OneofOptions} + */ +proto.google.protobuf.OneofOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.OneofOptions; + return proto.google.protobuf.OneofOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.OneofOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.OneofOptions} + */ +proto.google.protobuf.OneofOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.OneofOptions.extensionsBinary, + proto.google.protobuf.OneofOptions.prototype.getExtension, + proto.google.protobuf.OneofOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.OneofOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.OneofOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.OneofOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.OneofOptions.extensionsBinary, proto.google.protobuf.OneofOptions.prototype.getExtension); +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.OneofOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.OneofOptions} returns this +*/ +proto.google.protobuf.OneofOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.OneofOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.OneofOptions} returns this + */ +proto.google.protobuf.OneofOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.EnumOptions.repeatedFields_ = [999]; + + + +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.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumOptions.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.google.protobuf.EnumOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumOptions.toObject = function(includeInstance, msg) { + var f, obj = { + allowAlias: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.EnumOptions.extensions, proto.google.protobuf.EnumOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumOptions} + */ +proto.google.protobuf.EnumOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumOptions; + return proto.google.protobuf.EnumOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumOptions} + */ +proto.google.protobuf.EnumOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowAlias(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.EnumOptions.extensionsBinary, + proto.google.protobuf.EnumOptions.prototype.getExtension, + proto.google.protobuf.EnumOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.EnumOptions.extensionsBinary, proto.google.protobuf.EnumOptions.prototype.getExtension); +}; + + +/** + * optional bool allow_alias = 2; + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.getAllowAlias = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.setAllowAlias = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.clearAllowAlias = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.hasAllowAlias = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool deprecated = 3; + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.EnumOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumOptions} returns this +*/ +proto.google.protobuf.EnumOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.EnumOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.EnumValueOptions.repeatedFields_ = [999]; + + + +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.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumValueOptions.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.google.protobuf.EnumValueOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueOptions.toObject = function(includeInstance, msg) { + var f, obj = { + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.EnumValueOptions.extensions, proto.google.protobuf.EnumValueOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumValueOptions} + */ +proto.google.protobuf.EnumValueOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumValueOptions; + return proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumValueOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumValueOptions} + */ +proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.EnumValueOptions.extensionsBinary, + proto.google.protobuf.EnumValueOptions.prototype.getExtension, + proto.google.protobuf.EnumValueOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumValueOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumValueOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.EnumValueOptions.extensionsBinary, proto.google.protobuf.EnumValueOptions.prototype.getExtension); +}; + + +/** + * optional bool deprecated = 1; + * @return {boolean} + */ +proto.google.protobuf.EnumValueOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ +proto.google.protobuf.EnumValueOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ +proto.google.protobuf.EnumValueOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.EnumValueOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this +*/ +proto.google.protobuf.EnumValueOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.EnumValueOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ +proto.google.protobuf.EnumValueOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ServiceOptions.repeatedFields_ = [999]; + + + +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.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ServiceOptions.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.google.protobuf.ServiceOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceOptions.toObject = function(includeInstance, msg) { + var f, obj = { + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.ServiceOptions.extensions, proto.google.protobuf.ServiceOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ServiceOptions} + */ +proto.google.protobuf.ServiceOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ServiceOptions; + return proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ServiceOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ServiceOptions} + */ +proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 33: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.ServiceOptions.extensionsBinary, + proto.google.protobuf.ServiceOptions.prototype.getExtension, + proto.google.protobuf.ServiceOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ServiceOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ServiceOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ServiceOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 33)); + if (f != null) { + writer.writeBool( + 33, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.ServiceOptions.extensionsBinary, proto.google.protobuf.ServiceOptions.prototype.getExtension); +}; + + +/** + * optional bool deprecated = 33; + * @return {boolean} + */ +proto.google.protobuf.ServiceOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ +proto.google.protobuf.ServiceOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 33, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ +proto.google.protobuf.ServiceOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 33, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ServiceOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.ServiceOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ServiceOptions} returns this +*/ +proto.google.protobuf.ServiceOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.ServiceOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ +proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.MethodOptions.repeatedFields_ = [999]; + + + +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.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.MethodOptions.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.google.protobuf.MethodOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodOptions.toObject = function(includeInstance, msg) { + var f, obj = { + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), + idempotencyLevel: jspb.Message.getFieldWithDefault(msg, 34, 0), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.MethodOptions.extensions, proto.google.protobuf.MethodOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.MethodOptions} + */ +proto.google.protobuf.MethodOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.MethodOptions; + return proto.google.protobuf.MethodOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.MethodOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.MethodOptions} + */ +proto.google.protobuf.MethodOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 33: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 34: + var value = /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (reader.readEnum()); + msg.setIdempotencyLevel(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.MethodOptions.extensionsBinary, + proto.google.protobuf.MethodOptions.prototype.getExtension, + proto.google.protobuf.MethodOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.MethodOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.MethodOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.MethodOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 33)); + if (f != null) { + writer.writeBool( + 33, + f + ); + } + f = /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (jspb.Message.getField(message, 34)); + if (f != null) { + writer.writeEnum( + 34, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.MethodOptions.extensionsBinary, proto.google.protobuf.MethodOptions.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.MethodOptions.IdempotencyLevel = { + IDEMPOTENCY_UNKNOWN: 0, + NO_SIDE_EFFECTS: 1, + IDEMPOTENT: 2 +}; + +/** + * optional bool deprecated = 33; + * @return {boolean} + */ +proto.google.protobuf.MethodOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 33, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 33, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * optional IdempotencyLevel idempotency_level = 34; + * @return {!proto.google.protobuf.MethodOptions.IdempotencyLevel} + */ +proto.google.protobuf.MethodOptions.prototype.getIdempotencyLevel = function() { + return /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (jspb.Message.getFieldWithDefault(this, 34, 0)); +}; + + +/** + * @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.setIdempotencyLevel = function(value) { + return jspb.Message.setField(this, 34, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.clearIdempotencyLevel = function() { + return jspb.Message.setField(this, 34, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodOptions.prototype.hasIdempotencyLevel = function() { + return jspb.Message.getField(this, 34) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.MethodOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.MethodOptions} returns this +*/ +proto.google.protobuf.MethodOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.MethodOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.UninterpretedOption.repeatedFields_ = [2]; + + + +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.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.UninterpretedOption.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.google.protobuf.UninterpretedOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.toObject = function(includeInstance, msg) { + var f, obj = { + nameList: jspb.Message.toObjectList(msg.getNameList(), + proto.google.protobuf.UninterpretedOption.NamePart.toObject, includeInstance), + identifierValue: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + positiveIntValue: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + negativeIntValue: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + doubleValue: (f = jspb.Message.getOptionalFloatingPointField(msg, 6)) == null ? undefined : f, + stringValue: msg.getStringValue_asB64(), + aggregateValue: (f = jspb.Message.getField(msg, 8)) == null ? undefined : 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.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.UninterpretedOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.UninterpretedOption; + return proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.UninterpretedOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new proto.google.protobuf.UninterpretedOption.NamePart; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader); + msg.addName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setIdentifierValue(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPositiveIntValue(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNegativeIntValue(value); + break; + case 6: + var value = /** @type {number} */ (reader.readDouble()); + msg.setDoubleValue(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStringValue(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setAggregateValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.UninterpretedOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.UninterpretedOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNameList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeInt64( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeDouble( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } +}; + + + + + +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.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.UninterpretedOption.NamePart.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.google.protobuf.UninterpretedOption.NamePart} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.NamePart.toObject = function(includeInstance, msg) { + var f, obj = { + namePart: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + isExtension: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : 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.google.protobuf.UninterpretedOption.NamePart} + */ +proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.UninterpretedOption.NamePart; + return proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} + */ +proto.google.protobuf.UninterpretedOption.NamePart.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.setNamePart(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsExtension(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.UninterpretedOption.NamePart} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * required string name_part = 1; + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.getNamePart = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.setNamePart = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearNamePart = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasNamePart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * required bool is_extension = 2; + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.getIsExtension = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.setIsExtension = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearIsExtension = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasIsExtension = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated NamePart name = 2; + * @return {!Array} + */ +proto.google.protobuf.UninterpretedOption.prototype.getNameList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption.NamePart, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this +*/ +proto.google.protobuf.UninterpretedOption.prototype.setNameList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption.NamePart=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} + */ +proto.google.protobuf.UninterpretedOption.prototype.addName = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.UninterpretedOption.NamePart, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearNameList = function() { + return this.setNameList([]); +}; + + +/** + * optional string identifier_value = 3; + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.prototype.getIdentifierValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setIdentifierValue = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearIdentifierValue = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasIdentifierValue = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 positive_int_value = 4; + * @return {number} + */ +proto.google.protobuf.UninterpretedOption.prototype.getPositiveIntValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setPositiveIntValue = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearPositiveIntValue = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasPositiveIntValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 negative_int_value = 5; + * @return {number} + */ +proto.google.protobuf.UninterpretedOption.prototype.getNegativeIntValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setNegativeIntValue = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearNegativeIntValue = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasNegativeIntValue = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional double double_value = 6; + * @return {number} + */ +proto.google.protobuf.UninterpretedOption.prototype.getDoubleValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setDoubleValue = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearDoubleValue = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasDoubleValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes string_value = 7; + * @return {!(string|Uint8Array)} + */ +proto.google.protobuf.UninterpretedOption.prototype.getStringValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes string_value = 7; + * This is a type-conversion wrapper around `getStringValue()` + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStringValue())); +}; + + +/** + * optional bytes string_value = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStringValue()` + * @return {!Uint8Array} + */ +proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStringValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setStringValue = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearStringValue = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasStringValue = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string aggregate_value = 8; + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.prototype.getAggregateValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setAggregateValue = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearAggregateValue = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasAggregateValue = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.SourceCodeInfo.repeatedFields_ = [1]; + + + +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.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.SourceCodeInfo.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.google.protobuf.SourceCodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + locationList: jspb.Message.toObjectList(msg.getLocationList(), + proto.google.protobuf.SourceCodeInfo.Location.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.SourceCodeInfo} + */ +proto.google.protobuf.SourceCodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.SourceCodeInfo; + return proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.SourceCodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.SourceCodeInfo} + */ +proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.SourceCodeInfo.Location; + reader.readMessage(value,proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader); + msg.addLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.SourceCodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.SourceCodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_ = [1,2,6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.SourceCodeInfo.Location.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.google.protobuf.SourceCodeInfo.Location} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.Location.toObject = function(includeInstance, msg) { + var f, obj = { + pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + spanList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + leadingComments: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + trailingComments: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + leadingDetachedCommentsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : 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.google.protobuf.SourceCodeInfo.Location} + */ +proto.google.protobuf.SourceCodeInfo.Location.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.SourceCodeInfo.Location; + return proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} + */ +proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addPath(values[i]); + } + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addSpan(values[i]); + } + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLeadingComments(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setTrailingComments(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addLeadingDetachedComments(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.SourceCodeInfo.Location} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathList(); + if (f.length > 0) { + writer.writePackedInt32( + 1, + f + ); + } + f = message.getSpanList(); + if (f.length > 0) { + writer.writePackedInt32( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = message.getLeadingDetachedCommentsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } +}; + + +/** + * repeated int32 path = 1; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getPathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setPathList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.addPath = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearPathList = function() { + return this.setPathList([]); +}; + + +/** + * repeated int32 span = 2; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getSpanList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setSpanList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.addSpan = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearSpanList = function() { + return this.setSpanList([]); +}; + + +/** + * optional string leading_comments = 3; + * @return {string} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingComments = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingComments = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingComments = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.hasLeadingComments = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string trailing_comments = 4; + * @return {string} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getTrailingComments = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setTrailingComments = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearTrailingComments = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.hasTrailingComments = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated string leading_detached_comments = 6; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingDetachedCommentsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingDetachedCommentsList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.addLeadingDetachedComments = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingDetachedCommentsList = function() { + return this.setLeadingDetachedCommentsList([]); +}; + + +/** + * repeated Location location = 1; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.prototype.getLocationList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.SourceCodeInfo.Location, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo} returns this +*/ +proto.google.protobuf.SourceCodeInfo.prototype.setLocationList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.SourceCodeInfo.Location=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} + */ +proto.google.protobuf.SourceCodeInfo.prototype.addLocation = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.SourceCodeInfo.Location, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo} returns this + */ +proto.google.protobuf.SourceCodeInfo.prototype.clearLocationList = function() { + return this.setLocationList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.GeneratedCodeInfo.repeatedFields_ = [1]; + + + +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.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.GeneratedCodeInfo.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.google.protobuf.GeneratedCodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + annotationList: jspb.Message.toObjectList(msg.getAnnotationList(), + proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.GeneratedCodeInfo} + */ +proto.google.protobuf.GeneratedCodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.GeneratedCodeInfo; + return proto.google.protobuf.GeneratedCodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.GeneratedCodeInfo} + */ +proto.google.protobuf.GeneratedCodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.GeneratedCodeInfo.Annotation; + reader.readMessage(value,proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader); + msg.addAnnotation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.GeneratedCodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAnnotationList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_ = [1]; + + + +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.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.GeneratedCodeInfo.Annotation.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.google.protobuf.GeneratedCodeInfo.Annotation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject = function(includeInstance, msg) { + var f, obj = { + pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + sourceFile: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + begin: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 4)) == null ? undefined : 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.google.protobuf.GeneratedCodeInfo.Annotation} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.GeneratedCodeInfo.Annotation; + return proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addPath(values[i]); + } + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceFile(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBegin(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathList(); + if (f.length > 0) { + writer.writePackedInt32( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * repeated int32 path = 1; + * @return {!Array} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getPathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setPathList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.addPath = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearPathList = function() { + return this.setPathList([]); +}; + + +/** + * optional string source_file = 2; + * @return {string} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSourceFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSourceFile = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSourceFile = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasSourceFile = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int32 begin = 3; + * @return {number} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getBegin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setBegin = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearBegin = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasBegin = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int32 end = 4; + * @return {number} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setEnd = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearEnd = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasEnd = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated Annotation annotation = 1; + * @return {!Array} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.getAnnotationList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.GeneratedCodeInfo.Annotation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this +*/ +proto.google.protobuf.GeneratedCodeInfo.prototype.setAnnotationList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.addAnnotation = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.GeneratedCodeInfo.Annotation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.clearAnnotationList = function() { + return this.setAnnotationList([]); +}; + + +goog.object.extend(exports, proto.google.protobuf); diff --git a/src/proto/js/google/protobuf/duration_grpc_pb.js b/src/proto/js/google/protobuf/duration_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/google/protobuf/duration_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/google/protobuf/duration_pb.d.ts b/src/proto/js/google/protobuf/duration_pb.d.ts new file mode 100644 index 000000000..7bf35b84c --- /dev/null +++ b/src/proto/js/google/protobuf/duration_pb.d.ts @@ -0,0 +1,30 @@ +// package: google.protobuf +// file: google/protobuf/duration.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Duration extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): Duration; + getNanos(): number; + setNanos(value: number): Duration; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Duration.AsObject; + static toObject(includeInstance: boolean, msg: Duration): Duration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Duration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Duration; + static deserializeBinaryFromReader(message: Duration, reader: jspb.BinaryReader): Duration; +} + +export namespace Duration { + export type AsObject = { + seconds: number, + nanos: number, + } +} diff --git a/src/proto/js/google/protobuf/duration_pb.js b/src/proto/js/google/protobuf/duration_pb.js new file mode 100644 index 000000000..74166f0fd --- /dev/null +++ b/src/proto/js/google/protobuf/duration_pb.js @@ -0,0 +1,199 @@ +// source: google/protobuf/duration.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.Duration', null, global); +/** + * 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.google.protobuf.Duration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Duration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Duration.displayName = 'proto.google.protobuf.Duration'; +} + + + +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.google.protobuf.Duration.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Duration.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.google.protobuf.Duration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Duration.toObject = function(includeInstance, msg) { + var f, obj = { + seconds: jspb.Message.getFieldWithDefault(msg, 1, 0), + nanos: jspb.Message.getFieldWithDefault(msg, 2, 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.google.protobuf.Duration} + */ +proto.google.protobuf.Duration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Duration; + return proto.google.protobuf.Duration.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Duration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Duration} + */ +proto.google.protobuf.Duration.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSeconds(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNanos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Duration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Duration.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Duration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Duration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSeconds(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getNanos(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int64 seconds = 1; + * @return {number} + */ +proto.google.protobuf.Duration.prototype.getSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Duration} returns this + */ +proto.google.protobuf.Duration.prototype.setSeconds = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 nanos = 2; + * @return {number} + */ +proto.google.protobuf.Duration.prototype.getNanos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Duration} returns this + */ +proto.google.protobuf.Duration.prototype.setNanos = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.protobuf); diff --git a/src/proto/js/google/protobuf/empty_grpc_pb.js b/src/proto/js/google/protobuf/empty_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/google/protobuf/empty_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/google/protobuf/empty_pb.d.ts b/src/proto/js/google/protobuf/empty_pb.d.ts new file mode 100644 index 000000000..7c053e755 --- /dev/null +++ b/src/proto/js/google/protobuf/empty_pb.d.ts @@ -0,0 +1,24 @@ +// package: google.protobuf +// file: google/protobuf/empty.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Empty extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Empty.AsObject; + static toObject(includeInstance: boolean, msg: Empty): Empty.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Empty, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Empty; + static deserializeBinaryFromReader(message: Empty, reader: jspb.BinaryReader): Empty; +} + +export namespace Empty { + export type AsObject = { + } +} diff --git a/src/proto/js/Test_pb.js b/src/proto/js/google/protobuf/empty_pb.js similarity index 58% rename from src/proto/js/Test_pb.js rename to src/proto/js/google/protobuf/empty_pb.js index e120a5de8..d85fa310a 100644 --- a/src/proto/js/Test_pb.js +++ b/src/proto/js/google/protobuf/empty_pb.js @@ -1,4 +1,4 @@ -// source: Test.proto +// source: google/protobuf/empty.proto /** * @fileoverview * @enhanceable @@ -14,7 +14,7 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -goog.exportSymbol('proto.testInterface.EchoMessage', null, global); +goog.exportSymbol('proto.google.protobuf.Empty', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -25,16 +25,16 @@ goog.exportSymbol('proto.testInterface.EchoMessage', null, global); * @extends {jspb.Message} * @constructor */ -proto.testInterface.EchoMessage = function(opt_data) { +proto.google.protobuf.Empty = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.testInterface.EchoMessage, jspb.Message); +goog.inherits(proto.google.protobuf.Empty, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.testInterface.EchoMessage.displayName = 'proto.testInterface.EchoMessage'; + proto.google.protobuf.Empty.displayName = 'proto.google.protobuf.Empty'; } @@ -52,8 +52,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.testInterface.EchoMessage.prototype.toObject = function(opt_includeInstance) { - return proto.testInterface.EchoMessage.toObject(opt_includeInstance, this); +proto.google.protobuf.Empty.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Empty.toObject(opt_includeInstance, this); }; @@ -62,13 +62,13 @@ proto.testInterface.EchoMessage.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.testInterface.EchoMessage} msg The msg instance to transform. + * @param {!proto.google.protobuf.Empty} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.testInterface.EchoMessage.toObject = function(includeInstance, msg) { +proto.google.protobuf.Empty.toObject = function(includeInstance, msg) { var f, obj = { - challenge: jspb.Message.getFieldWithDefault(msg, 1, "") + }; if (includeInstance) { @@ -82,33 +82,29 @@ proto.testInterface.EchoMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.testInterface.EchoMessage} + * @return {!proto.google.protobuf.Empty} */ -proto.testInterface.EchoMessage.deserializeBinary = function(bytes) { +proto.google.protobuf.Empty.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.testInterface.EchoMessage; - return proto.testInterface.EchoMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.google.protobuf.Empty; + return proto.google.protobuf.Empty.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.testInterface.EchoMessage} msg The message object to deserialize into. + * @param {!proto.google.protobuf.Empty} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.testInterface.EchoMessage} + * @return {!proto.google.protobuf.Empty} */ -proto.testInterface.EchoMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.google.protobuf.Empty.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.setChallenge(value); - break; default: reader.skipField(); break; @@ -122,9 +118,9 @@ proto.testInterface.EchoMessage.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.testInterface.EchoMessage.prototype.serializeBinary = function() { +proto.google.protobuf.Empty.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.testInterface.EchoMessage.serializeBinaryToWriter(this, writer); + proto.google.protobuf.Empty.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -132,38 +128,13 @@ proto.testInterface.EchoMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.testInterface.EchoMessage} message + * @param {!proto.google.protobuf.Empty} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.testInterface.EchoMessage.serializeBinaryToWriter = function(message, writer) { +proto.google.protobuf.Empty.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChallenge(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string challenge = 1; - * @return {string} - */ -proto.testInterface.EchoMessage.prototype.getChallenge = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.testInterface.EchoMessage} returns this - */ -proto.testInterface.EchoMessage.prototype.setChallenge = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); }; -goog.object.extend(exports, proto.testInterface); +goog.object.extend(exports, proto.google.protobuf); diff --git a/src/proto/js/google/protobuf/field_mask_grpc_pb.js b/src/proto/js/google/protobuf/field_mask_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/google/protobuf/field_mask_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/google/protobuf/field_mask_pb.d.ts b/src/proto/js/google/protobuf/field_mask_pb.d.ts new file mode 100644 index 000000000..6db6830ff --- /dev/null +++ b/src/proto/js/google/protobuf/field_mask_pb.d.ts @@ -0,0 +1,29 @@ +// package: google.protobuf +// file: google/protobuf/field_mask.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class FieldMask extends jspb.Message { + clearPathsList(): void; + getPathsList(): Array; + setPathsList(value: Array): FieldMask; + addPaths(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldMask.AsObject; + static toObject(includeInstance: boolean, msg: FieldMask): FieldMask.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldMask, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldMask; + static deserializeBinaryFromReader(message: FieldMask, reader: jspb.BinaryReader): FieldMask; +} + +export namespace FieldMask { + export type AsObject = { + pathsList: Array, + } +} diff --git a/src/proto/js/google/protobuf/field_mask_pb.js b/src/proto/js/google/protobuf/field_mask_pb.js new file mode 100644 index 000000000..67860a3a2 --- /dev/null +++ b/src/proto/js/google/protobuf/field_mask_pb.js @@ -0,0 +1,195 @@ +// source: google/protobuf/field_mask.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.FieldMask', null, global); +/** + * 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.google.protobuf.FieldMask = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FieldMask.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FieldMask, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldMask.displayName = 'proto.google.protobuf.FieldMask'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FieldMask.repeatedFields_ = [1]; + + + +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.google.protobuf.FieldMask.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FieldMask.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.google.protobuf.FieldMask} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldMask.toObject = function(includeInstance, msg) { + var f, obj = { + pathsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.google.protobuf.FieldMask} + */ +proto.google.protobuf.FieldMask.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FieldMask; + return proto.google.protobuf.FieldMask.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FieldMask} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FieldMask} + */ +proto.google.protobuf.FieldMask.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.addPaths(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FieldMask.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FieldMask.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FieldMask} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldMask.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string paths = 1; + * @return {!Array} + */ +proto.google.protobuf.FieldMask.prototype.getPathsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FieldMask} returns this + */ +proto.google.protobuf.FieldMask.prototype.setPathsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldMask} returns this + */ +proto.google.protobuf.FieldMask.prototype.addPaths = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FieldMask} returns this + */ +proto.google.protobuf.FieldMask.prototype.clearPathsList = function() { + return this.setPathsList([]); +}; + + +goog.object.extend(exports, proto.google.protobuf); diff --git a/src/proto/js/google/protobuf/struct_grpc_pb.js b/src/proto/js/google/protobuf/struct_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/google/protobuf/struct_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/google/protobuf/struct_pb.d.ts b/src/proto/js/google/protobuf/struct_pb.d.ts new file mode 100644 index 000000000..6d2e05612 --- /dev/null +++ b/src/proto/js/google/protobuf/struct_pb.d.ts @@ -0,0 +1,121 @@ +// package: google.protobuf +// file: google/protobuf/struct.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Struct extends jspb.Message { + + getFieldsMap(): jspb.Map; + clearFieldsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Struct.AsObject; + static toObject(includeInstance: boolean, msg: Struct): Struct.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Struct, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Struct; + static deserializeBinaryFromReader(message: Struct, reader: jspb.BinaryReader): Struct; +} + +export namespace Struct { + export type AsObject = { + + fieldsMap: Array<[string, Value.AsObject]>, + } +} + +export class Value extends jspb.Message { + + hasNullValue(): boolean; + clearNullValue(): void; + getNullValue(): NullValue; + setNullValue(value: NullValue): Value; + + hasNumberValue(): boolean; + clearNumberValue(): void; + getNumberValue(): number; + setNumberValue(value: number): Value; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): string; + setStringValue(value: string): Value; + + hasBoolValue(): boolean; + clearBoolValue(): void; + getBoolValue(): boolean; + setBoolValue(value: boolean): Value; + + hasStructValue(): boolean; + clearStructValue(): void; + getStructValue(): Struct | undefined; + setStructValue(value?: Struct): Value; + + hasListValue(): boolean; + clearListValue(): void; + getListValue(): ListValue | undefined; + setListValue(value?: ListValue): Value; + + getKindCase(): Value.KindCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Value.AsObject; + static toObject(includeInstance: boolean, msg: Value): Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Value; + static deserializeBinaryFromReader(message: Value, reader: jspb.BinaryReader): Value; +} + +export namespace Value { + export type AsObject = { + nullValue: NullValue, + numberValue: number, + stringValue: string, + boolValue: boolean, + structValue?: Struct.AsObject, + listValue?: ListValue.AsObject, + } + + export enum KindCase { + KIND_NOT_SET = 0, + NULL_VALUE = 1, + NUMBER_VALUE = 2, + STRING_VALUE = 3, + BOOL_VALUE = 4, + STRUCT_VALUE = 5, + LIST_VALUE = 6, + } + +} + +export class ListValue extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): ListValue; + addValues(value?: Value, index?: number): Value; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListValue.AsObject; + static toObject(includeInstance: boolean, msg: ListValue): ListValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListValue; + static deserializeBinaryFromReader(message: ListValue, reader: jspb.BinaryReader): ListValue; +} + +export namespace ListValue { + export type AsObject = { + valuesList: Array, + } +} + +export enum NullValue { + NULL_VALUE = 0, +} diff --git a/src/proto/js/google/protobuf/struct_pb.js b/src/proto/js/google/protobuf/struct_pb.js new file mode 100644 index 000000000..bff1ed412 --- /dev/null +++ b/src/proto/js/google/protobuf/struct_pb.js @@ -0,0 +1,947 @@ +// source: google/protobuf/struct.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.ListValue', null, global); +goog.exportSymbol('proto.google.protobuf.NullValue', null, global); +goog.exportSymbol('proto.google.protobuf.Struct', null, global); +goog.exportSymbol('proto.google.protobuf.Value', null, global); +goog.exportSymbol('proto.google.protobuf.Value.KindCase', null, global); +/** + * 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.google.protobuf.Struct = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Struct, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Struct.displayName = 'proto.google.protobuf.Struct'; +} +/** + * 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.google.protobuf.Value = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.protobuf.Value.oneofGroups_); +}; +goog.inherits(proto.google.protobuf.Value, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Value.displayName = 'proto.google.protobuf.Value'; +} +/** + * 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.google.protobuf.ListValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ListValue.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ListValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ListValue.displayName = 'proto.google.protobuf.ListValue'; +} + + + +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.google.protobuf.Struct.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Struct.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.google.protobuf.Struct} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Struct.toObject = function(includeInstance, msg) { + var f, obj = { + fieldsMap: (f = msg.getFieldsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.Struct} + */ +proto.google.protobuf.Struct.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Struct; + return proto.google.protobuf.Struct.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Struct} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Struct} + */ +proto.google.protobuf.Struct.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getFieldsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Struct.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Struct.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Struct} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Struct.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFieldsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * map fields = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.protobuf.Struct.prototype.getFieldsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.protobuf.Struct} returns this + */ +proto.google.protobuf.Struct.prototype.clearFieldsMap = function() { + this.getFieldsMap().clear(); + return this;}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.protobuf.Value.oneofGroups_ = [[1,2,3,4,5,6]]; + +/** + * @enum {number} + */ +proto.google.protobuf.Value.KindCase = { + KIND_NOT_SET: 0, + NULL_VALUE: 1, + NUMBER_VALUE: 2, + STRING_VALUE: 3, + BOOL_VALUE: 4, + STRUCT_VALUE: 5, + LIST_VALUE: 6 +}; + +/** + * @return {proto.google.protobuf.Value.KindCase} + */ +proto.google.protobuf.Value.prototype.getKindCase = function() { + return /** @type {proto.google.protobuf.Value.KindCase} */(jspb.Message.computeOneofCase(this, proto.google.protobuf.Value.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.google.protobuf.Value.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Value.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.google.protobuf.Value} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Value.toObject = function(includeInstance, msg) { + var f, obj = { + nullValue: jspb.Message.getFieldWithDefault(msg, 1, 0), + numberValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + stringValue: jspb.Message.getFieldWithDefault(msg, 3, ""), + boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + structValue: (f = msg.getStructValue()) && proto.google.protobuf.Struct.toObject(includeInstance, f), + listValue: (f = msg.getListValue()) && proto.google.protobuf.ListValue.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.google.protobuf.Value} + */ +proto.google.protobuf.Value.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Value; + return proto.google.protobuf.Value.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Value} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Value} + */ +proto.google.protobuf.Value.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.google.protobuf.NullValue} */ (reader.readEnum()); + msg.setNullValue(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setNumberValue(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setStringValue(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBoolValue(value); + break; + case 5: + var value = new proto.google.protobuf.Struct; + reader.readMessage(value,proto.google.protobuf.Struct.deserializeBinaryFromReader); + msg.setStructValue(value); + break; + case 6: + var value = new proto.google.protobuf.ListValue; + reader.readMessage(value,proto.google.protobuf.ListValue.deserializeBinaryFromReader); + msg.setListValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Value.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Value.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Value} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Value.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeDouble( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeBool( + 4, + f + ); + } + f = message.getStructValue(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.google.protobuf.Struct.serializeBinaryToWriter + ); + } + f = message.getListValue(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.google.protobuf.ListValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional NullValue null_value = 1; + * @return {!proto.google.protobuf.NullValue} + */ +proto.google.protobuf.Value.prototype.getNullValue = function() { + return /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.google.protobuf.NullValue} value + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.setNullValue = function(value) { + return jspb.Message.setOneofField(this, 1, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearNullValue = function() { + return jspb.Message.setOneofField(this, 1, proto.google.protobuf.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasNullValue = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional double number_value = 2; + * @return {number} + */ +proto.google.protobuf.Value.prototype.getNumberValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.setNumberValue = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearNumberValue = function() { + return jspb.Message.setOneofField(this, 2, proto.google.protobuf.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasNumberValue = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string string_value = 3; + * @return {string} + */ +proto.google.protobuf.Value.prototype.getStringValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.setStringValue = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearStringValue = function() { + return jspb.Message.setOneofField(this, 3, proto.google.protobuf.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasStringValue = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool bool_value = 4; + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.getBoolValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.setBoolValue = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearBoolValue = function() { + return jspb.Message.setOneofField(this, 4, proto.google.protobuf.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasBoolValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Struct struct_value = 5; + * @return {?proto.google.protobuf.Struct} + */ +proto.google.protobuf.Value.prototype.getStructValue = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.Struct, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.google.protobuf.Value} returns this +*/ +proto.google.protobuf.Value.prototype.setStructValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearStructValue = function() { + return this.setStructValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasStructValue = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ListValue list_value = 6; + * @return {?proto.google.protobuf.ListValue} + */ +proto.google.protobuf.Value.prototype.getListValue = function() { + return /** @type{?proto.google.protobuf.ListValue} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.ListValue, 6)); +}; + + +/** + * @param {?proto.google.protobuf.ListValue|undefined} value + * @return {!proto.google.protobuf.Value} returns this +*/ +proto.google.protobuf.Value.prototype.setListValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearListValue = function() { + return this.setListValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasListValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ListValue.repeatedFields_ = [1]; + + + +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.google.protobuf.ListValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ListValue.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.google.protobuf.ListValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ListValue.toObject = function(includeInstance, msg) { + var f, obj = { + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + proto.google.protobuf.Value.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ListValue} + */ +proto.google.protobuf.ListValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ListValue; + return proto.google.protobuf.ListValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ListValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ListValue} + */ +proto.google.protobuf.ListValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.Value; + reader.readMessage(value,proto.google.protobuf.Value.deserializeBinaryFromReader); + msg.addValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ListValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ListValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ListValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ListValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.Value.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Value values = 1; + * @return {!Array} + */ +proto.google.protobuf.ListValue.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.Value, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ListValue} returns this +*/ +proto.google.protobuf.ListValue.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.Value=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Value} + */ +proto.google.protobuf.ListValue.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ListValue} returns this + */ +proto.google.protobuf.ListValue.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.NullValue = { + NULL_VALUE: 0 +}; + +goog.object.extend(exports, proto.google.protobuf); +/* This code will be inserted into generated code for + * google/protobuf/struct.proto. */ + +/** + * Typedef representing plain JavaScript values that can go into a + * Struct. + * @typedef {null|number|string|boolean|Array|Object} + */ +proto.google.protobuf.JavaScriptValue; + + +/** + * Converts this Value object to a plain JavaScript value. + * @return {?proto.google.protobuf.JavaScriptValue} a plain JavaScript + * value representing this Struct. + */ +proto.google.protobuf.Value.prototype.toJavaScript = function() { + var kindCase = proto.google.protobuf.Value.KindCase; + switch (this.getKindCase()) { + case kindCase.NULL_VALUE: + return null; + case kindCase.NUMBER_VALUE: + return this.getNumberValue(); + case kindCase.STRING_VALUE: + return this.getStringValue(); + case kindCase.BOOL_VALUE: + return this.getBoolValue(); + case kindCase.STRUCT_VALUE: + return this.getStructValue().toJavaScript(); + case kindCase.LIST_VALUE: + return this.getListValue().toJavaScript(); + default: + throw new Error('Unexpected struct type'); + } +}; + + +/** + * Converts this JavaScript value to a new Value proto. + * @param {!proto.google.protobuf.JavaScriptValue} value The value to + * convert. + * @return {!proto.google.protobuf.Value} The newly constructed value. + */ +proto.google.protobuf.Value.fromJavaScript = function(value) { + var ret = new proto.google.protobuf.Value(); + switch (goog.typeOf(value)) { + case 'string': + ret.setStringValue(/** @type {string} */ (value)); + break; + case 'number': + ret.setNumberValue(/** @type {number} */ (value)); + break; + case 'boolean': + ret.setBoolValue(/** @type {boolean} */ (value)); + break; + case 'null': + ret.setNullValue(proto.google.protobuf.NullValue.NULL_VALUE); + break; + case 'array': + ret.setListValue(proto.google.protobuf.ListValue.fromJavaScript( + /** @type{!Array} */ (value))); + break; + case 'object': + ret.setStructValue(proto.google.protobuf.Struct.fromJavaScript( + /** @type{!Object} */ (value))); + break; + default: + throw new Error('Unexpected struct type.'); + } + + return ret; +}; + + +/** + * Converts this ListValue object to a plain JavaScript array. + * @return {!Array} a plain JavaScript array representing this List. + */ +proto.google.protobuf.ListValue.prototype.toJavaScript = function() { + var ret = []; + var values = this.getValuesList(); + + for (var i = 0; i < values.length; i++) { + ret[i] = values[i].toJavaScript(); + } + + return ret; +}; + + +/** + * Constructs a ListValue protobuf from this plain JavaScript array. + * @param {!Array} array a plain JavaScript array + * @return {proto.google.protobuf.ListValue} a new ListValue object + */ +proto.google.protobuf.ListValue.fromJavaScript = function(array) { + var ret = new proto.google.protobuf.ListValue(); + + for (var i = 0; i < array.length; i++) { + ret.addValues(proto.google.protobuf.Value.fromJavaScript(array[i])); + } + + return ret; +}; + + +/** + * Converts this Struct object to a plain JavaScript object. + * @return {!Object} a plain + * JavaScript object representing this Struct. + */ +proto.google.protobuf.Struct.prototype.toJavaScript = function() { + var ret = {}; + + this.getFieldsMap().forEach(function(value, key) { + ret[key] = value.toJavaScript(); + }); + + return ret; +}; + + +/** + * Constructs a Struct protobuf from this plain JavaScript object. + * @param {!Object} obj a plain JavaScript object + * @return {proto.google.protobuf.Struct} a new Struct object + */ +proto.google.protobuf.Struct.fromJavaScript = function(obj) { + var ret = new proto.google.protobuf.Struct(); + var map = ret.getFieldsMap(); + + for (var property in obj) { + var val = obj[property]; + map.set(property, proto.google.protobuf.Value.fromJavaScript(val)); + } + + return ret; +}; diff --git a/src/proto/js/google/protobuf/timestamp_grpc_pb.js b/src/proto/js/google/protobuf/timestamp_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/google/protobuf/timestamp_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/google/protobuf/timestamp_pb.d.ts b/src/proto/js/google/protobuf/timestamp_pb.d.ts new file mode 100644 index 000000000..bfc4b376c --- /dev/null +++ b/src/proto/js/google/protobuf/timestamp_pb.d.ts @@ -0,0 +1,30 @@ +// package: google.protobuf +// file: google/protobuf/timestamp.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Timestamp extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): Timestamp; + getNanos(): number; + setNanos(value: number): Timestamp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Timestamp.AsObject; + static toObject(includeInstance: boolean, msg: Timestamp): Timestamp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Timestamp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Timestamp; + static deserializeBinaryFromReader(message: Timestamp, reader: jspb.BinaryReader): Timestamp; +} + +export namespace Timestamp { + export type AsObject = { + seconds: number, + nanos: number, + } +} diff --git a/src/proto/js/google/protobuf/timestamp_pb.js b/src/proto/js/google/protobuf/timestamp_pb.js new file mode 100644 index 000000000..6881a1d93 --- /dev/null +++ b/src/proto/js/google/protobuf/timestamp_pb.js @@ -0,0 +1,235 @@ +// source: google/protobuf/timestamp.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.Timestamp', null, global); +/** + * 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.google.protobuf.Timestamp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Timestamp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Timestamp.displayName = 'proto.google.protobuf.Timestamp'; +} + + + +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.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Timestamp.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.google.protobuf.Timestamp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Timestamp.toObject = function(includeInstance, msg) { + var f, obj = { + seconds: jspb.Message.getFieldWithDefault(msg, 1, 0), + nanos: jspb.Message.getFieldWithDefault(msg, 2, 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.google.protobuf.Timestamp} + */ +proto.google.protobuf.Timestamp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Timestamp; + return proto.google.protobuf.Timestamp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Timestamp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Timestamp} + */ +proto.google.protobuf.Timestamp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSeconds(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNanos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Timestamp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Timestamp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Timestamp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Timestamp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSeconds(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getNanos(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int64 seconds = 1; + * @return {number} + */ +proto.google.protobuf.Timestamp.prototype.getSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Timestamp} returns this + */ +proto.google.protobuf.Timestamp.prototype.setSeconds = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 nanos = 2; + * @return {number} + */ +proto.google.protobuf.Timestamp.prototype.getNanos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Timestamp} returns this + */ +proto.google.protobuf.Timestamp.prototype.setNanos = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.protobuf); +/* This code will be inserted into generated code for + * google/protobuf/timestamp.proto. */ + +/** + * Returns a JavaScript 'Date' object corresponding to this Timestamp. + * @return {!Date} + */ +proto.google.protobuf.Timestamp.prototype.toDate = function() { + var seconds = this.getSeconds(); + var nanos = this.getNanos(); + + return new Date((seconds * 1000) + (nanos / 1000000)); +}; + + +/** + * Sets the value of this Timestamp object to be the given Date. + * @param {!Date} value The value to set. + */ +proto.google.protobuf.Timestamp.prototype.fromDate = function(value) { + this.setSeconds(Math.floor(value.getTime() / 1000)); + this.setNanos(value.getMilliseconds() * 1000000); +}; + + +/** + * Factory method that returns a Timestamp object with value equal to + * the given Date. + * @param {!Date} value The value to set. + * @return {!proto.google.protobuf.Timestamp} + */ +proto.google.protobuf.Timestamp.fromDate = function(value) { + var timestamp = new proto.google.protobuf.Timestamp(); + timestamp.fromDate(value); + return timestamp; +}; diff --git a/src/proto/js/google/protobuf/wrappers_grpc_pb.js b/src/proto/js/google/protobuf/wrappers_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/google/protobuf/wrappers_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/google/protobuf/wrappers_pb.d.ts b/src/proto/js/google/protobuf/wrappers_pb.d.ts new file mode 100644 index 000000000..ab7b461b5 --- /dev/null +++ b/src/proto/js/google/protobuf/wrappers_pb.d.ts @@ -0,0 +1,189 @@ +// package: google.protobuf +// file: google/protobuf/wrappers.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class DoubleValue extends jspb.Message { + getValue(): number; + setValue(value: number): DoubleValue; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DoubleValue.AsObject; + static toObject(includeInstance: boolean, msg: DoubleValue): DoubleValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DoubleValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DoubleValue; + static deserializeBinaryFromReader(message: DoubleValue, reader: jspb.BinaryReader): DoubleValue; +} + +export namespace DoubleValue { + export type AsObject = { + value: number, + } +} + +export class FloatValue extends jspb.Message { + getValue(): number; + setValue(value: number): FloatValue; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FloatValue.AsObject; + static toObject(includeInstance: boolean, msg: FloatValue): FloatValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FloatValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FloatValue; + static deserializeBinaryFromReader(message: FloatValue, reader: jspb.BinaryReader): FloatValue; +} + +export namespace FloatValue { + export type AsObject = { + value: number, + } +} + +export class Int64Value extends jspb.Message { + getValue(): number; + setValue(value: number): Int64Value; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Int64Value.AsObject; + static toObject(includeInstance: boolean, msg: Int64Value): Int64Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Int64Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Int64Value; + static deserializeBinaryFromReader(message: Int64Value, reader: jspb.BinaryReader): Int64Value; +} + +export namespace Int64Value { + export type AsObject = { + value: number, + } +} + +export class UInt64Value extends jspb.Message { + getValue(): number; + setValue(value: number): UInt64Value; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UInt64Value.AsObject; + static toObject(includeInstance: boolean, msg: UInt64Value): UInt64Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UInt64Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UInt64Value; + static deserializeBinaryFromReader(message: UInt64Value, reader: jspb.BinaryReader): UInt64Value; +} + +export namespace UInt64Value { + export type AsObject = { + value: number, + } +} + +export class Int32Value extends jspb.Message { + getValue(): number; + setValue(value: number): Int32Value; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Int32Value.AsObject; + static toObject(includeInstance: boolean, msg: Int32Value): Int32Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Int32Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Int32Value; + static deserializeBinaryFromReader(message: Int32Value, reader: jspb.BinaryReader): Int32Value; +} + +export namespace Int32Value { + export type AsObject = { + value: number, + } +} + +export class UInt32Value extends jspb.Message { + getValue(): number; + setValue(value: number): UInt32Value; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UInt32Value.AsObject; + static toObject(includeInstance: boolean, msg: UInt32Value): UInt32Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UInt32Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UInt32Value; + static deserializeBinaryFromReader(message: UInt32Value, reader: jspb.BinaryReader): UInt32Value; +} + +export namespace UInt32Value { + export type AsObject = { + value: number, + } +} + +export class BoolValue extends jspb.Message { + getValue(): boolean; + setValue(value: boolean): BoolValue; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoolValue.AsObject; + static toObject(includeInstance: boolean, msg: BoolValue): BoolValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoolValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoolValue; + static deserializeBinaryFromReader(message: BoolValue, reader: jspb.BinaryReader): BoolValue; +} + +export namespace BoolValue { + export type AsObject = { + value: boolean, + } +} + +export class StringValue extends jspb.Message { + getValue(): string; + setValue(value: string): StringValue; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StringValue.AsObject; + static toObject(includeInstance: boolean, msg: StringValue): StringValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StringValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StringValue; + static deserializeBinaryFromReader(message: StringValue, reader: jspb.BinaryReader): StringValue; +} + +export namespace StringValue { + export type AsObject = { + value: string, + } +} + +export class BytesValue extends jspb.Message { + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): BytesValue; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BytesValue.AsObject; + static toObject(includeInstance: boolean, msg: BytesValue): BytesValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BytesValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BytesValue; + static deserializeBinaryFromReader(message: BytesValue, reader: jspb.BinaryReader): BytesValue; +} + +export namespace BytesValue { + export type AsObject = { + value: Uint8Array | string, + } +} diff --git a/src/proto/js/google/protobuf/wrappers_pb.js b/src/proto/js/google/protobuf/wrappers_pb.js new file mode 100644 index 000000000..9c89af542 --- /dev/null +++ b/src/proto/js/google/protobuf/wrappers_pb.js @@ -0,0 +1,1409 @@ +// source: google/protobuf/wrappers.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.BoolValue', null, global); +goog.exportSymbol('proto.google.protobuf.BytesValue', null, global); +goog.exportSymbol('proto.google.protobuf.DoubleValue', null, global); +goog.exportSymbol('proto.google.protobuf.FloatValue', null, global); +goog.exportSymbol('proto.google.protobuf.Int32Value', null, global); +goog.exportSymbol('proto.google.protobuf.Int64Value', null, global); +goog.exportSymbol('proto.google.protobuf.StringValue', null, global); +goog.exportSymbol('proto.google.protobuf.UInt32Value', null, global); +goog.exportSymbol('proto.google.protobuf.UInt64Value', null, global); +/** + * 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.google.protobuf.DoubleValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DoubleValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DoubleValue.displayName = 'proto.google.protobuf.DoubleValue'; +} +/** + * 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.google.protobuf.FloatValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.FloatValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FloatValue.displayName = 'proto.google.protobuf.FloatValue'; +} +/** + * 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.google.protobuf.Int64Value = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Int64Value, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Int64Value.displayName = 'proto.google.protobuf.Int64Value'; +} +/** + * 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.google.protobuf.UInt64Value = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.UInt64Value, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.UInt64Value.displayName = 'proto.google.protobuf.UInt64Value'; +} +/** + * 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.google.protobuf.Int32Value = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Int32Value, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Int32Value.displayName = 'proto.google.protobuf.Int32Value'; +} +/** + * 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.google.protobuf.UInt32Value = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.UInt32Value, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.UInt32Value.displayName = 'proto.google.protobuf.UInt32Value'; +} +/** + * 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.google.protobuf.BoolValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.BoolValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.BoolValue.displayName = 'proto.google.protobuf.BoolValue'; +} +/** + * 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.google.protobuf.StringValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.StringValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.StringValue.displayName = 'proto.google.protobuf.StringValue'; +} +/** + * 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.google.protobuf.BytesValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.BytesValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.BytesValue.displayName = 'proto.google.protobuf.BytesValue'; +} + + + +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.google.protobuf.DoubleValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.DoubleValue.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.google.protobuf.DoubleValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DoubleValue.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.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.google.protobuf.DoubleValue} + */ +proto.google.protobuf.DoubleValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.DoubleValue; + return proto.google.protobuf.DoubleValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.DoubleValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.DoubleValue} + */ +proto.google.protobuf.DoubleValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.DoubleValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.DoubleValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.DoubleValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DoubleValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } +}; + + +/** + * optional double value = 1; + * @return {number} + */ +proto.google.protobuf.DoubleValue.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.DoubleValue} returns this + */ +proto.google.protobuf.DoubleValue.prototype.setValue = function(value) { + return jspb.Message.setProto3FloatField(this, 1, 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.google.protobuf.FloatValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FloatValue.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.google.protobuf.FloatValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FloatValue.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.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.google.protobuf.FloatValue} + */ +proto.google.protobuf.FloatValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FloatValue; + return proto.google.protobuf.FloatValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FloatValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FloatValue} + */ +proto.google.protobuf.FloatValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readFloat()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FloatValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FloatValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FloatValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FloatValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0.0) { + writer.writeFloat( + 1, + f + ); + } +}; + + +/** + * optional float value = 1; + * @return {number} + */ +proto.google.protobuf.FloatValue.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.FloatValue} returns this + */ +proto.google.protobuf.FloatValue.prototype.setValue = function(value) { + return jspb.Message.setProto3FloatField(this, 1, 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.google.protobuf.Int64Value.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Int64Value.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.google.protobuf.Int64Value} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Int64Value.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, 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.google.protobuf.Int64Value} + */ +proto.google.protobuf.Int64Value.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Int64Value; + return proto.google.protobuf.Int64Value.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Int64Value} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Int64Value} + */ +proto.google.protobuf.Int64Value.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Int64Value.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Int64Value.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Int64Value} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Int64Value.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 value = 1; + * @return {number} + */ +proto.google.protobuf.Int64Value.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Int64Value} returns this + */ +proto.google.protobuf.Int64Value.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 1, 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.google.protobuf.UInt64Value.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.UInt64Value.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.google.protobuf.UInt64Value} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UInt64Value.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, 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.google.protobuf.UInt64Value} + */ +proto.google.protobuf.UInt64Value.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.UInt64Value; + return proto.google.protobuf.UInt64Value.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.UInt64Value} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.UInt64Value} + */ +proto.google.protobuf.UInt64Value.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.UInt64Value.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.UInt64Value.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.UInt64Value} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UInt64Value.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 value = 1; + * @return {number} + */ +proto.google.protobuf.UInt64Value.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.UInt64Value} returns this + */ +proto.google.protobuf.UInt64Value.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 1, 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.google.protobuf.Int32Value.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Int32Value.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.google.protobuf.Int32Value} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Int32Value.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, 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.google.protobuf.Int32Value} + */ +proto.google.protobuf.Int32Value.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Int32Value; + return proto.google.protobuf.Int32Value.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Int32Value} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Int32Value} + */ +proto.google.protobuf.Int32Value.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.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Int32Value.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Int32Value.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Int32Value} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Int32Value.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 value = 1; + * @return {number} + */ +proto.google.protobuf.Int32Value.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Int32Value} returns this + */ +proto.google.protobuf.Int32Value.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 1, 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.google.protobuf.UInt32Value.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.UInt32Value.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.google.protobuf.UInt32Value} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UInt32Value.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, 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.google.protobuf.UInt32Value} + */ +proto.google.protobuf.UInt32Value.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.UInt32Value; + return proto.google.protobuf.UInt32Value.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.UInt32Value} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.UInt32Value} + */ +proto.google.protobuf.UInt32Value.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.UInt32Value.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.UInt32Value.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.UInt32Value} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UInt32Value.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } +}; + + +/** + * optional uint32 value = 1; + * @return {number} + */ +proto.google.protobuf.UInt32Value.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.UInt32Value} returns this + */ +proto.google.protobuf.UInt32Value.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 1, 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.google.protobuf.BoolValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.BoolValue.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.google.protobuf.BoolValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.BoolValue.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.BoolValue} + */ +proto.google.protobuf.BoolValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.BoolValue; + return proto.google.protobuf.BoolValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.BoolValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.BoolValue} + */ +proto.google.protobuf.BoolValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.BoolValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.BoolValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.BoolValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.BoolValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool value = 1; + * @return {boolean} + */ +proto.google.protobuf.BoolValue.prototype.getValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.BoolValue} returns this + */ +proto.google.protobuf.BoolValue.prototype.setValue = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, 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.google.protobuf.StringValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.StringValue.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.google.protobuf.StringValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.StringValue.toObject = function(includeInstance, msg) { + var f, obj = { + value: 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.google.protobuf.StringValue} + */ +proto.google.protobuf.StringValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.StringValue; + return proto.google.protobuf.StringValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.StringValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.StringValue} + */ +proto.google.protobuf.StringValue.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.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.StringValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.StringValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.StringValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.StringValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string value = 1; + * @return {string} + */ +proto.google.protobuf.StringValue.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.StringValue} returns this + */ +proto.google.protobuf.StringValue.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 1, 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.google.protobuf.BytesValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.BytesValue.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.google.protobuf.BytesValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.BytesValue.toObject = function(includeInstance, msg) { + var f, obj = { + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.BytesValue} + */ +proto.google.protobuf.BytesValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.BytesValue; + return proto.google.protobuf.BytesValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.BytesValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.BytesValue} + */ +proto.google.protobuf.BytesValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.BytesValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.BytesValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.BytesValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.BytesValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes value = 1; + * @return {!(string|Uint8Array)} + */ +proto.google.protobuf.BytesValue.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes value = 1; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.google.protobuf.BytesValue.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.google.protobuf.BytesValue.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.protobuf.BytesValue} returns this + */ +proto.google.protobuf.BytesValue.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.google.protobuf); diff --git a/src/proto/js/polykey/v1/agent_service_grpc_pb.d.ts b/src/proto/js/polykey/v1/agent_service_grpc_pb.d.ts new file mode 100644 index 000000000..fa5375154 --- /dev/null +++ b/src/proto/js/polykey/v1/agent_service_grpc_pb.d.ts @@ -0,0 +1,209 @@ +// package: polykey.v1 +// file: polykey/v1/agent_service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import * as polykey_v1_agent_service_pb from "../../polykey/v1/agent_service_pb"; +import * as polykey_v1_utils_utils_pb from "../../polykey/v1/utils/utils_pb"; +import * as polykey_v1_nodes_nodes_pb from "../../polykey/v1/nodes/nodes_pb"; +import * as polykey_v1_vaults_vaults_pb from "../../polykey/v1/vaults/vaults_pb"; +import * as polykey_v1_notifications_notifications_pb from "../../polykey/v1/notifications/notifications_pb"; + +interface IAgentServiceService extends grpc.ServiceDefinition { + echo: IAgentServiceService_IEcho; + vaultsGitInfoGet: IAgentServiceService_IVaultsGitInfoGet; + vaultsGitPackGet: IAgentServiceService_IVaultsGitPackGet; + vaultsScan: IAgentServiceService_IVaultsScan; + vaultsPermisssionsCheck: IAgentServiceService_IVaultsPermisssionsCheck; + nodesClosestLocalNodesGet: IAgentServiceService_INodesClosestLocalNodesGet; + nodesClaimsGet: IAgentServiceService_INodesClaimsGet; + nodesChainDataGet: IAgentServiceService_INodesChainDataGet; + nodesHolePunchMessageSend: IAgentServiceService_INodesHolePunchMessageSend; + nodesCrossSignClaim: IAgentServiceService_INodesCrossSignClaim; + notificationsSend: IAgentServiceService_INotificationsSend; +} + +interface IAgentServiceService_IEcho extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/Echo"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentServiceService_IVaultsGitInfoGet extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/VaultsGitInfoGet"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentServiceService_IVaultsGitPackGet extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/VaultsGitPackGet"; + requestStream: true; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentServiceService_IVaultsScan extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/VaultsScan"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentServiceService_IVaultsPermisssionsCheck extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/VaultsPermisssionsCheck"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentServiceService_INodesClosestLocalNodesGet extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/NodesClosestLocalNodesGet"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentServiceService_INodesClaimsGet extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/NodesClaimsGet"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentServiceService_INodesChainDataGet extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/NodesChainDataGet"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentServiceService_INodesHolePunchMessageSend extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/NodesHolePunchMessageSend"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentServiceService_INodesCrossSignClaim extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/NodesCrossSignClaim"; + requestStream: true; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentServiceService_INotificationsSend extends grpc.MethodDefinition { + path: "/polykey.v1.AgentService/NotificationsSend"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const AgentServiceService: IAgentServiceService; + +export interface IAgentServiceServer extends grpc.UntypedServiceImplementation { + echo: grpc.handleUnaryCall; + vaultsGitInfoGet: grpc.handleServerStreamingCall; + vaultsGitPackGet: grpc.handleBidiStreamingCall; + vaultsScan: grpc.handleServerStreamingCall; + vaultsPermisssionsCheck: grpc.handleUnaryCall; + nodesClosestLocalNodesGet: grpc.handleUnaryCall; + nodesClaimsGet: grpc.handleUnaryCall; + nodesChainDataGet: grpc.handleUnaryCall; + nodesHolePunchMessageSend: grpc.handleUnaryCall; + nodesCrossSignClaim: grpc.handleBidiStreamingCall; + notificationsSend: grpc.handleUnaryCall; +} + +export interface IAgentServiceClient { + echo(request: polykey_v1_utils_utils_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + echo(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + echo(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + vaultsGitInfoGet(request: polykey_v1_vaults_vaults_pb.Vault, options?: Partial): grpc.ClientReadableStream; + vaultsGitInfoGet(request: polykey_v1_vaults_vaults_pb.Vault, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + vaultsGitPackGet(): grpc.ClientDuplexStream; + vaultsGitPackGet(options: Partial): grpc.ClientDuplexStream; + vaultsGitPackGet(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + vaultsScan(request: polykey_v1_nodes_nodes_pb.Node, options?: Partial): grpc.ClientReadableStream; + vaultsScan(request: polykey_v1_nodes_nodes_pb.Node, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + vaultsPermisssionsCheck(request: polykey_v1_vaults_vaults_pb.NodePermission, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.NodePermissionAllowed) => void): grpc.ClientUnaryCall; + vaultsPermisssionsCheck(request: polykey_v1_vaults_vaults_pb.NodePermission, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.NodePermissionAllowed) => void): grpc.ClientUnaryCall; + vaultsPermisssionsCheck(request: polykey_v1_vaults_vaults_pb.NodePermission, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.NodePermissionAllowed) => void): grpc.ClientUnaryCall; + nodesClosestLocalNodesGet(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeTable) => void): grpc.ClientUnaryCall; + nodesClosestLocalNodesGet(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeTable) => void): grpc.ClientUnaryCall; + nodesClosestLocalNodesGet(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeTable) => void): grpc.ClientUnaryCall; + nodesClaimsGet(request: polykey_v1_nodes_nodes_pb.ClaimType, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.Claims) => void): grpc.ClientUnaryCall; + nodesClaimsGet(request: polykey_v1_nodes_nodes_pb.ClaimType, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.Claims) => void): grpc.ClientUnaryCall; + nodesClaimsGet(request: polykey_v1_nodes_nodes_pb.ClaimType, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.Claims) => void): grpc.ClientUnaryCall; + nodesChainDataGet(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.ChainData) => void): grpc.ClientUnaryCall; + nodesChainDataGet(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.ChainData) => void): grpc.ClientUnaryCall; + nodesChainDataGet(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.ChainData) => void): grpc.ClientUnaryCall; + nodesHolePunchMessageSend(request: polykey_v1_nodes_nodes_pb.Relay, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + nodesHolePunchMessageSend(request: polykey_v1_nodes_nodes_pb.Relay, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + nodesHolePunchMessageSend(request: polykey_v1_nodes_nodes_pb.Relay, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + nodesCrossSignClaim(): grpc.ClientDuplexStream; + nodesCrossSignClaim(options: Partial): grpc.ClientDuplexStream; + nodesCrossSignClaim(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + notificationsSend(request: polykey_v1_notifications_notifications_pb.AgentNotification, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + notificationsSend(request: polykey_v1_notifications_notifications_pb.AgentNotification, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + notificationsSend(request: polykey_v1_notifications_notifications_pb.AgentNotification, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; +} + +export class AgentServiceClient extends grpc.Client implements IAgentServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public echo(request: polykey_v1_utils_utils_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + public echo(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + public echo(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + public vaultsGitInfoGet(request: polykey_v1_vaults_vaults_pb.Vault, options?: Partial): grpc.ClientReadableStream; + public vaultsGitInfoGet(request: polykey_v1_vaults_vaults_pb.Vault, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public vaultsGitPackGet(options?: Partial): grpc.ClientDuplexStream; + public vaultsGitPackGet(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + public vaultsScan(request: polykey_v1_nodes_nodes_pb.Node, options?: Partial): grpc.ClientReadableStream; + public vaultsScan(request: polykey_v1_nodes_nodes_pb.Node, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public vaultsPermisssionsCheck(request: polykey_v1_vaults_vaults_pb.NodePermission, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.NodePermissionAllowed) => void): grpc.ClientUnaryCall; + public vaultsPermisssionsCheck(request: polykey_v1_vaults_vaults_pb.NodePermission, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.NodePermissionAllowed) => void): grpc.ClientUnaryCall; + public vaultsPermisssionsCheck(request: polykey_v1_vaults_vaults_pb.NodePermission, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.NodePermissionAllowed) => void): grpc.ClientUnaryCall; + public nodesClosestLocalNodesGet(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeTable) => void): grpc.ClientUnaryCall; + public nodesClosestLocalNodesGet(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeTable) => void): grpc.ClientUnaryCall; + public nodesClosestLocalNodesGet(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeTable) => void): grpc.ClientUnaryCall; + public nodesClaimsGet(request: polykey_v1_nodes_nodes_pb.ClaimType, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.Claims) => void): grpc.ClientUnaryCall; + public nodesClaimsGet(request: polykey_v1_nodes_nodes_pb.ClaimType, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.Claims) => void): grpc.ClientUnaryCall; + public nodesClaimsGet(request: polykey_v1_nodes_nodes_pb.ClaimType, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.Claims) => void): grpc.ClientUnaryCall; + public nodesChainDataGet(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.ChainData) => void): grpc.ClientUnaryCall; + public nodesChainDataGet(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.ChainData) => void): grpc.ClientUnaryCall; + public nodesChainDataGet(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.ChainData) => void): grpc.ClientUnaryCall; + public nodesHolePunchMessageSend(request: polykey_v1_nodes_nodes_pb.Relay, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public nodesHolePunchMessageSend(request: polykey_v1_nodes_nodes_pb.Relay, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public nodesHolePunchMessageSend(request: polykey_v1_nodes_nodes_pb.Relay, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public nodesCrossSignClaim(options?: Partial): grpc.ClientDuplexStream; + public nodesCrossSignClaim(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + public notificationsSend(request: polykey_v1_notifications_notifications_pb.AgentNotification, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public notificationsSend(request: polykey_v1_notifications_notifications_pb.AgentNotification, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public notificationsSend(request: polykey_v1_notifications_notifications_pb.AgentNotification, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; +} diff --git a/src/proto/js/polykey/v1/agent_service_grpc_pb.js b/src/proto/js/polykey/v1/agent_service_grpc_pb.js new file mode 100644 index 000000000..ad4682787 --- /dev/null +++ b/src/proto/js/polykey/v1/agent_service_grpc_pb.js @@ -0,0 +1,293 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var polykey_v1_utils_utils_pb = require('../../polykey/v1/utils/utils_pb.js'); +var polykey_v1_nodes_nodes_pb = require('../../polykey/v1/nodes/nodes_pb.js'); +var polykey_v1_vaults_vaults_pb = require('../../polykey/v1/vaults/vaults_pb.js'); +var polykey_v1_notifications_notifications_pb = require('../../polykey/v1/notifications/notifications_pb.js'); + +function serialize_polykey_v1_nodes_ChainData(arg) { + if (!(arg instanceof polykey_v1_nodes_nodes_pb.ChainData)) { + throw new Error('Expected argument of type polykey.v1.nodes.ChainData'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_nodes_ChainData(buffer_arg) { + return polykey_v1_nodes_nodes_pb.ChainData.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_nodes_ClaimType(arg) { + if (!(arg instanceof polykey_v1_nodes_nodes_pb.ClaimType)) { + throw new Error('Expected argument of type polykey.v1.nodes.ClaimType'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_nodes_ClaimType(buffer_arg) { + return polykey_v1_nodes_nodes_pb.ClaimType.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_nodes_Claims(arg) { + if (!(arg instanceof polykey_v1_nodes_nodes_pb.Claims)) { + throw new Error('Expected argument of type polykey.v1.nodes.Claims'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_nodes_Claims(buffer_arg) { + return polykey_v1_nodes_nodes_pb.Claims.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_nodes_CrossSign(arg) { + if (!(arg instanceof polykey_v1_nodes_nodes_pb.CrossSign)) { + throw new Error('Expected argument of type polykey.v1.nodes.CrossSign'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_nodes_CrossSign(buffer_arg) { + return polykey_v1_nodes_nodes_pb.CrossSign.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_nodes_Node(arg) { + if (!(arg instanceof polykey_v1_nodes_nodes_pb.Node)) { + throw new Error('Expected argument of type polykey.v1.nodes.Node'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_nodes_Node(buffer_arg) { + return polykey_v1_nodes_nodes_pb.Node.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_nodes_NodeTable(arg) { + if (!(arg instanceof polykey_v1_nodes_nodes_pb.NodeTable)) { + throw new Error('Expected argument of type polykey.v1.nodes.NodeTable'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_nodes_NodeTable(buffer_arg) { + return polykey_v1_nodes_nodes_pb.NodeTable.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_nodes_Relay(arg) { + if (!(arg instanceof polykey_v1_nodes_nodes_pb.Relay)) { + throw new Error('Expected argument of type polykey.v1.nodes.Relay'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_nodes_Relay(buffer_arg) { + return polykey_v1_nodes_nodes_pb.Relay.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_notifications_AgentNotification(arg) { + if (!(arg instanceof polykey_v1_notifications_notifications_pb.AgentNotification)) { + throw new Error('Expected argument of type polykey.v1.notifications.AgentNotification'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_notifications_AgentNotification(buffer_arg) { + return polykey_v1_notifications_notifications_pb.AgentNotification.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_utils_EchoMessage(arg) { + if (!(arg instanceof polykey_v1_utils_utils_pb.EchoMessage)) { + throw new Error('Expected argument of type polykey.v1.utils.EchoMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_utils_EchoMessage(buffer_arg) { + return polykey_v1_utils_utils_pb.EchoMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_utils_EmptyMessage(arg) { + if (!(arg instanceof polykey_v1_utils_utils_pb.EmptyMessage)) { + throw new Error('Expected argument of type polykey.v1.utils.EmptyMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_utils_EmptyMessage(buffer_arg) { + return polykey_v1_utils_utils_pb.EmptyMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_NodePermission(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.NodePermission)) { + throw new Error('Expected argument of type polykey.v1.vaults.NodePermission'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_NodePermission(buffer_arg) { + return polykey_v1_vaults_vaults_pb.NodePermission.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_NodePermissionAllowed(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.NodePermissionAllowed)) { + throw new Error('Expected argument of type polykey.v1.vaults.NodePermissionAllowed'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_NodePermissionAllowed(buffer_arg) { + return polykey_v1_vaults_vaults_pb.NodePermissionAllowed.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_PackChunk(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.PackChunk)) { + throw new Error('Expected argument of type polykey.v1.vaults.PackChunk'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_PackChunk(buffer_arg) { + return polykey_v1_vaults_vaults_pb.PackChunk.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_Vault(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.Vault)) { + throw new Error('Expected argument of type polykey.v1.vaults.Vault'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_Vault(buffer_arg) { + return polykey_v1_vaults_vaults_pb.Vault.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var AgentServiceService = exports.AgentServiceService = { + // Echo +echo: { + path: '/polykey.v1.AgentService/Echo', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EchoMessage, + responseType: polykey_v1_utils_utils_pb.EchoMessage, + requestSerialize: serialize_polykey_v1_utils_EchoMessage, + requestDeserialize: deserialize_polykey_v1_utils_EchoMessage, + responseSerialize: serialize_polykey_v1_utils_EchoMessage, + responseDeserialize: deserialize_polykey_v1_utils_EchoMessage, + }, + // Vaults +vaultsGitInfoGet: { + path: '/polykey.v1.AgentService/VaultsGitInfoGet', + requestStream: false, + responseStream: true, + requestType: polykey_v1_vaults_vaults_pb.Vault, + responseType: polykey_v1_vaults_vaults_pb.PackChunk, + requestSerialize: serialize_polykey_v1_vaults_Vault, + requestDeserialize: deserialize_polykey_v1_vaults_Vault, + responseSerialize: serialize_polykey_v1_vaults_PackChunk, + responseDeserialize: deserialize_polykey_v1_vaults_PackChunk, + }, + vaultsGitPackGet: { + path: '/polykey.v1.AgentService/VaultsGitPackGet', + requestStream: true, + responseStream: true, + requestType: polykey_v1_vaults_vaults_pb.PackChunk, + responseType: polykey_v1_vaults_vaults_pb.PackChunk, + requestSerialize: serialize_polykey_v1_vaults_PackChunk, + requestDeserialize: deserialize_polykey_v1_vaults_PackChunk, + responseSerialize: serialize_polykey_v1_vaults_PackChunk, + responseDeserialize: deserialize_polykey_v1_vaults_PackChunk, + }, + vaultsScan: { + path: '/polykey.v1.AgentService/VaultsScan', + requestStream: false, + responseStream: true, + requestType: polykey_v1_nodes_nodes_pb.Node, + responseType: polykey_v1_vaults_vaults_pb.Vault, + requestSerialize: serialize_polykey_v1_nodes_Node, + requestDeserialize: deserialize_polykey_v1_nodes_Node, + responseSerialize: serialize_polykey_v1_vaults_Vault, + responseDeserialize: deserialize_polykey_v1_vaults_Vault, + }, + vaultsPermisssionsCheck: { + path: '/polykey.v1.AgentService/VaultsPermisssionsCheck', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.NodePermission, + responseType: polykey_v1_vaults_vaults_pb.NodePermissionAllowed, + requestSerialize: serialize_polykey_v1_vaults_NodePermission, + requestDeserialize: deserialize_polykey_v1_vaults_NodePermission, + responseSerialize: serialize_polykey_v1_vaults_NodePermissionAllowed, + responseDeserialize: deserialize_polykey_v1_vaults_NodePermissionAllowed, + }, + // Nodes +nodesClosestLocalNodesGet: { + path: '/polykey.v1.AgentService/NodesClosestLocalNodesGet', + requestStream: false, + responseStream: false, + requestType: polykey_v1_nodes_nodes_pb.Node, + responseType: polykey_v1_nodes_nodes_pb.NodeTable, + requestSerialize: serialize_polykey_v1_nodes_Node, + requestDeserialize: deserialize_polykey_v1_nodes_Node, + responseSerialize: serialize_polykey_v1_nodes_NodeTable, + responseDeserialize: deserialize_polykey_v1_nodes_NodeTable, + }, + nodesClaimsGet: { + path: '/polykey.v1.AgentService/NodesClaimsGet', + requestStream: false, + responseStream: false, + requestType: polykey_v1_nodes_nodes_pb.ClaimType, + responseType: polykey_v1_nodes_nodes_pb.Claims, + requestSerialize: serialize_polykey_v1_nodes_ClaimType, + requestDeserialize: deserialize_polykey_v1_nodes_ClaimType, + responseSerialize: serialize_polykey_v1_nodes_Claims, + responseDeserialize: deserialize_polykey_v1_nodes_Claims, + }, + nodesChainDataGet: { + path: '/polykey.v1.AgentService/NodesChainDataGet', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_nodes_nodes_pb.ChainData, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_nodes_ChainData, + responseDeserialize: deserialize_polykey_v1_nodes_ChainData, + }, + nodesHolePunchMessageSend: { + path: '/polykey.v1.AgentService/NodesHolePunchMessageSend', + requestStream: false, + responseStream: false, + requestType: polykey_v1_nodes_nodes_pb.Relay, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_nodes_Relay, + requestDeserialize: deserialize_polykey_v1_nodes_Relay, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + nodesCrossSignClaim: { + path: '/polykey.v1.AgentService/NodesCrossSignClaim', + requestStream: true, + responseStream: true, + requestType: polykey_v1_nodes_nodes_pb.CrossSign, + responseType: polykey_v1_nodes_nodes_pb.CrossSign, + requestSerialize: serialize_polykey_v1_nodes_CrossSign, + requestDeserialize: deserialize_polykey_v1_nodes_CrossSign, + responseSerialize: serialize_polykey_v1_nodes_CrossSign, + responseDeserialize: deserialize_polykey_v1_nodes_CrossSign, + }, + // Notifications +notificationsSend: { + path: '/polykey.v1.AgentService/NotificationsSend', + requestStream: false, + responseStream: false, + requestType: polykey_v1_notifications_notifications_pb.AgentNotification, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_notifications_AgentNotification, + requestDeserialize: deserialize_polykey_v1_notifications_AgentNotification, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, +}; + +exports.AgentServiceClient = grpc.makeGenericClientConstructor(AgentServiceService); diff --git a/src/proto/js/polykey/v1/agent_service_pb.d.ts b/src/proto/js/polykey/v1/agent_service_pb.d.ts new file mode 100644 index 000000000..ed4be3d70 --- /dev/null +++ b/src/proto/js/polykey/v1/agent_service_pb.d.ts @@ -0,0 +1,11 @@ +// package: polykey.v1 +// file: polykey/v1/agent_service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as polykey_v1_utils_utils_pb from "../../polykey/v1/utils/utils_pb"; +import * as polykey_v1_nodes_nodes_pb from "../../polykey/v1/nodes/nodes_pb"; +import * as polykey_v1_vaults_vaults_pb from "../../polykey/v1/vaults/vaults_pb"; +import * as polykey_v1_notifications_notifications_pb from "../../polykey/v1/notifications/notifications_pb"; diff --git a/src/proto/js/polykey/v1/agent_service_pb.js b/src/proto/js/polykey/v1/agent_service_pb.js new file mode 100644 index 000000000..ade0b70fa --- /dev/null +++ b/src/proto/js/polykey/v1/agent_service_pb.js @@ -0,0 +1,24 @@ +// source: polykey/v1/agent_service.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var polykey_v1_utils_utils_pb = require('../../polykey/v1/utils/utils_pb.js'); +goog.object.extend(proto, polykey_v1_utils_utils_pb); +var polykey_v1_nodes_nodes_pb = require('../../polykey/v1/nodes/nodes_pb.js'); +goog.object.extend(proto, polykey_v1_nodes_nodes_pb); +var polykey_v1_vaults_vaults_pb = require('../../polykey/v1/vaults/vaults_pb.js'); +goog.object.extend(proto, polykey_v1_vaults_vaults_pb); +var polykey_v1_notifications_notifications_pb = require('../../polykey/v1/notifications/notifications_pb.js'); +goog.object.extend(proto, polykey_v1_notifications_notifications_pb); diff --git a/src/proto/js/polykey/v1/client_service_grpc_pb.d.ts b/src/proto/js/polykey/v1/client_service_grpc_pb.d.ts new file mode 100644 index 000000000..2458e90bc --- /dev/null +++ b/src/proto/js/polykey/v1/client_service_grpc_pb.d.ts @@ -0,0 +1,1070 @@ +// package: polykey.v1 +// file: polykey/v1/client_service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import * as polykey_v1_client_service_pb from "../../polykey/v1/client_service_pb"; +import * as polykey_v1_gestalts_gestalts_pb from "../../polykey/v1/gestalts/gestalts_pb"; +import * as polykey_v1_identities_identities_pb from "../../polykey/v1/identities/identities_pb"; +import * as polykey_v1_keys_keys_pb from "../../polykey/v1/keys/keys_pb"; +import * as polykey_v1_nodes_nodes_pb from "../../polykey/v1/nodes/nodes_pb"; +import * as polykey_v1_notifications_notifications_pb from "../../polykey/v1/notifications/notifications_pb"; +import * as polykey_v1_permissions_permissions_pb from "../../polykey/v1/permissions/permissions_pb"; +import * as polykey_v1_secrets_secrets_pb from "../../polykey/v1/secrets/secrets_pb"; +import * as polykey_v1_sessions_sessions_pb from "../../polykey/v1/sessions/sessions_pb"; +import * as polykey_v1_vaults_vaults_pb from "../../polykey/v1/vaults/vaults_pb"; +import * as polykey_v1_utils_utils_pb from "../../polykey/v1/utils/utils_pb"; + +interface IClientServiceService extends grpc.ServiceDefinition { + echo: IClientServiceService_IEcho; + agentStop: IClientServiceService_IAgentStop; + sessionUnlock: IClientServiceService_ISessionUnlock; + sessionRefresh: IClientServiceService_ISessionRefresh; + sessionLockAll: IClientServiceService_ISessionLockAll; + nodesAdd: IClientServiceService_INodesAdd; + nodesPing: IClientServiceService_INodesPing; + nodesClaim: IClientServiceService_INodesClaim; + nodesFind: IClientServiceService_INodesFind; + keysKeyPairRoot: IClientServiceService_IKeysKeyPairRoot; + keysKeyPairReset: IClientServiceService_IKeysKeyPairReset; + keysKeyPairRenew: IClientServiceService_IKeysKeyPairRenew; + keysEncrypt: IClientServiceService_IKeysEncrypt; + keysDecrypt: IClientServiceService_IKeysDecrypt; + keysSign: IClientServiceService_IKeysSign; + keysVerify: IClientServiceService_IKeysVerify; + keysPasswordChange: IClientServiceService_IKeysPasswordChange; + keysCertsGet: IClientServiceService_IKeysCertsGet; + keysCertsChainGet: IClientServiceService_IKeysCertsChainGet; + vaultsList: IClientServiceService_IVaultsList; + vaultsCreate: IClientServiceService_IVaultsCreate; + vaultsRename: IClientServiceService_IVaultsRename; + vaultsDelete: IClientServiceService_IVaultsDelete; + vaultsPull: IClientServiceService_IVaultsPull; + vaultsClone: IClientServiceService_IVaultsClone; + vaultsScan: IClientServiceService_IVaultsScan; + vaultsSecretsList: IClientServiceService_IVaultsSecretsList; + vaultsSecretsMkdir: IClientServiceService_IVaultsSecretsMkdir; + vaultsSecretsStat: IClientServiceService_IVaultsSecretsStat; + vaultsSecretsDelete: IClientServiceService_IVaultsSecretsDelete; + vaultsSecretsEdit: IClientServiceService_IVaultsSecretsEdit; + vaultsSecretsGet: IClientServiceService_IVaultsSecretsGet; + vaultsSecretsRename: IClientServiceService_IVaultsSecretsRename; + vaultsSecretsNew: IClientServiceService_IVaultsSecretsNew; + vaultsSecretsNewDir: IClientServiceService_IVaultsSecretsNewDir; + vaultsPermissionsSet: IClientServiceService_IVaultsPermissionsSet; + vaultsPermissionsUnset: IClientServiceService_IVaultsPermissionsUnset; + vaultsPermissions: IClientServiceService_IVaultsPermissions; + vaultsVersion: IClientServiceService_IVaultsVersion; + vaultsLog: IClientServiceService_IVaultsLog; + identitiesAuthenticate: IClientServiceService_IIdentitiesAuthenticate; + identitiesTokenPut: IClientServiceService_IIdentitiesTokenPut; + identitiesTokenGet: IClientServiceService_IIdentitiesTokenGet; + identitiesTokenDelete: IClientServiceService_IIdentitiesTokenDelete; + identitiesProvidersList: IClientServiceService_IIdentitiesProvidersList; + identitiesInfoGet: IClientServiceService_IIdentitiesInfoGet; + identitiesInfoGetConnected: IClientServiceService_IIdentitiesInfoGetConnected; + identitiesClaim: IClientServiceService_IIdentitiesClaim; + gestaltsGestaltList: IClientServiceService_IGestaltsGestaltList; + gestaltsGestaltGetByNode: IClientServiceService_IGestaltsGestaltGetByNode; + gestaltsGestaltGetByIdentity: IClientServiceService_IGestaltsGestaltGetByIdentity; + gestaltsDiscoveryByNode: IClientServiceService_IGestaltsDiscoveryByNode; + gestaltsDiscoveryByIdentity: IClientServiceService_IGestaltsDiscoveryByIdentity; + gestaltsActionsGetByNode: IClientServiceService_IGestaltsActionsGetByNode; + gestaltsActionsGetByIdentity: IClientServiceService_IGestaltsActionsGetByIdentity; + gestaltsActionsSetByNode: IClientServiceService_IGestaltsActionsSetByNode; + gestaltsActionsSetByIdentity: IClientServiceService_IGestaltsActionsSetByIdentity; + gestaltsActionsUnsetByNode: IClientServiceService_IGestaltsActionsUnsetByNode; + gestaltsActionsUnsetByIdentity: IClientServiceService_IGestaltsActionsUnsetByIdentity; + notificationsSend: IClientServiceService_INotificationsSend; + notificationsRead: IClientServiceService_INotificationsRead; + notificationsClear: IClientServiceService_INotificationsClear; +} + +interface IClientServiceService_IEcho extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/Echo"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IAgentStop extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/AgentStop"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_ISessionUnlock extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/SessionUnlock"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_ISessionRefresh extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/SessionRefresh"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_ISessionLockAll extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/SessionLockAll"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_INodesAdd extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/NodesAdd"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_INodesPing extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/NodesPing"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_INodesClaim extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/NodesClaim"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_INodesFind extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/NodesFind"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IKeysKeyPairRoot extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/KeysKeyPairRoot"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IKeysKeyPairReset extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/KeysKeyPairReset"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IKeysKeyPairRenew extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/KeysKeyPairRenew"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IKeysEncrypt extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/KeysEncrypt"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IKeysDecrypt extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/KeysDecrypt"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IKeysSign extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/KeysSign"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IKeysVerify extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/KeysVerify"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IKeysPasswordChange extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/KeysPasswordChange"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IKeysCertsGet extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/KeysCertsGet"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IKeysCertsChainGet extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/KeysCertsChainGet"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsList extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsList"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsCreate extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsCreate"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsRename extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsRename"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsDelete extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsDelete"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsPull extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsPull"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsClone extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsClone"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsScan extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsScan"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsSecretsList extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsSecretsList"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsSecretsMkdir extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsSecretsMkdir"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsSecretsStat extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsSecretsStat"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsSecretsDelete extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsSecretsDelete"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsSecretsEdit extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsSecretsEdit"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsSecretsGet extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsSecretsGet"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsSecretsRename extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsSecretsRename"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsSecretsNew extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsSecretsNew"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsSecretsNewDir extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsSecretsNewDir"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsPermissionsSet extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsPermissionsSet"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsPermissionsUnset extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsPermissionsUnset"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsPermissions extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsPermissions"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsVersion extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsVersion"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IVaultsLog extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/VaultsLog"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IIdentitiesAuthenticate extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/IdentitiesAuthenticate"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IIdentitiesTokenPut extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/IdentitiesTokenPut"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IIdentitiesTokenGet extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/IdentitiesTokenGet"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IIdentitiesTokenDelete extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/IdentitiesTokenDelete"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IIdentitiesProvidersList extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/IdentitiesProvidersList"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IIdentitiesInfoGet extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/IdentitiesInfoGet"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IIdentitiesInfoGetConnected extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/IdentitiesInfoGetConnected"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IIdentitiesClaim extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/IdentitiesClaim"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsGestaltList extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsGestaltList"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsGestaltGetByNode extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsGestaltGetByNode"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsGestaltGetByIdentity extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsGestaltGetByIdentity"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsDiscoveryByNode extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsDiscoveryByNode"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsDiscoveryByIdentity extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsDiscoveryByIdentity"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsActionsGetByNode extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsActionsGetByNode"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsActionsGetByIdentity extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsActionsGetByIdentity"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsActionsSetByNode extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsActionsSetByNode"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsActionsSetByIdentity extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsActionsSetByIdentity"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsActionsUnsetByNode extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsActionsUnsetByNode"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_IGestaltsActionsUnsetByIdentity extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/GestaltsActionsUnsetByIdentity"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_INotificationsSend extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/NotificationsSend"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_INotificationsRead extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/NotificationsRead"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IClientServiceService_INotificationsClear extends grpc.MethodDefinition { + path: "/polykey.v1.ClientService/NotificationsClear"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const ClientServiceService: IClientServiceService; + +export interface IClientServiceServer extends grpc.UntypedServiceImplementation { + echo: grpc.handleUnaryCall; + agentStop: grpc.handleUnaryCall; + sessionUnlock: grpc.handleUnaryCall; + sessionRefresh: grpc.handleUnaryCall; + sessionLockAll: grpc.handleUnaryCall; + nodesAdd: grpc.handleUnaryCall; + nodesPing: grpc.handleUnaryCall; + nodesClaim: grpc.handleUnaryCall; + nodesFind: grpc.handleUnaryCall; + keysKeyPairRoot: grpc.handleUnaryCall; + keysKeyPairReset: grpc.handleUnaryCall; + keysKeyPairRenew: grpc.handleUnaryCall; + keysEncrypt: grpc.handleUnaryCall; + keysDecrypt: grpc.handleUnaryCall; + keysSign: grpc.handleUnaryCall; + keysVerify: grpc.handleUnaryCall; + keysPasswordChange: grpc.handleUnaryCall; + keysCertsGet: grpc.handleUnaryCall; + keysCertsChainGet: grpc.handleServerStreamingCall; + vaultsList: grpc.handleServerStreamingCall; + vaultsCreate: grpc.handleUnaryCall; + vaultsRename: grpc.handleUnaryCall; + vaultsDelete: grpc.handleUnaryCall; + vaultsPull: grpc.handleUnaryCall; + vaultsClone: grpc.handleUnaryCall; + vaultsScan: grpc.handleServerStreamingCall; + vaultsSecretsList: grpc.handleServerStreamingCall; + vaultsSecretsMkdir: grpc.handleUnaryCall; + vaultsSecretsStat: grpc.handleUnaryCall; + vaultsSecretsDelete: grpc.handleUnaryCall; + vaultsSecretsEdit: grpc.handleUnaryCall; + vaultsSecretsGet: grpc.handleUnaryCall; + vaultsSecretsRename: grpc.handleUnaryCall; + vaultsSecretsNew: grpc.handleUnaryCall; + vaultsSecretsNewDir: grpc.handleUnaryCall; + vaultsPermissionsSet: grpc.handleUnaryCall; + vaultsPermissionsUnset: grpc.handleUnaryCall; + vaultsPermissions: grpc.handleServerStreamingCall; + vaultsVersion: grpc.handleUnaryCall; + vaultsLog: grpc.handleServerStreamingCall; + identitiesAuthenticate: grpc.handleServerStreamingCall; + identitiesTokenPut: grpc.handleUnaryCall; + identitiesTokenGet: grpc.handleUnaryCall; + identitiesTokenDelete: grpc.handleUnaryCall; + identitiesProvidersList: grpc.handleUnaryCall; + identitiesInfoGet: grpc.handleUnaryCall; + identitiesInfoGetConnected: grpc.handleServerStreamingCall; + identitiesClaim: grpc.handleUnaryCall; + gestaltsGestaltList: grpc.handleServerStreamingCall; + gestaltsGestaltGetByNode: grpc.handleUnaryCall; + gestaltsGestaltGetByIdentity: grpc.handleUnaryCall; + gestaltsDiscoveryByNode: grpc.handleUnaryCall; + gestaltsDiscoveryByIdentity: grpc.handleUnaryCall; + gestaltsActionsGetByNode: grpc.handleUnaryCall; + gestaltsActionsGetByIdentity: grpc.handleUnaryCall; + gestaltsActionsSetByNode: grpc.handleUnaryCall; + gestaltsActionsSetByIdentity: grpc.handleUnaryCall; + gestaltsActionsUnsetByNode: grpc.handleUnaryCall; + gestaltsActionsUnsetByIdentity: grpc.handleUnaryCall; + notificationsSend: grpc.handleUnaryCall; + notificationsRead: grpc.handleUnaryCall; + notificationsClear: grpc.handleUnaryCall; +} + +export interface IClientServiceClient { + echo(request: polykey_v1_utils_utils_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + echo(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + echo(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + agentStop(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + agentStop(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + agentStop(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + sessionUnlock(request: polykey_v1_sessions_sessions_pb.Password, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + sessionUnlock(request: polykey_v1_sessions_sessions_pb.Password, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + sessionUnlock(request: polykey_v1_sessions_sessions_pb.Password, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + sessionRefresh(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + sessionRefresh(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + sessionRefresh(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + sessionLockAll(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + sessionLockAll(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + sessionLockAll(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + nodesAdd(request: polykey_v1_nodes_nodes_pb.NodeAddress, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + nodesAdd(request: polykey_v1_nodes_nodes_pb.NodeAddress, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + nodesAdd(request: polykey_v1_nodes_nodes_pb.NodeAddress, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + nodesPing(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + nodesPing(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + nodesPing(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + nodesClaim(request: polykey_v1_nodes_nodes_pb.Claim, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + nodesClaim(request: polykey_v1_nodes_nodes_pb.Claim, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + nodesClaim(request: polykey_v1_nodes_nodes_pb.Claim, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + nodesFind(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeAddress) => void): grpc.ClientUnaryCall; + nodesFind(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeAddress) => void): grpc.ClientUnaryCall; + nodesFind(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeAddress) => void): grpc.ClientUnaryCall; + keysKeyPairRoot(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.KeyPair) => void): grpc.ClientUnaryCall; + keysKeyPairRoot(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.KeyPair) => void): grpc.ClientUnaryCall; + keysKeyPairRoot(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.KeyPair) => void): grpc.ClientUnaryCall; + keysKeyPairReset(request: polykey_v1_keys_keys_pb.Key, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + keysKeyPairReset(request: polykey_v1_keys_keys_pb.Key, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + keysKeyPairReset(request: polykey_v1_keys_keys_pb.Key, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + keysKeyPairRenew(request: polykey_v1_keys_keys_pb.Key, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + keysKeyPairRenew(request: polykey_v1_keys_keys_pb.Key, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + keysKeyPairRenew(request: polykey_v1_keys_keys_pb.Key, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + keysEncrypt(request: polykey_v1_keys_keys_pb.Crypto, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + keysEncrypt(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + keysEncrypt(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + keysDecrypt(request: polykey_v1_keys_keys_pb.Crypto, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + keysDecrypt(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + keysDecrypt(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + keysSign(request: polykey_v1_keys_keys_pb.Crypto, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + keysSign(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + keysSign(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + keysVerify(request: polykey_v1_keys_keys_pb.Crypto, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + keysVerify(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + keysVerify(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + keysPasswordChange(request: polykey_v1_sessions_sessions_pb.Password, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + keysPasswordChange(request: polykey_v1_sessions_sessions_pb.Password, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + keysPasswordChange(request: polykey_v1_sessions_sessions_pb.Password, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + keysCertsGet(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Certificate) => void): grpc.ClientUnaryCall; + keysCertsGet(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Certificate) => void): grpc.ClientUnaryCall; + keysCertsGet(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Certificate) => void): grpc.ClientUnaryCall; + keysCertsChainGet(request: polykey_v1_utils_utils_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; + keysCertsChainGet(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + vaultsList(request: polykey_v1_utils_utils_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; + vaultsList(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + vaultsCreate(request: polykey_v1_vaults_vaults_pb.Vault, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + vaultsCreate(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + vaultsCreate(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + vaultsRename(request: polykey_v1_vaults_vaults_pb.Rename, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + vaultsRename(request: polykey_v1_vaults_vaults_pb.Rename, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + vaultsRename(request: polykey_v1_vaults_vaults_pb.Rename, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + vaultsDelete(request: polykey_v1_vaults_vaults_pb.Vault, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsDelete(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsDelete(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsPull(request: polykey_v1_vaults_vaults_pb.Pull, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsPull(request: polykey_v1_vaults_vaults_pb.Pull, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsPull(request: polykey_v1_vaults_vaults_pb.Pull, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsClone(request: polykey_v1_vaults_vaults_pb.Clone, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsClone(request: polykey_v1_vaults_vaults_pb.Clone, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsClone(request: polykey_v1_vaults_vaults_pb.Clone, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsScan(request: polykey_v1_nodes_nodes_pb.Node, options?: Partial): grpc.ClientReadableStream; + vaultsScan(request: polykey_v1_nodes_nodes_pb.Node, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + vaultsSecretsList(request: polykey_v1_vaults_vaults_pb.Vault, options?: Partial): grpc.ClientReadableStream; + vaultsSecretsList(request: polykey_v1_vaults_vaults_pb.Vault, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + vaultsSecretsMkdir(request: polykey_v1_vaults_vaults_pb.Mkdir, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsMkdir(request: polykey_v1_vaults_vaults_pb.Mkdir, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsMkdir(request: polykey_v1_vaults_vaults_pb.Mkdir, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsStat(request: polykey_v1_vaults_vaults_pb.Vault, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Stat) => void): grpc.ClientUnaryCall; + vaultsSecretsStat(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Stat) => void): grpc.ClientUnaryCall; + vaultsSecretsStat(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Stat) => void): grpc.ClientUnaryCall; + vaultsSecretsDelete(request: polykey_v1_secrets_secrets_pb.Secret, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsDelete(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsDelete(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsEdit(request: polykey_v1_secrets_secrets_pb.Secret, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsEdit(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsEdit(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsGet(request: polykey_v1_secrets_secrets_pb.Secret, callback: (error: grpc.ServiceError | null, response: polykey_v1_secrets_secrets_pb.Secret) => void): grpc.ClientUnaryCall; + vaultsSecretsGet(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_secrets_secrets_pb.Secret) => void): grpc.ClientUnaryCall; + vaultsSecretsGet(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_secrets_secrets_pb.Secret) => void): grpc.ClientUnaryCall; + vaultsSecretsRename(request: polykey_v1_secrets_secrets_pb.Rename, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsRename(request: polykey_v1_secrets_secrets_pb.Rename, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsRename(request: polykey_v1_secrets_secrets_pb.Rename, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsNew(request: polykey_v1_secrets_secrets_pb.Secret, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsNew(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsNew(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsNewDir(request: polykey_v1_secrets_secrets_pb.Directory, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsNewDir(request: polykey_v1_secrets_secrets_pb.Directory, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsSecretsNewDir(request: polykey_v1_secrets_secrets_pb.Directory, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsPermissionsSet(request: polykey_v1_vaults_vaults_pb.PermSet, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsPermissionsSet(request: polykey_v1_vaults_vaults_pb.PermSet, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsPermissionsSet(request: polykey_v1_vaults_vaults_pb.PermSet, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsPermissionsUnset(request: polykey_v1_vaults_vaults_pb.PermUnset, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsPermissionsUnset(request: polykey_v1_vaults_vaults_pb.PermUnset, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsPermissionsUnset(request: polykey_v1_vaults_vaults_pb.PermUnset, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + vaultsPermissions(request: polykey_v1_vaults_vaults_pb.PermGet, options?: Partial): grpc.ClientReadableStream; + vaultsPermissions(request: polykey_v1_vaults_vaults_pb.PermGet, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + vaultsVersion(request: polykey_v1_vaults_vaults_pb.Version, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.VersionResult) => void): grpc.ClientUnaryCall; + vaultsVersion(request: polykey_v1_vaults_vaults_pb.Version, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.VersionResult) => void): grpc.ClientUnaryCall; + vaultsVersion(request: polykey_v1_vaults_vaults_pb.Version, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.VersionResult) => void): grpc.ClientUnaryCall; + vaultsLog(request: polykey_v1_vaults_vaults_pb.Log, options?: Partial): grpc.ClientReadableStream; + vaultsLog(request: polykey_v1_vaults_vaults_pb.Log, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + identitiesAuthenticate(request: polykey_v1_identities_identities_pb.Provider, options?: Partial): grpc.ClientReadableStream; + identitiesAuthenticate(request: polykey_v1_identities_identities_pb.Provider, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + identitiesTokenPut(request: polykey_v1_identities_identities_pb.TokenSpecific, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + identitiesTokenPut(request: polykey_v1_identities_identities_pb.TokenSpecific, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + identitiesTokenPut(request: polykey_v1_identities_identities_pb.TokenSpecific, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + identitiesTokenGet(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Token) => void): grpc.ClientUnaryCall; + identitiesTokenGet(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Token) => void): grpc.ClientUnaryCall; + identitiesTokenGet(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Token) => void): grpc.ClientUnaryCall; + identitiesTokenDelete(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + identitiesTokenDelete(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + identitiesTokenDelete(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + identitiesProvidersList(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + identitiesProvidersList(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + identitiesProvidersList(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + identitiesInfoGet(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + identitiesInfoGet(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + identitiesInfoGet(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + identitiesInfoGetConnected(request: polykey_v1_identities_identities_pb.ProviderSearch, options?: Partial): grpc.ClientReadableStream; + identitiesInfoGetConnected(request: polykey_v1_identities_identities_pb.ProviderSearch, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + identitiesClaim(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + identitiesClaim(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + identitiesClaim(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsGestaltList(request: polykey_v1_utils_utils_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; + gestaltsGestaltList(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + gestaltsGestaltGetByNode(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + gestaltsGestaltGetByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + gestaltsGestaltGetByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + gestaltsGestaltGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + gestaltsGestaltGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + gestaltsGestaltGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + gestaltsDiscoveryByNode(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsDiscoveryByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsDiscoveryByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsDiscoveryByIdentity(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsDiscoveryByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsDiscoveryByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsGetByNode(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + gestaltsActionsGetByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + gestaltsActionsGetByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + gestaltsActionsGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + gestaltsActionsGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + gestaltsActionsGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + gestaltsActionsSetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsSetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsSetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsSetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsSetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsSetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsUnsetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsUnsetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsUnsetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsUnsetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsUnsetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + gestaltsActionsUnsetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + notificationsSend(request: polykey_v1_notifications_notifications_pb.Send, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + notificationsSend(request: polykey_v1_notifications_notifications_pb.Send, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + notificationsSend(request: polykey_v1_notifications_notifications_pb.Send, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + notificationsRead(request: polykey_v1_notifications_notifications_pb.Read, callback: (error: grpc.ServiceError | null, response: polykey_v1_notifications_notifications_pb.List) => void): grpc.ClientUnaryCall; + notificationsRead(request: polykey_v1_notifications_notifications_pb.Read, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_notifications_notifications_pb.List) => void): grpc.ClientUnaryCall; + notificationsRead(request: polykey_v1_notifications_notifications_pb.Read, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_notifications_notifications_pb.List) => void): grpc.ClientUnaryCall; + notificationsClear(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + notificationsClear(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + notificationsClear(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; +} + +export class ClientServiceClient extends grpc.Client implements IClientServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public echo(request: polykey_v1_utils_utils_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + public echo(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + public echo(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + public agentStop(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public agentStop(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public agentStop(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public sessionUnlock(request: polykey_v1_sessions_sessions_pb.Password, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + public sessionUnlock(request: polykey_v1_sessions_sessions_pb.Password, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + public sessionUnlock(request: polykey_v1_sessions_sessions_pb.Password, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + public sessionRefresh(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + public sessionRefresh(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + public sessionRefresh(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_sessions_sessions_pb.Token) => void): grpc.ClientUnaryCall; + public sessionLockAll(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public sessionLockAll(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public sessionLockAll(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public nodesAdd(request: polykey_v1_nodes_nodes_pb.NodeAddress, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public nodesAdd(request: polykey_v1_nodes_nodes_pb.NodeAddress, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public nodesAdd(request: polykey_v1_nodes_nodes_pb.NodeAddress, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public nodesPing(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public nodesPing(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public nodesPing(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public nodesClaim(request: polykey_v1_nodes_nodes_pb.Claim, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public nodesClaim(request: polykey_v1_nodes_nodes_pb.Claim, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public nodesClaim(request: polykey_v1_nodes_nodes_pb.Claim, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public nodesFind(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeAddress) => void): grpc.ClientUnaryCall; + public nodesFind(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeAddress) => void): grpc.ClientUnaryCall; + public nodesFind(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_nodes_nodes_pb.NodeAddress) => void): grpc.ClientUnaryCall; + public keysKeyPairRoot(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.KeyPair) => void): grpc.ClientUnaryCall; + public keysKeyPairRoot(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.KeyPair) => void): grpc.ClientUnaryCall; + public keysKeyPairRoot(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.KeyPair) => void): grpc.ClientUnaryCall; + public keysKeyPairReset(request: polykey_v1_keys_keys_pb.Key, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public keysKeyPairReset(request: polykey_v1_keys_keys_pb.Key, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public keysKeyPairReset(request: polykey_v1_keys_keys_pb.Key, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public keysKeyPairRenew(request: polykey_v1_keys_keys_pb.Key, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public keysKeyPairRenew(request: polykey_v1_keys_keys_pb.Key, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public keysKeyPairRenew(request: polykey_v1_keys_keys_pb.Key, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public keysEncrypt(request: polykey_v1_keys_keys_pb.Crypto, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + public keysEncrypt(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + public keysEncrypt(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + public keysDecrypt(request: polykey_v1_keys_keys_pb.Crypto, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + public keysDecrypt(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + public keysDecrypt(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + public keysSign(request: polykey_v1_keys_keys_pb.Crypto, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + public keysSign(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + public keysSign(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Crypto) => void): grpc.ClientUnaryCall; + public keysVerify(request: polykey_v1_keys_keys_pb.Crypto, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public keysVerify(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public keysVerify(request: polykey_v1_keys_keys_pb.Crypto, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public keysPasswordChange(request: polykey_v1_sessions_sessions_pb.Password, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public keysPasswordChange(request: polykey_v1_sessions_sessions_pb.Password, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public keysPasswordChange(request: polykey_v1_sessions_sessions_pb.Password, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public keysCertsGet(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Certificate) => void): grpc.ClientUnaryCall; + public keysCertsGet(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Certificate) => void): grpc.ClientUnaryCall; + public keysCertsGet(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_keys_keys_pb.Certificate) => void): grpc.ClientUnaryCall; + public keysCertsChainGet(request: polykey_v1_utils_utils_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; + public keysCertsChainGet(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public vaultsList(request: polykey_v1_utils_utils_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; + public vaultsList(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public vaultsCreate(request: polykey_v1_vaults_vaults_pb.Vault, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + public vaultsCreate(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + public vaultsCreate(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + public vaultsRename(request: polykey_v1_vaults_vaults_pb.Rename, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + public vaultsRename(request: polykey_v1_vaults_vaults_pb.Rename, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + public vaultsRename(request: polykey_v1_vaults_vaults_pb.Rename, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Vault) => void): grpc.ClientUnaryCall; + public vaultsDelete(request: polykey_v1_vaults_vaults_pb.Vault, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsDelete(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsDelete(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsPull(request: polykey_v1_vaults_vaults_pb.Pull, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsPull(request: polykey_v1_vaults_vaults_pb.Pull, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsPull(request: polykey_v1_vaults_vaults_pb.Pull, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsClone(request: polykey_v1_vaults_vaults_pb.Clone, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsClone(request: polykey_v1_vaults_vaults_pb.Clone, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsClone(request: polykey_v1_vaults_vaults_pb.Clone, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsScan(request: polykey_v1_nodes_nodes_pb.Node, options?: Partial): grpc.ClientReadableStream; + public vaultsScan(request: polykey_v1_nodes_nodes_pb.Node, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public vaultsSecretsList(request: polykey_v1_vaults_vaults_pb.Vault, options?: Partial): grpc.ClientReadableStream; + public vaultsSecretsList(request: polykey_v1_vaults_vaults_pb.Vault, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public vaultsSecretsMkdir(request: polykey_v1_vaults_vaults_pb.Mkdir, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsMkdir(request: polykey_v1_vaults_vaults_pb.Mkdir, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsMkdir(request: polykey_v1_vaults_vaults_pb.Mkdir, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsStat(request: polykey_v1_vaults_vaults_pb.Vault, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Stat) => void): grpc.ClientUnaryCall; + public vaultsSecretsStat(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Stat) => void): grpc.ClientUnaryCall; + public vaultsSecretsStat(request: polykey_v1_vaults_vaults_pb.Vault, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.Stat) => void): grpc.ClientUnaryCall; + public vaultsSecretsDelete(request: polykey_v1_secrets_secrets_pb.Secret, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsDelete(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsDelete(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsEdit(request: polykey_v1_secrets_secrets_pb.Secret, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsEdit(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsEdit(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsGet(request: polykey_v1_secrets_secrets_pb.Secret, callback: (error: grpc.ServiceError | null, response: polykey_v1_secrets_secrets_pb.Secret) => void): grpc.ClientUnaryCall; + public vaultsSecretsGet(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_secrets_secrets_pb.Secret) => void): grpc.ClientUnaryCall; + public vaultsSecretsGet(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_secrets_secrets_pb.Secret) => void): grpc.ClientUnaryCall; + public vaultsSecretsRename(request: polykey_v1_secrets_secrets_pb.Rename, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsRename(request: polykey_v1_secrets_secrets_pb.Rename, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsRename(request: polykey_v1_secrets_secrets_pb.Rename, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsNew(request: polykey_v1_secrets_secrets_pb.Secret, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsNew(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsNew(request: polykey_v1_secrets_secrets_pb.Secret, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsNewDir(request: polykey_v1_secrets_secrets_pb.Directory, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsNewDir(request: polykey_v1_secrets_secrets_pb.Directory, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsSecretsNewDir(request: polykey_v1_secrets_secrets_pb.Directory, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsPermissionsSet(request: polykey_v1_vaults_vaults_pb.PermSet, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsPermissionsSet(request: polykey_v1_vaults_vaults_pb.PermSet, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsPermissionsSet(request: polykey_v1_vaults_vaults_pb.PermSet, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsPermissionsUnset(request: polykey_v1_vaults_vaults_pb.PermUnset, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsPermissionsUnset(request: polykey_v1_vaults_vaults_pb.PermUnset, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsPermissionsUnset(request: polykey_v1_vaults_vaults_pb.PermUnset, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.StatusMessage) => void): grpc.ClientUnaryCall; + public vaultsPermissions(request: polykey_v1_vaults_vaults_pb.PermGet, options?: Partial): grpc.ClientReadableStream; + public vaultsPermissions(request: polykey_v1_vaults_vaults_pb.PermGet, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public vaultsVersion(request: polykey_v1_vaults_vaults_pb.Version, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.VersionResult) => void): grpc.ClientUnaryCall; + public vaultsVersion(request: polykey_v1_vaults_vaults_pb.Version, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.VersionResult) => void): grpc.ClientUnaryCall; + public vaultsVersion(request: polykey_v1_vaults_vaults_pb.Version, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_vaults_vaults_pb.VersionResult) => void): grpc.ClientUnaryCall; + public vaultsLog(request: polykey_v1_vaults_vaults_pb.Log, options?: Partial): grpc.ClientReadableStream; + public vaultsLog(request: polykey_v1_vaults_vaults_pb.Log, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public identitiesAuthenticate(request: polykey_v1_identities_identities_pb.Provider, options?: Partial): grpc.ClientReadableStream; + public identitiesAuthenticate(request: polykey_v1_identities_identities_pb.Provider, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public identitiesTokenPut(request: polykey_v1_identities_identities_pb.TokenSpecific, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public identitiesTokenPut(request: polykey_v1_identities_identities_pb.TokenSpecific, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public identitiesTokenPut(request: polykey_v1_identities_identities_pb.TokenSpecific, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public identitiesTokenGet(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Token) => void): grpc.ClientUnaryCall; + public identitiesTokenGet(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Token) => void): grpc.ClientUnaryCall; + public identitiesTokenGet(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Token) => void): grpc.ClientUnaryCall; + public identitiesTokenDelete(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public identitiesTokenDelete(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public identitiesTokenDelete(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public identitiesProvidersList(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + public identitiesProvidersList(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + public identitiesProvidersList(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + public identitiesInfoGet(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + public identitiesInfoGet(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + public identitiesInfoGet(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_identities_identities_pb.Provider) => void): grpc.ClientUnaryCall; + public identitiesInfoGetConnected(request: polykey_v1_identities_identities_pb.ProviderSearch, options?: Partial): grpc.ClientReadableStream; + public identitiesInfoGetConnected(request: polykey_v1_identities_identities_pb.ProviderSearch, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public identitiesClaim(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public identitiesClaim(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public identitiesClaim(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsGestaltList(request: polykey_v1_utils_utils_pb.EmptyMessage, options?: Partial): grpc.ClientReadableStream; + public gestaltsGestaltList(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public gestaltsGestaltGetByNode(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + public gestaltsGestaltGetByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + public gestaltsGestaltGetByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + public gestaltsGestaltGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + public gestaltsGestaltGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + public gestaltsGestaltGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_gestalts_gestalts_pb.Graph) => void): grpc.ClientUnaryCall; + public gestaltsDiscoveryByNode(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsDiscoveryByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsDiscoveryByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsDiscoveryByIdentity(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsDiscoveryByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsDiscoveryByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsGetByNode(request: polykey_v1_nodes_nodes_pb.Node, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + public gestaltsActionsGetByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + public gestaltsActionsGetByNode(request: polykey_v1_nodes_nodes_pb.Node, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + public gestaltsActionsGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + public gestaltsActionsGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + public gestaltsActionsGetByIdentity(request: polykey_v1_identities_identities_pb.Provider, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_permissions_permissions_pb.Actions) => void): grpc.ClientUnaryCall; + public gestaltsActionsSetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsSetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsSetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsSetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsSetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsSetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsUnsetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsUnsetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsUnsetByNode(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsUnsetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsUnsetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public gestaltsActionsUnsetByIdentity(request: polykey_v1_permissions_permissions_pb.ActionSet, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public notificationsSend(request: polykey_v1_notifications_notifications_pb.Send, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public notificationsSend(request: polykey_v1_notifications_notifications_pb.Send, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public notificationsSend(request: polykey_v1_notifications_notifications_pb.Send, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public notificationsRead(request: polykey_v1_notifications_notifications_pb.Read, callback: (error: grpc.ServiceError | null, response: polykey_v1_notifications_notifications_pb.List) => void): grpc.ClientUnaryCall; + public notificationsRead(request: polykey_v1_notifications_notifications_pb.Read, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_notifications_notifications_pb.List) => void): grpc.ClientUnaryCall; + public notificationsRead(request: polykey_v1_notifications_notifications_pb.Read, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_notifications_notifications_pb.List) => void): grpc.ClientUnaryCall; + public notificationsClear(request: polykey_v1_utils_utils_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public notificationsClear(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; + public notificationsClear(request: polykey_v1_utils_utils_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EmptyMessage) => void): grpc.ClientUnaryCall; +} diff --git a/src/proto/js/polykey/v1/client_service_grpc_pb.js b/src/proto/js/polykey/v1/client_service_grpc_pb.js new file mode 100644 index 000000000..8f52b73eb --- /dev/null +++ b/src/proto/js/polykey/v1/client_service_grpc_pb.js @@ -0,0 +1,1172 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var polykey_v1_gestalts_gestalts_pb = require('../../polykey/v1/gestalts/gestalts_pb.js'); +var polykey_v1_identities_identities_pb = require('../../polykey/v1/identities/identities_pb.js'); +var polykey_v1_keys_keys_pb = require('../../polykey/v1/keys/keys_pb.js'); +var polykey_v1_nodes_nodes_pb = require('../../polykey/v1/nodes/nodes_pb.js'); +var polykey_v1_notifications_notifications_pb = require('../../polykey/v1/notifications/notifications_pb.js'); +var polykey_v1_permissions_permissions_pb = require('../../polykey/v1/permissions/permissions_pb.js'); +var polykey_v1_secrets_secrets_pb = require('../../polykey/v1/secrets/secrets_pb.js'); +var polykey_v1_sessions_sessions_pb = require('../../polykey/v1/sessions/sessions_pb.js'); +var polykey_v1_vaults_vaults_pb = require('../../polykey/v1/vaults/vaults_pb.js'); +var polykey_v1_utils_utils_pb = require('../../polykey/v1/utils/utils_pb.js'); + +function serialize_polykey_v1_gestalts_Gestalt(arg) { + if (!(arg instanceof polykey_v1_gestalts_gestalts_pb.Gestalt)) { + throw new Error('Expected argument of type polykey.v1.gestalts.Gestalt'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_gestalts_Gestalt(buffer_arg) { + return polykey_v1_gestalts_gestalts_pb.Gestalt.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_gestalts_Graph(arg) { + if (!(arg instanceof polykey_v1_gestalts_gestalts_pb.Graph)) { + throw new Error('Expected argument of type polykey.v1.gestalts.Graph'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_gestalts_Graph(buffer_arg) { + return polykey_v1_gestalts_gestalts_pb.Graph.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_identities_Info(arg) { + if (!(arg instanceof polykey_v1_identities_identities_pb.Info)) { + throw new Error('Expected argument of type polykey.v1.identities.Info'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_identities_Info(buffer_arg) { + return polykey_v1_identities_identities_pb.Info.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_identities_Provider(arg) { + if (!(arg instanceof polykey_v1_identities_identities_pb.Provider)) { + throw new Error('Expected argument of type polykey.v1.identities.Provider'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_identities_Provider(buffer_arg) { + return polykey_v1_identities_identities_pb.Provider.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_identities_ProviderSearch(arg) { + if (!(arg instanceof polykey_v1_identities_identities_pb.ProviderSearch)) { + throw new Error('Expected argument of type polykey.v1.identities.ProviderSearch'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_identities_ProviderSearch(buffer_arg) { + return polykey_v1_identities_identities_pb.ProviderSearch.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_identities_Token(arg) { + if (!(arg instanceof polykey_v1_identities_identities_pb.Token)) { + throw new Error('Expected argument of type polykey.v1.identities.Token'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_identities_Token(buffer_arg) { + return polykey_v1_identities_identities_pb.Token.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_identities_TokenSpecific(arg) { + if (!(arg instanceof polykey_v1_identities_identities_pb.TokenSpecific)) { + throw new Error('Expected argument of type polykey.v1.identities.TokenSpecific'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_identities_TokenSpecific(buffer_arg) { + return polykey_v1_identities_identities_pb.TokenSpecific.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_keys_Certificate(arg) { + if (!(arg instanceof polykey_v1_keys_keys_pb.Certificate)) { + throw new Error('Expected argument of type polykey.v1.keys.Certificate'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_keys_Certificate(buffer_arg) { + return polykey_v1_keys_keys_pb.Certificate.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_keys_Crypto(arg) { + if (!(arg instanceof polykey_v1_keys_keys_pb.Crypto)) { + throw new Error('Expected argument of type polykey.v1.keys.Crypto'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_keys_Crypto(buffer_arg) { + return polykey_v1_keys_keys_pb.Crypto.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_keys_Key(arg) { + if (!(arg instanceof polykey_v1_keys_keys_pb.Key)) { + throw new Error('Expected argument of type polykey.v1.keys.Key'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_keys_Key(buffer_arg) { + return polykey_v1_keys_keys_pb.Key.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_keys_KeyPair(arg) { + if (!(arg instanceof polykey_v1_keys_keys_pb.KeyPair)) { + throw new Error('Expected argument of type polykey.v1.keys.KeyPair'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_keys_KeyPair(buffer_arg) { + return polykey_v1_keys_keys_pb.KeyPair.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_nodes_Claim(arg) { + if (!(arg instanceof polykey_v1_nodes_nodes_pb.Claim)) { + throw new Error('Expected argument of type polykey.v1.nodes.Claim'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_nodes_Claim(buffer_arg) { + return polykey_v1_nodes_nodes_pb.Claim.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_nodes_Node(arg) { + if (!(arg instanceof polykey_v1_nodes_nodes_pb.Node)) { + throw new Error('Expected argument of type polykey.v1.nodes.Node'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_nodes_Node(buffer_arg) { + return polykey_v1_nodes_nodes_pb.Node.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_nodes_NodeAddress(arg) { + if (!(arg instanceof polykey_v1_nodes_nodes_pb.NodeAddress)) { + throw new Error('Expected argument of type polykey.v1.nodes.NodeAddress'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_nodes_NodeAddress(buffer_arg) { + return polykey_v1_nodes_nodes_pb.NodeAddress.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_notifications_List(arg) { + if (!(arg instanceof polykey_v1_notifications_notifications_pb.List)) { + throw new Error('Expected argument of type polykey.v1.notifications.List'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_notifications_List(buffer_arg) { + return polykey_v1_notifications_notifications_pb.List.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_notifications_Read(arg) { + if (!(arg instanceof polykey_v1_notifications_notifications_pb.Read)) { + throw new Error('Expected argument of type polykey.v1.notifications.Read'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_notifications_Read(buffer_arg) { + return polykey_v1_notifications_notifications_pb.Read.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_notifications_Send(arg) { + if (!(arg instanceof polykey_v1_notifications_notifications_pb.Send)) { + throw new Error('Expected argument of type polykey.v1.notifications.Send'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_notifications_Send(buffer_arg) { + return polykey_v1_notifications_notifications_pb.Send.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_permissions_ActionSet(arg) { + if (!(arg instanceof polykey_v1_permissions_permissions_pb.ActionSet)) { + throw new Error('Expected argument of type polykey.v1.permissions.ActionSet'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_permissions_ActionSet(buffer_arg) { + return polykey_v1_permissions_permissions_pb.ActionSet.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_permissions_Actions(arg) { + if (!(arg instanceof polykey_v1_permissions_permissions_pb.Actions)) { + throw new Error('Expected argument of type polykey.v1.permissions.Actions'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_permissions_Actions(buffer_arg) { + return polykey_v1_permissions_permissions_pb.Actions.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_secrets_Directory(arg) { + if (!(arg instanceof polykey_v1_secrets_secrets_pb.Directory)) { + throw new Error('Expected argument of type polykey.v1.secrets.Directory'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_secrets_Directory(buffer_arg) { + return polykey_v1_secrets_secrets_pb.Directory.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_secrets_Rename(arg) { + if (!(arg instanceof polykey_v1_secrets_secrets_pb.Rename)) { + throw new Error('Expected argument of type polykey.v1.secrets.Rename'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_secrets_Rename(buffer_arg) { + return polykey_v1_secrets_secrets_pb.Rename.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_secrets_Secret(arg) { + if (!(arg instanceof polykey_v1_secrets_secrets_pb.Secret)) { + throw new Error('Expected argument of type polykey.v1.secrets.Secret'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_secrets_Secret(buffer_arg) { + return polykey_v1_secrets_secrets_pb.Secret.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_sessions_Password(arg) { + if (!(arg instanceof polykey_v1_sessions_sessions_pb.Password)) { + throw new Error('Expected argument of type polykey.v1.sessions.Password'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_sessions_Password(buffer_arg) { + return polykey_v1_sessions_sessions_pb.Password.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_sessions_Token(arg) { + if (!(arg instanceof polykey_v1_sessions_sessions_pb.Token)) { + throw new Error('Expected argument of type polykey.v1.sessions.Token'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_sessions_Token(buffer_arg) { + return polykey_v1_sessions_sessions_pb.Token.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_utils_EchoMessage(arg) { + if (!(arg instanceof polykey_v1_utils_utils_pb.EchoMessage)) { + throw new Error('Expected argument of type polykey.v1.utils.EchoMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_utils_EchoMessage(buffer_arg) { + return polykey_v1_utils_utils_pb.EchoMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_utils_EmptyMessage(arg) { + if (!(arg instanceof polykey_v1_utils_utils_pb.EmptyMessage)) { + throw new Error('Expected argument of type polykey.v1.utils.EmptyMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_utils_EmptyMessage(buffer_arg) { + return polykey_v1_utils_utils_pb.EmptyMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_utils_StatusMessage(arg) { + if (!(arg instanceof polykey_v1_utils_utils_pb.StatusMessage)) { + throw new Error('Expected argument of type polykey.v1.utils.StatusMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_utils_StatusMessage(buffer_arg) { + return polykey_v1_utils_utils_pb.StatusMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_Clone(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.Clone)) { + throw new Error('Expected argument of type polykey.v1.vaults.Clone'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_Clone(buffer_arg) { + return polykey_v1_vaults_vaults_pb.Clone.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_List(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.List)) { + throw new Error('Expected argument of type polykey.v1.vaults.List'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_List(buffer_arg) { + return polykey_v1_vaults_vaults_pb.List.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_Log(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.Log)) { + throw new Error('Expected argument of type polykey.v1.vaults.Log'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_Log(buffer_arg) { + return polykey_v1_vaults_vaults_pb.Log.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_LogEntry(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.LogEntry)) { + throw new Error('Expected argument of type polykey.v1.vaults.LogEntry'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_LogEntry(buffer_arg) { + return polykey_v1_vaults_vaults_pb.LogEntry.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_Mkdir(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.Mkdir)) { + throw new Error('Expected argument of type polykey.v1.vaults.Mkdir'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_Mkdir(buffer_arg) { + return polykey_v1_vaults_vaults_pb.Mkdir.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_PermGet(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.PermGet)) { + throw new Error('Expected argument of type polykey.v1.vaults.PermGet'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_PermGet(buffer_arg) { + return polykey_v1_vaults_vaults_pb.PermGet.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_PermSet(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.PermSet)) { + throw new Error('Expected argument of type polykey.v1.vaults.PermSet'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_PermSet(buffer_arg) { + return polykey_v1_vaults_vaults_pb.PermSet.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_PermUnset(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.PermUnset)) { + throw new Error('Expected argument of type polykey.v1.vaults.PermUnset'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_PermUnset(buffer_arg) { + return polykey_v1_vaults_vaults_pb.PermUnset.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_Permission(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.Permission)) { + throw new Error('Expected argument of type polykey.v1.vaults.Permission'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_Permission(buffer_arg) { + return polykey_v1_vaults_vaults_pb.Permission.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_Pull(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.Pull)) { + throw new Error('Expected argument of type polykey.v1.vaults.Pull'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_Pull(buffer_arg) { + return polykey_v1_vaults_vaults_pb.Pull.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_Rename(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.Rename)) { + throw new Error('Expected argument of type polykey.v1.vaults.Rename'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_Rename(buffer_arg) { + return polykey_v1_vaults_vaults_pb.Rename.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_Stat(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.Stat)) { + throw new Error('Expected argument of type polykey.v1.vaults.Stat'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_Stat(buffer_arg) { + return polykey_v1_vaults_vaults_pb.Stat.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_Vault(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.Vault)) { + throw new Error('Expected argument of type polykey.v1.vaults.Vault'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_Vault(buffer_arg) { + return polykey_v1_vaults_vaults_pb.Vault.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_Version(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.Version)) { + throw new Error('Expected argument of type polykey.v1.vaults.Version'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_Version(buffer_arg) { + return polykey_v1_vaults_vaults_pb.Version.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_polykey_v1_vaults_VersionResult(arg) { + if (!(arg instanceof polykey_v1_vaults_vaults_pb.VersionResult)) { + throw new Error('Expected argument of type polykey.v1.vaults.VersionResult'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_vaults_VersionResult(buffer_arg) { + return polykey_v1_vaults_vaults_pb.VersionResult.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var ClientServiceService = exports.ClientServiceService = { + echo: { + path: '/polykey.v1.ClientService/Echo', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EchoMessage, + responseType: polykey_v1_utils_utils_pb.EchoMessage, + requestSerialize: serialize_polykey_v1_utils_EchoMessage, + requestDeserialize: deserialize_polykey_v1_utils_EchoMessage, + responseSerialize: serialize_polykey_v1_utils_EchoMessage, + responseDeserialize: deserialize_polykey_v1_utils_EchoMessage, + }, + // Agent +agentStop: { + path: '/polykey.v1.ClientService/AgentStop', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + // Session +sessionUnlock: { + path: '/polykey.v1.ClientService/SessionUnlock', + requestStream: false, + responseStream: false, + requestType: polykey_v1_sessions_sessions_pb.Password, + responseType: polykey_v1_sessions_sessions_pb.Token, + requestSerialize: serialize_polykey_v1_sessions_Password, + requestDeserialize: deserialize_polykey_v1_sessions_Password, + responseSerialize: serialize_polykey_v1_sessions_Token, + responseDeserialize: deserialize_polykey_v1_sessions_Token, + }, + sessionRefresh: { + path: '/polykey.v1.ClientService/SessionRefresh', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_sessions_sessions_pb.Token, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_sessions_Token, + responseDeserialize: deserialize_polykey_v1_sessions_Token, + }, + sessionLockAll: { + path: '/polykey.v1.ClientService/SessionLockAll', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + // Nodes +nodesAdd: { + path: '/polykey.v1.ClientService/NodesAdd', + requestStream: false, + responseStream: false, + requestType: polykey_v1_nodes_nodes_pb.NodeAddress, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_nodes_NodeAddress, + requestDeserialize: deserialize_polykey_v1_nodes_NodeAddress, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + nodesPing: { + path: '/polykey.v1.ClientService/NodesPing', + requestStream: false, + responseStream: false, + requestType: polykey_v1_nodes_nodes_pb.Node, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_nodes_Node, + requestDeserialize: deserialize_polykey_v1_nodes_Node, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + nodesClaim: { + path: '/polykey.v1.ClientService/NodesClaim', + requestStream: false, + responseStream: false, + requestType: polykey_v1_nodes_nodes_pb.Claim, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_nodes_Claim, + requestDeserialize: deserialize_polykey_v1_nodes_Claim, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + nodesFind: { + path: '/polykey.v1.ClientService/NodesFind', + requestStream: false, + responseStream: false, + requestType: polykey_v1_nodes_nodes_pb.Node, + responseType: polykey_v1_nodes_nodes_pb.NodeAddress, + requestSerialize: serialize_polykey_v1_nodes_Node, + requestDeserialize: deserialize_polykey_v1_nodes_Node, + responseSerialize: serialize_polykey_v1_nodes_NodeAddress, + responseDeserialize: deserialize_polykey_v1_nodes_NodeAddress, + }, + // Keys +keysKeyPairRoot: { + path: '/polykey.v1.ClientService/KeysKeyPairRoot', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_keys_keys_pb.KeyPair, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_keys_KeyPair, + responseDeserialize: deserialize_polykey_v1_keys_KeyPair, + }, + keysKeyPairReset: { + path: '/polykey.v1.ClientService/KeysKeyPairReset', + requestStream: false, + responseStream: false, + requestType: polykey_v1_keys_keys_pb.Key, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_keys_Key, + requestDeserialize: deserialize_polykey_v1_keys_Key, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + keysKeyPairRenew: { + path: '/polykey.v1.ClientService/KeysKeyPairRenew', + requestStream: false, + responseStream: false, + requestType: polykey_v1_keys_keys_pb.Key, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_keys_Key, + requestDeserialize: deserialize_polykey_v1_keys_Key, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + keysEncrypt: { + path: '/polykey.v1.ClientService/KeysEncrypt', + requestStream: false, + responseStream: false, + requestType: polykey_v1_keys_keys_pb.Crypto, + responseType: polykey_v1_keys_keys_pb.Crypto, + requestSerialize: serialize_polykey_v1_keys_Crypto, + requestDeserialize: deserialize_polykey_v1_keys_Crypto, + responseSerialize: serialize_polykey_v1_keys_Crypto, + responseDeserialize: deserialize_polykey_v1_keys_Crypto, + }, + keysDecrypt: { + path: '/polykey.v1.ClientService/KeysDecrypt', + requestStream: false, + responseStream: false, + requestType: polykey_v1_keys_keys_pb.Crypto, + responseType: polykey_v1_keys_keys_pb.Crypto, + requestSerialize: serialize_polykey_v1_keys_Crypto, + requestDeserialize: deserialize_polykey_v1_keys_Crypto, + responseSerialize: serialize_polykey_v1_keys_Crypto, + responseDeserialize: deserialize_polykey_v1_keys_Crypto, + }, + keysSign: { + path: '/polykey.v1.ClientService/KeysSign', + requestStream: false, + responseStream: false, + requestType: polykey_v1_keys_keys_pb.Crypto, + responseType: polykey_v1_keys_keys_pb.Crypto, + requestSerialize: serialize_polykey_v1_keys_Crypto, + requestDeserialize: deserialize_polykey_v1_keys_Crypto, + responseSerialize: serialize_polykey_v1_keys_Crypto, + responseDeserialize: deserialize_polykey_v1_keys_Crypto, + }, + keysVerify: { + path: '/polykey.v1.ClientService/KeysVerify', + requestStream: false, + responseStream: false, + requestType: polykey_v1_keys_keys_pb.Crypto, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_keys_Crypto, + requestDeserialize: deserialize_polykey_v1_keys_Crypto, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + keysPasswordChange: { + path: '/polykey.v1.ClientService/KeysPasswordChange', + requestStream: false, + responseStream: false, + requestType: polykey_v1_sessions_sessions_pb.Password, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_sessions_Password, + requestDeserialize: deserialize_polykey_v1_sessions_Password, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + keysCertsGet: { + path: '/polykey.v1.ClientService/KeysCertsGet', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_keys_keys_pb.Certificate, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_keys_Certificate, + responseDeserialize: deserialize_polykey_v1_keys_Certificate, + }, + keysCertsChainGet: { + path: '/polykey.v1.ClientService/KeysCertsChainGet', + requestStream: false, + responseStream: true, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_keys_keys_pb.Certificate, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_keys_Certificate, + responseDeserialize: deserialize_polykey_v1_keys_Certificate, + }, + // Vaults +vaultsList: { + path: '/polykey.v1.ClientService/VaultsList', + requestStream: false, + responseStream: true, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_vaults_vaults_pb.List, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_vaults_List, + responseDeserialize: deserialize_polykey_v1_vaults_List, + }, + vaultsCreate: { + path: '/polykey.v1.ClientService/VaultsCreate', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.Vault, + responseType: polykey_v1_vaults_vaults_pb.Vault, + requestSerialize: serialize_polykey_v1_vaults_Vault, + requestDeserialize: deserialize_polykey_v1_vaults_Vault, + responseSerialize: serialize_polykey_v1_vaults_Vault, + responseDeserialize: deserialize_polykey_v1_vaults_Vault, + }, + vaultsRename: { + path: '/polykey.v1.ClientService/VaultsRename', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.Rename, + responseType: polykey_v1_vaults_vaults_pb.Vault, + requestSerialize: serialize_polykey_v1_vaults_Rename, + requestDeserialize: deserialize_polykey_v1_vaults_Rename, + responseSerialize: serialize_polykey_v1_vaults_Vault, + responseDeserialize: deserialize_polykey_v1_vaults_Vault, + }, + vaultsDelete: { + path: '/polykey.v1.ClientService/VaultsDelete', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.Vault, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_vaults_Vault, + requestDeserialize: deserialize_polykey_v1_vaults_Vault, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsPull: { + path: '/polykey.v1.ClientService/VaultsPull', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.Pull, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_vaults_Pull, + requestDeserialize: deserialize_polykey_v1_vaults_Pull, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsClone: { + path: '/polykey.v1.ClientService/VaultsClone', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.Clone, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_vaults_Clone, + requestDeserialize: deserialize_polykey_v1_vaults_Clone, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsScan: { + path: '/polykey.v1.ClientService/VaultsScan', + requestStream: false, + responseStream: true, + requestType: polykey_v1_nodes_nodes_pb.Node, + responseType: polykey_v1_vaults_vaults_pb.List, + requestSerialize: serialize_polykey_v1_nodes_Node, + requestDeserialize: deserialize_polykey_v1_nodes_Node, + responseSerialize: serialize_polykey_v1_vaults_List, + responseDeserialize: deserialize_polykey_v1_vaults_List, + }, + vaultsSecretsList: { + path: '/polykey.v1.ClientService/VaultsSecretsList', + requestStream: false, + responseStream: true, + requestType: polykey_v1_vaults_vaults_pb.Vault, + responseType: polykey_v1_secrets_secrets_pb.Secret, + requestSerialize: serialize_polykey_v1_vaults_Vault, + requestDeserialize: deserialize_polykey_v1_vaults_Vault, + responseSerialize: serialize_polykey_v1_secrets_Secret, + responseDeserialize: deserialize_polykey_v1_secrets_Secret, + }, + vaultsSecretsMkdir: { + path: '/polykey.v1.ClientService/VaultsSecretsMkdir', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.Mkdir, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_vaults_Mkdir, + requestDeserialize: deserialize_polykey_v1_vaults_Mkdir, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsSecretsStat: { + path: '/polykey.v1.ClientService/VaultsSecretsStat', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.Vault, + responseType: polykey_v1_vaults_vaults_pb.Stat, + requestSerialize: serialize_polykey_v1_vaults_Vault, + requestDeserialize: deserialize_polykey_v1_vaults_Vault, + responseSerialize: serialize_polykey_v1_vaults_Stat, + responseDeserialize: deserialize_polykey_v1_vaults_Stat, + }, + vaultsSecretsDelete: { + path: '/polykey.v1.ClientService/VaultsSecretsDelete', + requestStream: false, + responseStream: false, + requestType: polykey_v1_secrets_secrets_pb.Secret, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_secrets_Secret, + requestDeserialize: deserialize_polykey_v1_secrets_Secret, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsSecretsEdit: { + path: '/polykey.v1.ClientService/VaultsSecretsEdit', + requestStream: false, + responseStream: false, + requestType: polykey_v1_secrets_secrets_pb.Secret, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_secrets_Secret, + requestDeserialize: deserialize_polykey_v1_secrets_Secret, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsSecretsGet: { + path: '/polykey.v1.ClientService/VaultsSecretsGet', + requestStream: false, + responseStream: false, + requestType: polykey_v1_secrets_secrets_pb.Secret, + responseType: polykey_v1_secrets_secrets_pb.Secret, + requestSerialize: serialize_polykey_v1_secrets_Secret, + requestDeserialize: deserialize_polykey_v1_secrets_Secret, + responseSerialize: serialize_polykey_v1_secrets_Secret, + responseDeserialize: deserialize_polykey_v1_secrets_Secret, + }, + vaultsSecretsRename: { + path: '/polykey.v1.ClientService/VaultsSecretsRename', + requestStream: false, + responseStream: false, + requestType: polykey_v1_secrets_secrets_pb.Rename, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_secrets_Rename, + requestDeserialize: deserialize_polykey_v1_secrets_Rename, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsSecretsNew: { + path: '/polykey.v1.ClientService/VaultsSecretsNew', + requestStream: false, + responseStream: false, + requestType: polykey_v1_secrets_secrets_pb.Secret, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_secrets_Secret, + requestDeserialize: deserialize_polykey_v1_secrets_Secret, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsSecretsNewDir: { + path: '/polykey.v1.ClientService/VaultsSecretsNewDir', + requestStream: false, + responseStream: false, + requestType: polykey_v1_secrets_secrets_pb.Directory, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_secrets_Directory, + requestDeserialize: deserialize_polykey_v1_secrets_Directory, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsPermissionsSet: { + path: '/polykey.v1.ClientService/VaultsPermissionsSet', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.PermSet, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_vaults_PermSet, + requestDeserialize: deserialize_polykey_v1_vaults_PermSet, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsPermissionsUnset: { + path: '/polykey.v1.ClientService/VaultsPermissionsUnset', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.PermUnset, + responseType: polykey_v1_utils_utils_pb.StatusMessage, + requestSerialize: serialize_polykey_v1_vaults_PermUnset, + requestDeserialize: deserialize_polykey_v1_vaults_PermUnset, + responseSerialize: serialize_polykey_v1_utils_StatusMessage, + responseDeserialize: deserialize_polykey_v1_utils_StatusMessage, + }, + vaultsPermissions: { + path: '/polykey.v1.ClientService/VaultsPermissions', + requestStream: false, + responseStream: true, + requestType: polykey_v1_vaults_vaults_pb.PermGet, + responseType: polykey_v1_vaults_vaults_pb.Permission, + requestSerialize: serialize_polykey_v1_vaults_PermGet, + requestDeserialize: deserialize_polykey_v1_vaults_PermGet, + responseSerialize: serialize_polykey_v1_vaults_Permission, + responseDeserialize: deserialize_polykey_v1_vaults_Permission, + }, + vaultsVersion: { + path: '/polykey.v1.ClientService/VaultsVersion', + requestStream: false, + responseStream: false, + requestType: polykey_v1_vaults_vaults_pb.Version, + responseType: polykey_v1_vaults_vaults_pb.VersionResult, + requestSerialize: serialize_polykey_v1_vaults_Version, + requestDeserialize: deserialize_polykey_v1_vaults_Version, + responseSerialize: serialize_polykey_v1_vaults_VersionResult, + responseDeserialize: deserialize_polykey_v1_vaults_VersionResult, + }, + vaultsLog: { + path: '/polykey.v1.ClientService/VaultsLog', + requestStream: false, + responseStream: true, + requestType: polykey_v1_vaults_vaults_pb.Log, + responseType: polykey_v1_vaults_vaults_pb.LogEntry, + requestSerialize: serialize_polykey_v1_vaults_Log, + requestDeserialize: deserialize_polykey_v1_vaults_Log, + responseSerialize: serialize_polykey_v1_vaults_LogEntry, + responseDeserialize: deserialize_polykey_v1_vaults_LogEntry, + }, + // Identities +identitiesAuthenticate: { + path: '/polykey.v1.ClientService/IdentitiesAuthenticate', + requestStream: false, + responseStream: true, + requestType: polykey_v1_identities_identities_pb.Provider, + responseType: polykey_v1_identities_identities_pb.Provider, + requestSerialize: serialize_polykey_v1_identities_Provider, + requestDeserialize: deserialize_polykey_v1_identities_Provider, + responseSerialize: serialize_polykey_v1_identities_Provider, + responseDeserialize: deserialize_polykey_v1_identities_Provider, + }, + identitiesTokenPut: { + path: '/polykey.v1.ClientService/IdentitiesTokenPut', + requestStream: false, + responseStream: false, + requestType: polykey_v1_identities_identities_pb.TokenSpecific, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_identities_TokenSpecific, + requestDeserialize: deserialize_polykey_v1_identities_TokenSpecific, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + identitiesTokenGet: { + path: '/polykey.v1.ClientService/IdentitiesTokenGet', + requestStream: false, + responseStream: false, + requestType: polykey_v1_identities_identities_pb.Provider, + responseType: polykey_v1_identities_identities_pb.Token, + requestSerialize: serialize_polykey_v1_identities_Provider, + requestDeserialize: deserialize_polykey_v1_identities_Provider, + responseSerialize: serialize_polykey_v1_identities_Token, + responseDeserialize: deserialize_polykey_v1_identities_Token, + }, + identitiesTokenDelete: { + path: '/polykey.v1.ClientService/IdentitiesTokenDelete', + requestStream: false, + responseStream: false, + requestType: polykey_v1_identities_identities_pb.Provider, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_identities_Provider, + requestDeserialize: deserialize_polykey_v1_identities_Provider, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + identitiesProvidersList: { + path: '/polykey.v1.ClientService/IdentitiesProvidersList', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_identities_identities_pb.Provider, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_identities_Provider, + responseDeserialize: deserialize_polykey_v1_identities_Provider, + }, + identitiesInfoGet: { + path: '/polykey.v1.ClientService/IdentitiesInfoGet', + requestStream: false, + responseStream: false, + requestType: polykey_v1_identities_identities_pb.Provider, + responseType: polykey_v1_identities_identities_pb.Provider, + requestSerialize: serialize_polykey_v1_identities_Provider, + requestDeserialize: deserialize_polykey_v1_identities_Provider, + responseSerialize: serialize_polykey_v1_identities_Provider, + responseDeserialize: deserialize_polykey_v1_identities_Provider, + }, + identitiesInfoGetConnected: { + path: '/polykey.v1.ClientService/IdentitiesInfoGetConnected', + requestStream: false, + responseStream: true, + requestType: polykey_v1_identities_identities_pb.ProviderSearch, + responseType: polykey_v1_identities_identities_pb.Info, + requestSerialize: serialize_polykey_v1_identities_ProviderSearch, + requestDeserialize: deserialize_polykey_v1_identities_ProviderSearch, + responseSerialize: serialize_polykey_v1_identities_Info, + responseDeserialize: deserialize_polykey_v1_identities_Info, + }, + identitiesClaim: { + path: '/polykey.v1.ClientService/IdentitiesClaim', + requestStream: false, + responseStream: false, + requestType: polykey_v1_identities_identities_pb.Provider, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_identities_Provider, + requestDeserialize: deserialize_polykey_v1_identities_Provider, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + // Gestalts +gestaltsGestaltList: { + path: '/polykey.v1.ClientService/GestaltsGestaltList', + requestStream: false, + responseStream: true, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_gestalts_gestalts_pb.Gestalt, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_gestalts_Gestalt, + responseDeserialize: deserialize_polykey_v1_gestalts_Gestalt, + }, + gestaltsGestaltGetByNode: { + path: '/polykey.v1.ClientService/GestaltsGestaltGetByNode', + requestStream: false, + responseStream: false, + requestType: polykey_v1_nodes_nodes_pb.Node, + responseType: polykey_v1_gestalts_gestalts_pb.Graph, + requestSerialize: serialize_polykey_v1_nodes_Node, + requestDeserialize: deserialize_polykey_v1_nodes_Node, + responseSerialize: serialize_polykey_v1_gestalts_Graph, + responseDeserialize: deserialize_polykey_v1_gestalts_Graph, + }, + gestaltsGestaltGetByIdentity: { + path: '/polykey.v1.ClientService/GestaltsGestaltGetByIdentity', + requestStream: false, + responseStream: false, + requestType: polykey_v1_identities_identities_pb.Provider, + responseType: polykey_v1_gestalts_gestalts_pb.Graph, + requestSerialize: serialize_polykey_v1_identities_Provider, + requestDeserialize: deserialize_polykey_v1_identities_Provider, + responseSerialize: serialize_polykey_v1_gestalts_Graph, + responseDeserialize: deserialize_polykey_v1_gestalts_Graph, + }, + gestaltsDiscoveryByNode: { + path: '/polykey.v1.ClientService/GestaltsDiscoveryByNode', + requestStream: false, + responseStream: false, + requestType: polykey_v1_nodes_nodes_pb.Node, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_nodes_Node, + requestDeserialize: deserialize_polykey_v1_nodes_Node, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + gestaltsDiscoveryByIdentity: { + path: '/polykey.v1.ClientService/GestaltsDiscoveryByIdentity', + requestStream: false, + responseStream: false, + requestType: polykey_v1_identities_identities_pb.Provider, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_identities_Provider, + requestDeserialize: deserialize_polykey_v1_identities_Provider, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + gestaltsActionsGetByNode: { + path: '/polykey.v1.ClientService/GestaltsActionsGetByNode', + requestStream: false, + responseStream: false, + requestType: polykey_v1_nodes_nodes_pb.Node, + responseType: polykey_v1_permissions_permissions_pb.Actions, + requestSerialize: serialize_polykey_v1_nodes_Node, + requestDeserialize: deserialize_polykey_v1_nodes_Node, + responseSerialize: serialize_polykey_v1_permissions_Actions, + responseDeserialize: deserialize_polykey_v1_permissions_Actions, + }, + gestaltsActionsGetByIdentity: { + path: '/polykey.v1.ClientService/GestaltsActionsGetByIdentity', + requestStream: false, + responseStream: false, + requestType: polykey_v1_identities_identities_pb.Provider, + responseType: polykey_v1_permissions_permissions_pb.Actions, + requestSerialize: serialize_polykey_v1_identities_Provider, + requestDeserialize: deserialize_polykey_v1_identities_Provider, + responseSerialize: serialize_polykey_v1_permissions_Actions, + responseDeserialize: deserialize_polykey_v1_permissions_Actions, + }, + gestaltsActionsSetByNode: { + path: '/polykey.v1.ClientService/GestaltsActionsSetByNode', + requestStream: false, + responseStream: false, + requestType: polykey_v1_permissions_permissions_pb.ActionSet, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_permissions_ActionSet, + requestDeserialize: deserialize_polykey_v1_permissions_ActionSet, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + gestaltsActionsSetByIdentity: { + path: '/polykey.v1.ClientService/GestaltsActionsSetByIdentity', + requestStream: false, + responseStream: false, + requestType: polykey_v1_permissions_permissions_pb.ActionSet, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_permissions_ActionSet, + requestDeserialize: deserialize_polykey_v1_permissions_ActionSet, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + gestaltsActionsUnsetByNode: { + path: '/polykey.v1.ClientService/GestaltsActionsUnsetByNode', + requestStream: false, + responseStream: false, + requestType: polykey_v1_permissions_permissions_pb.ActionSet, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_permissions_ActionSet, + requestDeserialize: deserialize_polykey_v1_permissions_ActionSet, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + gestaltsActionsUnsetByIdentity: { + path: '/polykey.v1.ClientService/GestaltsActionsUnsetByIdentity', + requestStream: false, + responseStream: false, + requestType: polykey_v1_permissions_permissions_pb.ActionSet, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_permissions_ActionSet, + requestDeserialize: deserialize_polykey_v1_permissions_ActionSet, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + // Notifications +notificationsSend: { + path: '/polykey.v1.ClientService/NotificationsSend', + requestStream: false, + responseStream: false, + requestType: polykey_v1_notifications_notifications_pb.Send, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_notifications_Send, + requestDeserialize: deserialize_polykey_v1_notifications_Send, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, + notificationsRead: { + path: '/polykey.v1.ClientService/NotificationsRead', + requestStream: false, + responseStream: false, + requestType: polykey_v1_notifications_notifications_pb.Read, + responseType: polykey_v1_notifications_notifications_pb.List, + requestSerialize: serialize_polykey_v1_notifications_Read, + requestDeserialize: deserialize_polykey_v1_notifications_Read, + responseSerialize: serialize_polykey_v1_notifications_List, + responseDeserialize: deserialize_polykey_v1_notifications_List, + }, + notificationsClear: { + path: '/polykey.v1.ClientService/NotificationsClear', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EmptyMessage, + responseType: polykey_v1_utils_utils_pb.EmptyMessage, + requestSerialize: serialize_polykey_v1_utils_EmptyMessage, + requestDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + responseSerialize: serialize_polykey_v1_utils_EmptyMessage, + responseDeserialize: deserialize_polykey_v1_utils_EmptyMessage, + }, +}; + +exports.ClientServiceClient = grpc.makeGenericClientConstructor(ClientServiceService); diff --git a/src/proto/js/polykey/v1/client_service_pb.d.ts b/src/proto/js/polykey/v1/client_service_pb.d.ts new file mode 100644 index 000000000..34de9c4c8 --- /dev/null +++ b/src/proto/js/polykey/v1/client_service_pb.d.ts @@ -0,0 +1,17 @@ +// package: polykey.v1 +// file: polykey/v1/client_service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as polykey_v1_gestalts_gestalts_pb from "../../polykey/v1/gestalts/gestalts_pb"; +import * as polykey_v1_identities_identities_pb from "../../polykey/v1/identities/identities_pb"; +import * as polykey_v1_keys_keys_pb from "../../polykey/v1/keys/keys_pb"; +import * as polykey_v1_nodes_nodes_pb from "../../polykey/v1/nodes/nodes_pb"; +import * as polykey_v1_notifications_notifications_pb from "../../polykey/v1/notifications/notifications_pb"; +import * as polykey_v1_permissions_permissions_pb from "../../polykey/v1/permissions/permissions_pb"; +import * as polykey_v1_secrets_secrets_pb from "../../polykey/v1/secrets/secrets_pb"; +import * as polykey_v1_sessions_sessions_pb from "../../polykey/v1/sessions/sessions_pb"; +import * as polykey_v1_vaults_vaults_pb from "../../polykey/v1/vaults/vaults_pb"; +import * as polykey_v1_utils_utils_pb from "../../polykey/v1/utils/utils_pb"; diff --git a/src/proto/js/polykey/v1/client_service_pb.js b/src/proto/js/polykey/v1/client_service_pb.js new file mode 100644 index 000000000..82901160d --- /dev/null +++ b/src/proto/js/polykey/v1/client_service_pb.js @@ -0,0 +1,36 @@ +// source: polykey/v1/client_service.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var polykey_v1_gestalts_gestalts_pb = require('../../polykey/v1/gestalts/gestalts_pb.js'); +goog.object.extend(proto, polykey_v1_gestalts_gestalts_pb); +var polykey_v1_identities_identities_pb = require('../../polykey/v1/identities/identities_pb.js'); +goog.object.extend(proto, polykey_v1_identities_identities_pb); +var polykey_v1_keys_keys_pb = require('../../polykey/v1/keys/keys_pb.js'); +goog.object.extend(proto, polykey_v1_keys_keys_pb); +var polykey_v1_nodes_nodes_pb = require('../../polykey/v1/nodes/nodes_pb.js'); +goog.object.extend(proto, polykey_v1_nodes_nodes_pb); +var polykey_v1_notifications_notifications_pb = require('../../polykey/v1/notifications/notifications_pb.js'); +goog.object.extend(proto, polykey_v1_notifications_notifications_pb); +var polykey_v1_permissions_permissions_pb = require('../../polykey/v1/permissions/permissions_pb.js'); +goog.object.extend(proto, polykey_v1_permissions_permissions_pb); +var polykey_v1_secrets_secrets_pb = require('../../polykey/v1/secrets/secrets_pb.js'); +goog.object.extend(proto, polykey_v1_secrets_secrets_pb); +var polykey_v1_sessions_sessions_pb = require('../../polykey/v1/sessions/sessions_pb.js'); +goog.object.extend(proto, polykey_v1_sessions_sessions_pb); +var polykey_v1_vaults_vaults_pb = require('../../polykey/v1/vaults/vaults_pb.js'); +goog.object.extend(proto, polykey_v1_vaults_vaults_pb); +var polykey_v1_utils_utils_pb = require('../../polykey/v1/utils/utils_pb.js'); +goog.object.extend(proto, polykey_v1_utils_utils_pb); diff --git a/src/proto/js/polykey/v1/gestalts/gestalts_grpc_pb.js b/src/proto/js/polykey/v1/gestalts/gestalts_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/polykey/v1/gestalts/gestalts_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/polykey/v1/gestalts/gestalts_pb.d.ts b/src/proto/js/polykey/v1/gestalts/gestalts_pb.d.ts new file mode 100644 index 000000000..8710a95b4 --- /dev/null +++ b/src/proto/js/polykey/v1/gestalts/gestalts_pb.d.ts @@ -0,0 +1,73 @@ +// package: polykey.v1.gestalts +// file: polykey/v1/gestalts/gestalts.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Gestalt extends jspb.Message { + getName(): string; + setName(value: string): Gestalt; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Gestalt.AsObject; + static toObject(includeInstance: boolean, msg: Gestalt): Gestalt.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Gestalt, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Gestalt; + static deserializeBinaryFromReader(message: Gestalt, reader: jspb.BinaryReader): Gestalt; +} + +export namespace Gestalt { + export type AsObject = { + name: string, + } +} + +export class Graph extends jspb.Message { + getGestaltGraph(): string; + setGestaltGraph(value: string): Graph; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Graph.AsObject; + static toObject(includeInstance: boolean, msg: Graph): Graph.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Graph, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Graph; + static deserializeBinaryFromReader(message: Graph, reader: jspb.BinaryReader): Graph; +} + +export namespace Graph { + export type AsObject = { + gestaltGraph: string, + } +} + +export class Trust extends jspb.Message { + getProvider(): string; + setProvider(value: string): Trust; + getName(): string; + setName(value: string): Trust; + getSet(): boolean; + setSet(value: boolean): Trust; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Trust.AsObject; + static toObject(includeInstance: boolean, msg: Trust): Trust.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Trust, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Trust; + static deserializeBinaryFromReader(message: Trust, reader: jspb.BinaryReader): Trust; +} + +export namespace Trust { + export type AsObject = { + provider: string, + name: string, + set: boolean, + } +} diff --git a/src/proto/js/polykey/v1/gestalts/gestalts_pb.js b/src/proto/js/polykey/v1/gestalts/gestalts_pb.js new file mode 100644 index 000000000..90435b3be --- /dev/null +++ b/src/proto/js/polykey/v1/gestalts/gestalts_pb.js @@ -0,0 +1,533 @@ +// source: polykey/v1/gestalts/gestalts.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.polykey.v1.gestalts.Gestalt', null, global); +goog.exportSymbol('proto.polykey.v1.gestalts.Graph', null, global); +goog.exportSymbol('proto.polykey.v1.gestalts.Trust', null, global); +/** + * 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.polykey.v1.gestalts.Gestalt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.gestalts.Gestalt, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.gestalts.Gestalt.displayName = 'proto.polykey.v1.gestalts.Gestalt'; +} +/** + * 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.polykey.v1.gestalts.Graph = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.gestalts.Graph, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.gestalts.Graph.displayName = 'proto.polykey.v1.gestalts.Graph'; +} +/** + * 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.polykey.v1.gestalts.Trust = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.gestalts.Trust, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.gestalts.Trust.displayName = 'proto.polykey.v1.gestalts.Trust'; +} + + + +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.polykey.v1.gestalts.Gestalt.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.gestalts.Gestalt.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.polykey.v1.gestalts.Gestalt} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.gestalts.Gestalt.toObject = function(includeInstance, msg) { + var f, obj = { + name: 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.polykey.v1.gestalts.Gestalt} + */ +proto.polykey.v1.gestalts.Gestalt.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.gestalts.Gestalt; + return proto.polykey.v1.gestalts.Gestalt.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.gestalts.Gestalt} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.gestalts.Gestalt} + */ +proto.polykey.v1.gestalts.Gestalt.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.gestalts.Gestalt.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.gestalts.Gestalt.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.gestalts.Gestalt} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.gestalts.Gestalt.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.polykey.v1.gestalts.Gestalt.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.gestalts.Gestalt} returns this + */ +proto.polykey.v1.gestalts.Gestalt.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, 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.polykey.v1.gestalts.Graph.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.gestalts.Graph.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.polykey.v1.gestalts.Graph} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.gestalts.Graph.toObject = function(includeInstance, msg) { + var f, obj = { + gestaltGraph: 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.polykey.v1.gestalts.Graph} + */ +proto.polykey.v1.gestalts.Graph.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.gestalts.Graph; + return proto.polykey.v1.gestalts.Graph.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.gestalts.Graph} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.gestalts.Graph} + */ +proto.polykey.v1.gestalts.Graph.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.setGestaltGraph(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.gestalts.Graph.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.gestalts.Graph.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.gestalts.Graph} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.gestalts.Graph.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGestaltGraph(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string gestalt_graph = 1; + * @return {string} + */ +proto.polykey.v1.gestalts.Graph.prototype.getGestaltGraph = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.gestalts.Graph} returns this + */ +proto.polykey.v1.gestalts.Graph.prototype.setGestaltGraph = function(value) { + return jspb.Message.setProto3StringField(this, 1, 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.polykey.v1.gestalts.Trust.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.gestalts.Trust.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.polykey.v1.gestalts.Trust} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.gestalts.Trust.toObject = function(includeInstance, msg) { + var f, obj = { + provider: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + set: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.gestalts.Trust} + */ +proto.polykey.v1.gestalts.Trust.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.gestalts.Trust; + return proto.polykey.v1.gestalts.Trust.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.gestalts.Trust} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.gestalts.Trust} + */ +proto.polykey.v1.gestalts.Trust.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.setProvider(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.gestalts.Trust.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.gestalts.Trust.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.gestalts.Trust} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.gestalts.Trust.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSet(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional string provider = 1; + * @return {string} + */ +proto.polykey.v1.gestalts.Trust.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.gestalts.Trust} returns this + */ +proto.polykey.v1.gestalts.Trust.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.polykey.v1.gestalts.Trust.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.gestalts.Trust} returns this + */ +proto.polykey.v1.gestalts.Trust.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool set = 3; + * @return {boolean} + */ +proto.polykey.v1.gestalts.Trust.prototype.getSet = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.polykey.v1.gestalts.Trust} returns this + */ +proto.polykey.v1.gestalts.Trust.prototype.setSet = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +goog.object.extend(exports, proto.polykey.v1.gestalts); diff --git a/src/proto/js/polykey/v1/identities/identities_grpc_pb.js b/src/proto/js/polykey/v1/identities/identities_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/polykey/v1/identities/identities_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/polykey/v1/identities/identities_pb.d.ts b/src/proto/js/polykey/v1/identities/identities_pb.d.ts new file mode 100644 index 000000000..19525d464 --- /dev/null +++ b/src/proto/js/polykey/v1/identities/identities_pb.d.ts @@ -0,0 +1,136 @@ +// package: polykey.v1.identities +// file: polykey/v1/identities/identities.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Provider extends jspb.Message { + getProviderId(): string; + setProviderId(value: string): Provider; + getMessage(): string; + setMessage(value: string): Provider; + + 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 = { + providerId: string, + message: string, + } +} + +export class TokenSpecific extends jspb.Message { + + hasProvider(): boolean; + clearProvider(): void; + getProvider(): Provider | undefined; + setProvider(value?: Provider): TokenSpecific; + getToken(): string; + setToken(value: string): TokenSpecific; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenSpecific.AsObject; + static toObject(includeInstance: boolean, msg: TokenSpecific): TokenSpecific.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenSpecific, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenSpecific; + static deserializeBinaryFromReader(message: TokenSpecific, reader: jspb.BinaryReader): TokenSpecific; +} + +export namespace TokenSpecific { + export type AsObject = { + provider?: Provider.AsObject, + token: string, + } +} + +export class Token extends jspb.Message { + getToken(): string; + setToken(value: string): Token; + + 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 = { + token: string, + } +} + +export class ProviderSearch extends jspb.Message { + + hasProvider(): boolean; + clearProvider(): void; + getProvider(): Provider | undefined; + setProvider(value?: Provider): ProviderSearch; + clearSearchTermList(): void; + getSearchTermList(): Array; + setSearchTermList(value: Array): ProviderSearch; + addSearchTerm(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProviderSearch.AsObject; + static toObject(includeInstance: boolean, msg: ProviderSearch): ProviderSearch.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProviderSearch, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProviderSearch; + static deserializeBinaryFromReader(message: ProviderSearch, reader: jspb.BinaryReader): ProviderSearch; +} + +export namespace ProviderSearch { + export type AsObject = { + provider?: Provider.AsObject, + searchTermList: Array, + } +} + +export class Info extends jspb.Message { + + hasProvider(): boolean; + clearProvider(): void; + getProvider(): Provider | undefined; + setProvider(value?: Provider): Info; + getName(): string; + setName(value: string): Info; + getEmail(): string; + setEmail(value: string): Info; + getUrl(): string; + setUrl(value: string): Info; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Info.AsObject; + static toObject(includeInstance: boolean, msg: Info): Info.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Info, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Info; + static deserializeBinaryFromReader(message: Info, reader: jspb.BinaryReader): Info; +} + +export namespace Info { + export type AsObject = { + provider?: Provider.AsObject, + name: string, + email: string, + url: string, + } +} diff --git a/src/proto/js/polykey/v1/identities/identities_pb.js b/src/proto/js/polykey/v1/identities/identities_pb.js new file mode 100644 index 000000000..174ca65aa --- /dev/null +++ b/src/proto/js/polykey/v1/identities/identities_pb.js @@ -0,0 +1,1046 @@ +// source: polykey/v1/identities/identities.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.polykey.v1.identities.Info', null, global); +goog.exportSymbol('proto.polykey.v1.identities.Provider', null, global); +goog.exportSymbol('proto.polykey.v1.identities.ProviderSearch', null, global); +goog.exportSymbol('proto.polykey.v1.identities.Token', null, global); +goog.exportSymbol('proto.polykey.v1.identities.TokenSpecific', null, global); +/** + * 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.polykey.v1.identities.Provider = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.identities.Provider, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.identities.Provider.displayName = 'proto.polykey.v1.identities.Provider'; +} +/** + * 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.polykey.v1.identities.TokenSpecific = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.identities.TokenSpecific, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.identities.TokenSpecific.displayName = 'proto.polykey.v1.identities.TokenSpecific'; +} +/** + * 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.polykey.v1.identities.Token = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.identities.Token, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.identities.Token.displayName = 'proto.polykey.v1.identities.Token'; +} +/** + * 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.polykey.v1.identities.ProviderSearch = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.polykey.v1.identities.ProviderSearch.repeatedFields_, null); +}; +goog.inherits(proto.polykey.v1.identities.ProviderSearch, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.identities.ProviderSearch.displayName = 'proto.polykey.v1.identities.ProviderSearch'; +} +/** + * 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.polykey.v1.identities.Info = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.identities.Info, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.identities.Info.displayName = 'proto.polykey.v1.identities.Info'; +} + + + +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.polykey.v1.identities.Provider.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.identities.Provider.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.polykey.v1.identities.Provider} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.identities.Provider.toObject = function(includeInstance, msg) { + var f, obj = { + providerId: jspb.Message.getFieldWithDefault(msg, 1, ""), + message: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.identities.Provider} + */ +proto.polykey.v1.identities.Provider.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.identities.Provider; + return proto.polykey.v1.identities.Provider.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.identities.Provider} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.identities.Provider} + */ +proto.polykey.v1.identities.Provider.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.setProviderId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.identities.Provider.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.identities.Provider.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.identities.Provider} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.identities.Provider.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProviderId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string provider_id = 1; + * @return {string} + */ +proto.polykey.v1.identities.Provider.prototype.getProviderId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.identities.Provider} returns this + */ +proto.polykey.v1.identities.Provider.prototype.setProviderId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.polykey.v1.identities.Provider.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.identities.Provider} returns this + */ +proto.polykey.v1.identities.Provider.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, 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.polykey.v1.identities.TokenSpecific.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.identities.TokenSpecific.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.polykey.v1.identities.TokenSpecific} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.identities.TokenSpecific.toObject = function(includeInstance, msg) { + var f, obj = { + provider: (f = msg.getProvider()) && proto.polykey.v1.identities.Provider.toObject(includeInstance, f), + token: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.identities.TokenSpecific} + */ +proto.polykey.v1.identities.TokenSpecific.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.identities.TokenSpecific; + return proto.polykey.v1.identities.TokenSpecific.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.identities.TokenSpecific} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.identities.TokenSpecific} + */ +proto.polykey.v1.identities.TokenSpecific.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.polykey.v1.identities.Provider; + reader.readMessage(value,proto.polykey.v1.identities.Provider.deserializeBinaryFromReader); + msg.setProvider(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.identities.TokenSpecific.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.identities.TokenSpecific.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.identities.TokenSpecific} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.identities.TokenSpecific.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProvider(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.polykey.v1.identities.Provider.serializeBinaryToWriter + ); + } + f = message.getToken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Provider provider = 1; + * @return {?proto.polykey.v1.identities.Provider} + */ +proto.polykey.v1.identities.TokenSpecific.prototype.getProvider = function() { + return /** @type{?proto.polykey.v1.identities.Provider} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.identities.Provider, 1)); +}; + + +/** + * @param {?proto.polykey.v1.identities.Provider|undefined} value + * @return {!proto.polykey.v1.identities.TokenSpecific} returns this +*/ +proto.polykey.v1.identities.TokenSpecific.prototype.setProvider = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.identities.TokenSpecific} returns this + */ +proto.polykey.v1.identities.TokenSpecific.prototype.clearProvider = function() { + return this.setProvider(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.identities.TokenSpecific.prototype.hasProvider = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string token = 2; + * @return {string} + */ +proto.polykey.v1.identities.TokenSpecific.prototype.getToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.identities.TokenSpecific} returns this + */ +proto.polykey.v1.identities.TokenSpecific.prototype.setToken = function(value) { + return jspb.Message.setProto3StringField(this, 2, 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.polykey.v1.identities.Token.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.identities.Token.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.polykey.v1.identities.Token} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.identities.Token.toObject = function(includeInstance, msg) { + var f, obj = { + token: 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.polykey.v1.identities.Token} + */ +proto.polykey.v1.identities.Token.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.identities.Token; + return proto.polykey.v1.identities.Token.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.identities.Token} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.identities.Token} + */ +proto.polykey.v1.identities.Token.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.setToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.identities.Token.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.identities.Token.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.identities.Token} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.identities.Token.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getToken(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string token = 1; + * @return {string} + */ +proto.polykey.v1.identities.Token.prototype.getToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.identities.Token} returns this + */ +proto.polykey.v1.identities.Token.prototype.setToken = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.polykey.v1.identities.ProviderSearch.repeatedFields_ = [2]; + + + +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.polykey.v1.identities.ProviderSearch.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.identities.ProviderSearch.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.polykey.v1.identities.ProviderSearch} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.identities.ProviderSearch.toObject = function(includeInstance, msg) { + var f, obj = { + provider: (f = msg.getProvider()) && proto.polykey.v1.identities.Provider.toObject(includeInstance, f), + searchTermList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : 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.polykey.v1.identities.ProviderSearch} + */ +proto.polykey.v1.identities.ProviderSearch.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.identities.ProviderSearch; + return proto.polykey.v1.identities.ProviderSearch.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.identities.ProviderSearch} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.identities.ProviderSearch} + */ +proto.polykey.v1.identities.ProviderSearch.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.polykey.v1.identities.Provider; + reader.readMessage(value,proto.polykey.v1.identities.Provider.deserializeBinaryFromReader); + msg.setProvider(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addSearchTerm(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.identities.ProviderSearch.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.identities.ProviderSearch.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.identities.ProviderSearch} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.identities.ProviderSearch.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProvider(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.polykey.v1.identities.Provider.serializeBinaryToWriter + ); + } + f = message.getSearchTermList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional Provider provider = 1; + * @return {?proto.polykey.v1.identities.Provider} + */ +proto.polykey.v1.identities.ProviderSearch.prototype.getProvider = function() { + return /** @type{?proto.polykey.v1.identities.Provider} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.identities.Provider, 1)); +}; + + +/** + * @param {?proto.polykey.v1.identities.Provider|undefined} value + * @return {!proto.polykey.v1.identities.ProviderSearch} returns this +*/ +proto.polykey.v1.identities.ProviderSearch.prototype.setProvider = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.identities.ProviderSearch} returns this + */ +proto.polykey.v1.identities.ProviderSearch.prototype.clearProvider = function() { + return this.setProvider(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.identities.ProviderSearch.prototype.hasProvider = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated string search_term = 2; + * @return {!Array} + */ +proto.polykey.v1.identities.ProviderSearch.prototype.getSearchTermList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.polykey.v1.identities.ProviderSearch} returns this + */ +proto.polykey.v1.identities.ProviderSearch.prototype.setSearchTermList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.polykey.v1.identities.ProviderSearch} returns this + */ +proto.polykey.v1.identities.ProviderSearch.prototype.addSearchTerm = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.polykey.v1.identities.ProviderSearch} returns this + */ +proto.polykey.v1.identities.ProviderSearch.prototype.clearSearchTermList = function() { + return this.setSearchTermList([]); +}; + + + + + +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.polykey.v1.identities.Info.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.identities.Info.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.polykey.v1.identities.Info} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.identities.Info.toObject = function(includeInstance, msg) { + var f, obj = { + provider: (f = msg.getProvider()) && proto.polykey.v1.identities.Provider.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + email: jspb.Message.getFieldWithDefault(msg, 4, ""), + url: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.identities.Info} + */ +proto.polykey.v1.identities.Info.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.identities.Info; + return proto.polykey.v1.identities.Info.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.identities.Info} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.identities.Info} + */ +proto.polykey.v1.identities.Info.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.polykey.v1.identities.Provider; + reader.readMessage(value,proto.polykey.v1.identities.Provider.deserializeBinaryFromReader); + msg.setProvider(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setEmail(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.identities.Info.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.identities.Info.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.identities.Info} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.identities.Info.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProvider(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.polykey.v1.identities.Provider.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEmail(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional Provider provider = 1; + * @return {?proto.polykey.v1.identities.Provider} + */ +proto.polykey.v1.identities.Info.prototype.getProvider = function() { + return /** @type{?proto.polykey.v1.identities.Provider} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.identities.Provider, 1)); +}; + + +/** + * @param {?proto.polykey.v1.identities.Provider|undefined} value + * @return {!proto.polykey.v1.identities.Info} returns this +*/ +proto.polykey.v1.identities.Info.prototype.setProvider = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.identities.Info} returns this + */ +proto.polykey.v1.identities.Info.prototype.clearProvider = function() { + return this.setProvider(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.identities.Info.prototype.hasProvider = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.polykey.v1.identities.Info.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.identities.Info} returns this + */ +proto.polykey.v1.identities.Info.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string email = 4; + * @return {string} + */ +proto.polykey.v1.identities.Info.prototype.getEmail = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.identities.Info} returns this + */ +proto.polykey.v1.identities.Info.prototype.setEmail = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string url = 5; + * @return {string} + */ +proto.polykey.v1.identities.Info.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.identities.Info} returns this + */ +proto.polykey.v1.identities.Info.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +goog.object.extend(exports, proto.polykey.v1.identities); diff --git a/src/proto/js/polykey/v1/keys/keys_grpc_pb.js b/src/proto/js/polykey/v1/keys/keys_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/polykey/v1/keys/keys_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/polykey/v1/keys/keys_pb.d.ts b/src/proto/js/polykey/v1/keys/keys_pb.d.ts new file mode 100644 index 000000000..e9f800d6d --- /dev/null +++ b/src/proto/js/polykey/v1/keys/keys_pb.d.ts @@ -0,0 +1,96 @@ +// package: polykey.v1.keys +// file: polykey/v1/keys/keys.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Crypto extends jspb.Message { + getData(): string; + setData(value: string): Crypto; + getSignature(): string; + setSignature(value: string): Crypto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Crypto.AsObject; + static toObject(includeInstance: boolean, msg: Crypto): Crypto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Crypto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Crypto; + static deserializeBinaryFromReader(message: Crypto, reader: jspb.BinaryReader): Crypto; +} + +export namespace Crypto { + export type AsObject = { + data: string, + signature: string, + } +} + +export class Key extends jspb.Message { + getName(): string; + setName(value: string): Key; + getKey(): string; + setKey(value: string): Key; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Key.AsObject; + static toObject(includeInstance: boolean, msg: Key): Key.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Key, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Key; + static deserializeBinaryFromReader(message: Key, reader: jspb.BinaryReader): Key; +} + +export namespace Key { + export type AsObject = { + name: string, + key: string, + } +} + +export class KeyPair extends jspb.Message { + getPublic(): string; + setPublic(value: string): KeyPair; + getPrivate(): string; + setPrivate(value: string): KeyPair; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeyPair.AsObject; + static toObject(includeInstance: boolean, msg: KeyPair): KeyPair.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KeyPair, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KeyPair; + static deserializeBinaryFromReader(message: KeyPair, reader: jspb.BinaryReader): KeyPair; +} + +export namespace KeyPair { + export type AsObject = { + pb_public: string, + pb_private: string, + } +} + +export class Certificate extends jspb.Message { + getCert(): string; + setCert(value: string): Certificate; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Certificate.AsObject; + static toObject(includeInstance: boolean, msg: Certificate): Certificate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Certificate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Certificate; + static deserializeBinaryFromReader(message: Certificate, reader: jspb.BinaryReader): Certificate; +} + +export namespace Certificate { + export type AsObject = { + cert: string, + } +} diff --git a/src/proto/js/polykey/v1/keys/keys_pb.js b/src/proto/js/polykey/v1/keys/keys_pb.js new file mode 100644 index 000000000..dfbc1df0b --- /dev/null +++ b/src/proto/js/polykey/v1/keys/keys_pb.js @@ -0,0 +1,715 @@ +// source: polykey/v1/keys/keys.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.polykey.v1.keys.Certificate', null, global); +goog.exportSymbol('proto.polykey.v1.keys.Crypto', null, global); +goog.exportSymbol('proto.polykey.v1.keys.Key', null, global); +goog.exportSymbol('proto.polykey.v1.keys.KeyPair', null, global); +/** + * 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.polykey.v1.keys.Crypto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.keys.Crypto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.keys.Crypto.displayName = 'proto.polykey.v1.keys.Crypto'; +} +/** + * 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.polykey.v1.keys.Key = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.keys.Key, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.keys.Key.displayName = 'proto.polykey.v1.keys.Key'; +} +/** + * 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.polykey.v1.keys.KeyPair = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.keys.KeyPair, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.keys.KeyPair.displayName = 'proto.polykey.v1.keys.KeyPair'; +} +/** + * 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.polykey.v1.keys.Certificate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.keys.Certificate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.keys.Certificate.displayName = 'proto.polykey.v1.keys.Certificate'; +} + + + +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.polykey.v1.keys.Crypto.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.keys.Crypto.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.polykey.v1.keys.Crypto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.keys.Crypto.toObject = function(includeInstance, msg) { + var f, obj = { + data: jspb.Message.getFieldWithDefault(msg, 1, ""), + signature: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.keys.Crypto} + */ +proto.polykey.v1.keys.Crypto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.keys.Crypto; + return proto.polykey.v1.keys.Crypto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.keys.Crypto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.keys.Crypto} + */ +proto.polykey.v1.keys.Crypto.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.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.keys.Crypto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.keys.Crypto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.keys.Crypto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.keys.Crypto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string data = 1; + * @return {string} + */ +proto.polykey.v1.keys.Crypto.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.keys.Crypto} returns this + */ +proto.polykey.v1.keys.Crypto.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string signature = 2; + * @return {string} + */ +proto.polykey.v1.keys.Crypto.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.keys.Crypto} returns this + */ +proto.polykey.v1.keys.Crypto.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, 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.polykey.v1.keys.Key.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.keys.Key.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.polykey.v1.keys.Key} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.keys.Key.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.keys.Key} + */ +proto.polykey.v1.keys.Key.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.keys.Key; + return proto.polykey.v1.keys.Key.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.keys.Key} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.keys.Key} + */ +proto.polykey.v1.keys.Key.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.keys.Key.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.keys.Key.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.keys.Key} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.keys.Key.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.polykey.v1.keys.Key.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.keys.Key} returns this + */ +proto.polykey.v1.keys.Key.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.polykey.v1.keys.Key.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.keys.Key} returns this + */ +proto.polykey.v1.keys.Key.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, 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.polykey.v1.keys.KeyPair.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.keys.KeyPair.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.polykey.v1.keys.KeyPair} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.keys.KeyPair.toObject = function(includeInstance, msg) { + var f, obj = { + pb_public: jspb.Message.getFieldWithDefault(msg, 1, ""), + pb_private: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.keys.KeyPair} + */ +proto.polykey.v1.keys.KeyPair.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.keys.KeyPair; + return proto.polykey.v1.keys.KeyPair.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.keys.KeyPair} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.keys.KeyPair} + */ +proto.polykey.v1.keys.KeyPair.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.setPublic(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPrivate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.keys.KeyPair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.keys.KeyPair.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.keys.KeyPair} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.keys.KeyPair.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublic(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPrivate(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string public = 1; + * @return {string} + */ +proto.polykey.v1.keys.KeyPair.prototype.getPublic = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.keys.KeyPair} returns this + */ +proto.polykey.v1.keys.KeyPair.prototype.setPublic = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string private = 2; + * @return {string} + */ +proto.polykey.v1.keys.KeyPair.prototype.getPrivate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.keys.KeyPair} returns this + */ +proto.polykey.v1.keys.KeyPair.prototype.setPrivate = function(value) { + return jspb.Message.setProto3StringField(this, 2, 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.polykey.v1.keys.Certificate.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.keys.Certificate.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.polykey.v1.keys.Certificate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.keys.Certificate.toObject = function(includeInstance, msg) { + var f, obj = { + cert: 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.polykey.v1.keys.Certificate} + */ +proto.polykey.v1.keys.Certificate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.keys.Certificate; + return proto.polykey.v1.keys.Certificate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.keys.Certificate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.keys.Certificate} + */ +proto.polykey.v1.keys.Certificate.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.setCert(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.keys.Certificate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.keys.Certificate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.keys.Certificate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.keys.Certificate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCert(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string cert = 1; + * @return {string} + */ +proto.polykey.v1.keys.Certificate.prototype.getCert = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.keys.Certificate} returns this + */ +proto.polykey.v1.keys.Certificate.prototype.setCert = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.polykey.v1.keys); diff --git a/src/proto/js/polykey/v1/nodes/nodes_grpc_pb.js b/src/proto/js/polykey/v1/nodes/nodes_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/polykey/v1/nodes/nodes_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/polykey/v1/nodes/nodes_pb.d.ts b/src/proto/js/polykey/v1/nodes/nodes_pb.d.ts new file mode 100644 index 000000000..b257a2328 --- /dev/null +++ b/src/proto/js/polykey/v1/nodes/nodes_pb.d.ts @@ -0,0 +1,346 @@ +// package: polykey.v1.nodes +// file: polykey/v1/nodes/nodes.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Node extends jspb.Message { + getNodeId(): string; + setNodeId(value: string): Node; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Node.AsObject; + static toObject(includeInstance: boolean, msg: Node): Node.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Node, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Node; + static deserializeBinaryFromReader(message: Node, reader: jspb.BinaryReader): Node; +} + +export namespace Node { + export type AsObject = { + nodeId: string, + } +} + +export class Address extends jspb.Message { + getHost(): string; + setHost(value: string): Address; + getPort(): number; + setPort(value: number): Address; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Address.AsObject; + static toObject(includeInstance: boolean, msg: Address): Address.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Address, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Address; + static deserializeBinaryFromReader(message: Address, reader: jspb.BinaryReader): Address; +} + +export namespace Address { + export type AsObject = { + host: string, + port: number, + } +} + +export class NodeAddress extends jspb.Message { + getNodeId(): string; + setNodeId(value: string): NodeAddress; + + hasAddress(): boolean; + clearAddress(): void; + getAddress(): Address | undefined; + setAddress(value?: Address): NodeAddress; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NodeAddress.AsObject; + static toObject(includeInstance: boolean, msg: NodeAddress): NodeAddress.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NodeAddress, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NodeAddress; + static deserializeBinaryFromReader(message: NodeAddress, reader: jspb.BinaryReader): NodeAddress; +} + +export namespace NodeAddress { + export type AsObject = { + nodeId: string, + address?: Address.AsObject, + } +} + +export class Claim extends jspb.Message { + getNodeId(): string; + setNodeId(value: string): Claim; + getForceInvite(): boolean; + setForceInvite(value: boolean): Claim; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Claim.AsObject; + static toObject(includeInstance: boolean, msg: Claim): Claim.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Claim, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Claim; + static deserializeBinaryFromReader(message: Claim, reader: jspb.BinaryReader): Claim; +} + +export namespace Claim { + export type AsObject = { + nodeId: string, + forceInvite: boolean, + } +} + +export class Connection extends jspb.Message { + getAId(): string; + setAId(value: string): Connection; + getBId(): string; + setBId(value: string): Connection; + getAIp(): string; + setAIp(value: string): Connection; + getBIp(): string; + setBIp(value: string): Connection; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Connection.AsObject; + static toObject(includeInstance: boolean, msg: Connection): Connection.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Connection, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Connection; + static deserializeBinaryFromReader(message: Connection, reader: jspb.BinaryReader): Connection; +} + +export namespace Connection { + export type AsObject = { + aId: string, + bId: string, + aIp: string, + bIp: string, + } +} + +export class Relay extends jspb.Message { + getSrcId(): string; + setSrcId(value: string): Relay; + getTargetId(): string; + setTargetId(value: string): Relay; + getEgressAddress(): string; + setEgressAddress(value: string): Relay; + getSignature(): string; + setSignature(value: string): Relay; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Relay.AsObject; + static toObject(includeInstance: boolean, msg: Relay): Relay.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Relay, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Relay; + static deserializeBinaryFromReader(message: Relay, reader: jspb.BinaryReader): Relay; +} + +export namespace Relay { + export type AsObject = { + srcId: string, + targetId: string, + egressAddress: string, + signature: string, + } +} + +export class NodeTable extends jspb.Message { + + getNodeTableMap(): jspb.Map; + clearNodeTableMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NodeTable.AsObject; + static toObject(includeInstance: boolean, msg: NodeTable): NodeTable.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NodeTable, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NodeTable; + static deserializeBinaryFromReader(message: NodeTable, reader: jspb.BinaryReader): NodeTable; +} + +export namespace NodeTable { + export type AsObject = { + + nodeTableMap: Array<[string, Address.AsObject]>, + } +} + +export class ClaimType extends jspb.Message { + getClaimType(): string; + setClaimType(value: string): ClaimType; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ClaimType.AsObject; + static toObject(includeInstance: boolean, msg: ClaimType): ClaimType.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ClaimType, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ClaimType; + static deserializeBinaryFromReader(message: ClaimType, reader: jspb.BinaryReader): ClaimType; +} + +export namespace ClaimType { + export type AsObject = { + claimType: string, + } +} + +export class Claims extends jspb.Message { + clearClaimsList(): void; + getClaimsList(): Array; + setClaimsList(value: Array): Claims; + addClaims(value?: AgentClaim, index?: number): AgentClaim; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Claims.AsObject; + static toObject(includeInstance: boolean, msg: Claims): Claims.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Claims, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Claims; + static deserializeBinaryFromReader(message: Claims, reader: jspb.BinaryReader): Claims; +} + +export namespace Claims { + export type AsObject = { + claimsList: Array, + } +} + +export class ChainData extends jspb.Message { + + getChainDataMap(): jspb.Map; + clearChainDataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChainData.AsObject; + static toObject(includeInstance: boolean, msg: ChainData): ChainData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChainData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChainData; + static deserializeBinaryFromReader(message: ChainData, reader: jspb.BinaryReader): ChainData; +} + +export namespace ChainData { + export type AsObject = { + + chainDataMap: Array<[string, AgentClaim.AsObject]>, + } +} + +export class AgentClaim extends jspb.Message { + getPayload(): string; + setPayload(value: string): AgentClaim; + clearSignaturesList(): void; + getSignaturesList(): Array; + setSignaturesList(value: Array): AgentClaim; + addSignatures(value?: Signature, index?: number): Signature; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AgentClaim.AsObject; + static toObject(includeInstance: boolean, msg: AgentClaim): AgentClaim.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AgentClaim, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AgentClaim; + static deserializeBinaryFromReader(message: AgentClaim, reader: jspb.BinaryReader): AgentClaim; +} + +export namespace AgentClaim { + export type AsObject = { + payload: string, + signaturesList: Array, + } +} + +export class Signature extends jspb.Message { + getSignature(): string; + setSignature(value: string): Signature; + getProtected(): string; + setProtected(value: string): Signature; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Signature.AsObject; + static toObject(includeInstance: boolean, msg: Signature): Signature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Signature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Signature; + static deserializeBinaryFromReader(message: Signature, reader: jspb.BinaryReader): Signature; +} + +export namespace Signature { + export type AsObject = { + signature: string, + pb_protected: string, + } +} + +export class ClaimIntermediary extends jspb.Message { + getPayload(): string; + setPayload(value: string): ClaimIntermediary; + + hasSignature(): boolean; + clearSignature(): void; + getSignature(): Signature | undefined; + setSignature(value?: Signature): ClaimIntermediary; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ClaimIntermediary.AsObject; + static toObject(includeInstance: boolean, msg: ClaimIntermediary): ClaimIntermediary.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ClaimIntermediary, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ClaimIntermediary; + static deserializeBinaryFromReader(message: ClaimIntermediary, reader: jspb.BinaryReader): ClaimIntermediary; +} + +export namespace ClaimIntermediary { + export type AsObject = { + payload: string, + signature?: Signature.AsObject, + } +} + +export class CrossSign extends jspb.Message { + + hasSinglySignedClaim(): boolean; + clearSinglySignedClaim(): void; + getSinglySignedClaim(): ClaimIntermediary | undefined; + setSinglySignedClaim(value?: ClaimIntermediary): CrossSign; + + hasDoublySignedClaim(): boolean; + clearDoublySignedClaim(): void; + getDoublySignedClaim(): AgentClaim | undefined; + setDoublySignedClaim(value?: AgentClaim): CrossSign; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CrossSign.AsObject; + static toObject(includeInstance: boolean, msg: CrossSign): CrossSign.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CrossSign, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CrossSign; + static deserializeBinaryFromReader(message: CrossSign, reader: jspb.BinaryReader): CrossSign; +} + +export namespace CrossSign { + export type AsObject = { + singlySignedClaim?: ClaimIntermediary.AsObject, + doublySignedClaim?: AgentClaim.AsObject, + } +} diff --git a/src/proto/js/polykey/v1/nodes/nodes_pb.js b/src/proto/js/polykey/v1/nodes/nodes_pb.js new file mode 100644 index 000000000..7a86f1de4 --- /dev/null +++ b/src/proto/js/polykey/v1/nodes/nodes_pb.js @@ -0,0 +1,2685 @@ +// source: polykey/v1/nodes/nodes.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.polykey.v1.nodes.Address', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.AgentClaim', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.ChainData', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.Claim', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.ClaimIntermediary', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.ClaimType', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.Claims', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.Connection', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.CrossSign', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.Node', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.NodeAddress', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.NodeTable', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.Relay', null, global); +goog.exportSymbol('proto.polykey.v1.nodes.Signature', null, global); +/** + * 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.polykey.v1.nodes.Node = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.Node, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.Node.displayName = 'proto.polykey.v1.nodes.Node'; +} +/** + * 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.polykey.v1.nodes.Address = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.Address, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.Address.displayName = 'proto.polykey.v1.nodes.Address'; +} +/** + * 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.polykey.v1.nodes.NodeAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.NodeAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.NodeAddress.displayName = 'proto.polykey.v1.nodes.NodeAddress'; +} +/** + * 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.polykey.v1.nodes.Claim = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.Claim, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.Claim.displayName = 'proto.polykey.v1.nodes.Claim'; +} +/** + * 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.polykey.v1.nodes.Connection = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.Connection, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.Connection.displayName = 'proto.polykey.v1.nodes.Connection'; +} +/** + * 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.polykey.v1.nodes.Relay = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.Relay, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.Relay.displayName = 'proto.polykey.v1.nodes.Relay'; +} +/** + * 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.polykey.v1.nodes.NodeTable = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.NodeTable, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.NodeTable.displayName = 'proto.polykey.v1.nodes.NodeTable'; +} +/** + * 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.polykey.v1.nodes.ClaimType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.ClaimType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.ClaimType.displayName = 'proto.polykey.v1.nodes.ClaimType'; +} +/** + * 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.polykey.v1.nodes.Claims = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.polykey.v1.nodes.Claims.repeatedFields_, null); +}; +goog.inherits(proto.polykey.v1.nodes.Claims, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.Claims.displayName = 'proto.polykey.v1.nodes.Claims'; +} +/** + * 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.polykey.v1.nodes.ChainData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.ChainData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.ChainData.displayName = 'proto.polykey.v1.nodes.ChainData'; +} +/** + * 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.polykey.v1.nodes.AgentClaim = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.polykey.v1.nodes.AgentClaim.repeatedFields_, null); +}; +goog.inherits(proto.polykey.v1.nodes.AgentClaim, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.AgentClaim.displayName = 'proto.polykey.v1.nodes.AgentClaim'; +} +/** + * 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.polykey.v1.nodes.Signature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.Signature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.Signature.displayName = 'proto.polykey.v1.nodes.Signature'; +} +/** + * 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.polykey.v1.nodes.ClaimIntermediary = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.ClaimIntermediary, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.ClaimIntermediary.displayName = 'proto.polykey.v1.nodes.ClaimIntermediary'; +} +/** + * 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.polykey.v1.nodes.CrossSign = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.nodes.CrossSign, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.nodes.CrossSign.displayName = 'proto.polykey.v1.nodes.CrossSign'; +} + + + +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.polykey.v1.nodes.Node.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.Node.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.polykey.v1.nodes.Node} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Node.toObject = function(includeInstance, msg) { + var f, obj = { + nodeId: 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.polykey.v1.nodes.Node} + */ +proto.polykey.v1.nodes.Node.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.Node; + return proto.polykey.v1.nodes.Node.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.Node} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.Node} + */ +proto.polykey.v1.nodes.Node.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.setNodeId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.Node.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.Node.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.Node} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Node.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string node_id = 1; + * @return {string} + */ +proto.polykey.v1.nodes.Node.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Node} returns this + */ +proto.polykey.v1.nodes.Node.prototype.setNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 1, 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.polykey.v1.nodes.Address.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.Address.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.polykey.v1.nodes.Address} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Address.toObject = function(includeInstance, msg) { + var f, obj = { + host: jspb.Message.getFieldWithDefault(msg, 1, ""), + port: jspb.Message.getFieldWithDefault(msg, 2, 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.polykey.v1.nodes.Address} + */ +proto.polykey.v1.nodes.Address.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.Address; + return proto.polykey.v1.nodes.Address.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.Address} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.Address} + */ +proto.polykey.v1.nodes.Address.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.setHost(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPort(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.Address.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.Address.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.Address} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Address.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHost(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPort(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional string host = 1; + * @return {string} + */ +proto.polykey.v1.nodes.Address.prototype.getHost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Address} returns this + */ +proto.polykey.v1.nodes.Address.prototype.setHost = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 port = 2; + * @return {number} + */ +proto.polykey.v1.nodes.Address.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.polykey.v1.nodes.Address} returns this + */ +proto.polykey.v1.nodes.Address.prototype.setPort = function(value) { + return jspb.Message.setProto3IntField(this, 2, 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.polykey.v1.nodes.NodeAddress.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.NodeAddress.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.polykey.v1.nodes.NodeAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.NodeAddress.toObject = function(includeInstance, msg) { + var f, obj = { + nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: (f = msg.getAddress()) && proto.polykey.v1.nodes.Address.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.polykey.v1.nodes.NodeAddress} + */ +proto.polykey.v1.nodes.NodeAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.NodeAddress; + return proto.polykey.v1.nodes.NodeAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.NodeAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.NodeAddress} + */ +proto.polykey.v1.nodes.NodeAddress.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.setNodeId(value); + break; + case 2: + var value = new proto.polykey.v1.nodes.Address; + reader.readMessage(value,proto.polykey.v1.nodes.Address.deserializeBinaryFromReader); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.NodeAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.NodeAddress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.NodeAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.NodeAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.polykey.v1.nodes.Address.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string node_id = 1; + * @return {string} + */ +proto.polykey.v1.nodes.NodeAddress.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.NodeAddress} returns this + */ +proto.polykey.v1.nodes.NodeAddress.prototype.setNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Address address = 2; + * @return {?proto.polykey.v1.nodes.Address} + */ +proto.polykey.v1.nodes.NodeAddress.prototype.getAddress = function() { + return /** @type{?proto.polykey.v1.nodes.Address} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.nodes.Address, 2)); +}; + + +/** + * @param {?proto.polykey.v1.nodes.Address|undefined} value + * @return {!proto.polykey.v1.nodes.NodeAddress} returns this +*/ +proto.polykey.v1.nodes.NodeAddress.prototype.setAddress = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.nodes.NodeAddress} returns this + */ +proto.polykey.v1.nodes.NodeAddress.prototype.clearAddress = function() { + return this.setAddress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.nodes.NodeAddress.prototype.hasAddress = function() { + return jspb.Message.getField(this, 2) != 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.polykey.v1.nodes.Claim.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.Claim.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.polykey.v1.nodes.Claim} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Claim.toObject = function(includeInstance, msg) { + var f, obj = { + nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), + forceInvite: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.nodes.Claim} + */ +proto.polykey.v1.nodes.Claim.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.Claim; + return proto.polykey.v1.nodes.Claim.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.Claim} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.Claim} + */ +proto.polykey.v1.nodes.Claim.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.setNodeId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setForceInvite(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.Claim.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.Claim.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.Claim} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Claim.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getForceInvite(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string node_id = 1; + * @return {string} + */ +proto.polykey.v1.nodes.Claim.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Claim} returns this + */ +proto.polykey.v1.nodes.Claim.prototype.setNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool force_invite = 2; + * @return {boolean} + */ +proto.polykey.v1.nodes.Claim.prototype.getForceInvite = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.polykey.v1.nodes.Claim} returns this + */ +proto.polykey.v1.nodes.Claim.prototype.setForceInvite = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, 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.polykey.v1.nodes.Connection.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.Connection.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.polykey.v1.nodes.Connection} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Connection.toObject = function(includeInstance, msg) { + var f, obj = { + aId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bId: jspb.Message.getFieldWithDefault(msg, 2, ""), + aIp: jspb.Message.getFieldWithDefault(msg, 3, ""), + bIp: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.nodes.Connection} + */ +proto.polykey.v1.nodes.Connection.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.Connection; + return proto.polykey.v1.nodes.Connection.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.Connection} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.Connection} + */ +proto.polykey.v1.nodes.Connection.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.setAId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAIp(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBIp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.Connection.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.Connection.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.Connection} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Connection.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAIp(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBIp(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string a_id = 1; + * @return {string} + */ +proto.polykey.v1.nodes.Connection.prototype.getAId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Connection} returns this + */ +proto.polykey.v1.nodes.Connection.prototype.setAId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string b_id = 2; + * @return {string} + */ +proto.polykey.v1.nodes.Connection.prototype.getBId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Connection} returns this + */ +proto.polykey.v1.nodes.Connection.prototype.setBId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string a_ip = 3; + * @return {string} + */ +proto.polykey.v1.nodes.Connection.prototype.getAIp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Connection} returns this + */ +proto.polykey.v1.nodes.Connection.prototype.setAIp = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string b_ip = 4; + * @return {string} + */ +proto.polykey.v1.nodes.Connection.prototype.getBIp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Connection} returns this + */ +proto.polykey.v1.nodes.Connection.prototype.setBIp = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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.polykey.v1.nodes.Relay.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.Relay.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.polykey.v1.nodes.Relay} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Relay.toObject = function(includeInstance, msg) { + var f, obj = { + srcId: jspb.Message.getFieldWithDefault(msg, 1, ""), + targetId: jspb.Message.getFieldWithDefault(msg, 2, ""), + egressAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + signature: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.nodes.Relay} + */ +proto.polykey.v1.nodes.Relay.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.Relay; + return proto.polykey.v1.nodes.Relay.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.Relay} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.Relay} + */ +proto.polykey.v1.nodes.Relay.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.setSrcId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTargetId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setEgressAddress(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.Relay.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.Relay.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.Relay} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Relay.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSrcId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTargetId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEgressAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string src_id = 1; + * @return {string} + */ +proto.polykey.v1.nodes.Relay.prototype.getSrcId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Relay} returns this + */ +proto.polykey.v1.nodes.Relay.prototype.setSrcId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string target_id = 2; + * @return {string} + */ +proto.polykey.v1.nodes.Relay.prototype.getTargetId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Relay} returns this + */ +proto.polykey.v1.nodes.Relay.prototype.setTargetId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string egress_address = 3; + * @return {string} + */ +proto.polykey.v1.nodes.Relay.prototype.getEgressAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Relay} returns this + */ +proto.polykey.v1.nodes.Relay.prototype.setEgressAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string signature = 4; + * @return {string} + */ +proto.polykey.v1.nodes.Relay.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Relay} returns this + */ +proto.polykey.v1.nodes.Relay.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 4, 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.polykey.v1.nodes.NodeTable.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.NodeTable.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.polykey.v1.nodes.NodeTable} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.NodeTable.toObject = function(includeInstance, msg) { + var f, obj = { + nodeTableMap: (f = msg.getNodeTableMap()) ? f.toObject(includeInstance, proto.polykey.v1.nodes.Address.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.nodes.NodeTable} + */ +proto.polykey.v1.nodes.NodeTable.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.NodeTable; + return proto.polykey.v1.nodes.NodeTable.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.NodeTable} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.NodeTable} + */ +proto.polykey.v1.nodes.NodeTable.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getNodeTableMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.polykey.v1.nodes.Address.deserializeBinaryFromReader, "", new proto.polykey.v1.nodes.Address()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.NodeTable.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.NodeTable.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.NodeTable} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.NodeTable.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeTableMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.polykey.v1.nodes.Address.serializeBinaryToWriter); + } +}; + + +/** + * map node_table = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.polykey.v1.nodes.NodeTable.prototype.getNodeTableMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.polykey.v1.nodes.Address)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.polykey.v1.nodes.NodeTable} returns this + */ +proto.polykey.v1.nodes.NodeTable.prototype.clearNodeTableMap = function() { + this.getNodeTableMap().clear(); + return this;}; + + + + + +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.polykey.v1.nodes.ClaimType.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.ClaimType.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.polykey.v1.nodes.ClaimType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.ClaimType.toObject = function(includeInstance, msg) { + var f, obj = { + claimType: 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.polykey.v1.nodes.ClaimType} + */ +proto.polykey.v1.nodes.ClaimType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.ClaimType; + return proto.polykey.v1.nodes.ClaimType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.ClaimType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.ClaimType} + */ +proto.polykey.v1.nodes.ClaimType.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.setClaimType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.ClaimType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.ClaimType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.ClaimType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.ClaimType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClaimType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string claim_type = 1; + * @return {string} + */ +proto.polykey.v1.nodes.ClaimType.prototype.getClaimType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.ClaimType} returns this + */ +proto.polykey.v1.nodes.ClaimType.prototype.setClaimType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.polykey.v1.nodes.Claims.repeatedFields_ = [1]; + + + +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.polykey.v1.nodes.Claims.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.Claims.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.polykey.v1.nodes.Claims} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Claims.toObject = function(includeInstance, msg) { + var f, obj = { + claimsList: jspb.Message.toObjectList(msg.getClaimsList(), + proto.polykey.v1.nodes.AgentClaim.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.nodes.Claims} + */ +proto.polykey.v1.nodes.Claims.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.Claims; + return proto.polykey.v1.nodes.Claims.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.Claims} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.Claims} + */ +proto.polykey.v1.nodes.Claims.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.polykey.v1.nodes.AgentClaim; + reader.readMessage(value,proto.polykey.v1.nodes.AgentClaim.deserializeBinaryFromReader); + msg.addClaims(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.Claims.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.Claims.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.Claims} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Claims.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClaimsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.polykey.v1.nodes.AgentClaim.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated AgentClaim claims = 1; + * @return {!Array} + */ +proto.polykey.v1.nodes.Claims.prototype.getClaimsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.polykey.v1.nodes.AgentClaim, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.polykey.v1.nodes.Claims} returns this +*/ +proto.polykey.v1.nodes.Claims.prototype.setClaimsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.polykey.v1.nodes.AgentClaim=} opt_value + * @param {number=} opt_index + * @return {!proto.polykey.v1.nodes.AgentClaim} + */ +proto.polykey.v1.nodes.Claims.prototype.addClaims = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.polykey.v1.nodes.AgentClaim, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.polykey.v1.nodes.Claims} returns this + */ +proto.polykey.v1.nodes.Claims.prototype.clearClaimsList = function() { + return this.setClaimsList([]); +}; + + + + + +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.polykey.v1.nodes.ChainData.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.ChainData.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.polykey.v1.nodes.ChainData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.ChainData.toObject = function(includeInstance, msg) { + var f, obj = { + chainDataMap: (f = msg.getChainDataMap()) ? f.toObject(includeInstance, proto.polykey.v1.nodes.AgentClaim.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.nodes.ChainData} + */ +proto.polykey.v1.nodes.ChainData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.ChainData; + return proto.polykey.v1.nodes.ChainData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.ChainData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.ChainData} + */ +proto.polykey.v1.nodes.ChainData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getChainDataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.polykey.v1.nodes.AgentClaim.deserializeBinaryFromReader, "", new proto.polykey.v1.nodes.AgentClaim()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.ChainData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.ChainData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.ChainData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.ChainData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainDataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.polykey.v1.nodes.AgentClaim.serializeBinaryToWriter); + } +}; + + +/** + * map chain_data = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.polykey.v1.nodes.ChainData.prototype.getChainDataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.polykey.v1.nodes.AgentClaim)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.polykey.v1.nodes.ChainData} returns this + */ +proto.polykey.v1.nodes.ChainData.prototype.clearChainDataMap = function() { + this.getChainDataMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.polykey.v1.nodes.AgentClaim.repeatedFields_ = [2]; + + + +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.polykey.v1.nodes.AgentClaim.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.AgentClaim.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.polykey.v1.nodes.AgentClaim} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.AgentClaim.toObject = function(includeInstance, msg) { + var f, obj = { + payload: jspb.Message.getFieldWithDefault(msg, 1, ""), + signaturesList: jspb.Message.toObjectList(msg.getSignaturesList(), + proto.polykey.v1.nodes.Signature.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.nodes.AgentClaim} + */ +proto.polykey.v1.nodes.AgentClaim.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.AgentClaim; + return proto.polykey.v1.nodes.AgentClaim.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.AgentClaim} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.AgentClaim} + */ +proto.polykey.v1.nodes.AgentClaim.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.setPayload(value); + break; + case 2: + var value = new proto.polykey.v1.nodes.Signature; + reader.readMessage(value,proto.polykey.v1.nodes.Signature.deserializeBinaryFromReader); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.AgentClaim.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.AgentClaim.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.AgentClaim} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.AgentClaim.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPayload(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignaturesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.polykey.v1.nodes.Signature.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string payload = 1; + * @return {string} + */ +proto.polykey.v1.nodes.AgentClaim.prototype.getPayload = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.AgentClaim} returns this + */ +proto.polykey.v1.nodes.AgentClaim.prototype.setPayload = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Signature signatures = 2; + * @return {!Array} + */ +proto.polykey.v1.nodes.AgentClaim.prototype.getSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.polykey.v1.nodes.Signature, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.polykey.v1.nodes.AgentClaim} returns this +*/ +proto.polykey.v1.nodes.AgentClaim.prototype.setSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.polykey.v1.nodes.Signature=} opt_value + * @param {number=} opt_index + * @return {!proto.polykey.v1.nodes.Signature} + */ +proto.polykey.v1.nodes.AgentClaim.prototype.addSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.polykey.v1.nodes.Signature, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.polykey.v1.nodes.AgentClaim} returns this + */ +proto.polykey.v1.nodes.AgentClaim.prototype.clearSignaturesList = function() { + return this.setSignaturesList([]); +}; + + + + + +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.polykey.v1.nodes.Signature.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.Signature.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.polykey.v1.nodes.Signature} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Signature.toObject = function(includeInstance, msg) { + var f, obj = { + signature: jspb.Message.getFieldWithDefault(msg, 1, ""), + pb_protected: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.nodes.Signature} + */ +proto.polykey.v1.nodes.Signature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.Signature; + return proto.polykey.v1.nodes.Signature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.Signature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.Signature} + */ +proto.polykey.v1.nodes.Signature.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.setSignature(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProtected(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.Signature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.Signature.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.Signature} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.Signature.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProtected(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string signature = 1; + * @return {string} + */ +proto.polykey.v1.nodes.Signature.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Signature} returns this + */ +proto.polykey.v1.nodes.Signature.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string protected = 2; + * @return {string} + */ +proto.polykey.v1.nodes.Signature.prototype.getProtected = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.Signature} returns this + */ +proto.polykey.v1.nodes.Signature.prototype.setProtected = function(value) { + return jspb.Message.setProto3StringField(this, 2, 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.polykey.v1.nodes.ClaimIntermediary.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.ClaimIntermediary.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.polykey.v1.nodes.ClaimIntermediary} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.ClaimIntermediary.toObject = function(includeInstance, msg) { + var f, obj = { + payload: jspb.Message.getFieldWithDefault(msg, 1, ""), + signature: (f = msg.getSignature()) && proto.polykey.v1.nodes.Signature.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.polykey.v1.nodes.ClaimIntermediary} + */ +proto.polykey.v1.nodes.ClaimIntermediary.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.ClaimIntermediary; + return proto.polykey.v1.nodes.ClaimIntermediary.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.ClaimIntermediary} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.ClaimIntermediary} + */ +proto.polykey.v1.nodes.ClaimIntermediary.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.setPayload(value); + break; + case 2: + var value = new proto.polykey.v1.nodes.Signature; + reader.readMessage(value,proto.polykey.v1.nodes.Signature.deserializeBinaryFromReader); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.ClaimIntermediary.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.ClaimIntermediary.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.ClaimIntermediary} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.ClaimIntermediary.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPayload(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignature(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.polykey.v1.nodes.Signature.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string payload = 1; + * @return {string} + */ +proto.polykey.v1.nodes.ClaimIntermediary.prototype.getPayload = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.nodes.ClaimIntermediary} returns this + */ +proto.polykey.v1.nodes.ClaimIntermediary.prototype.setPayload = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Signature signature = 2; + * @return {?proto.polykey.v1.nodes.Signature} + */ +proto.polykey.v1.nodes.ClaimIntermediary.prototype.getSignature = function() { + return /** @type{?proto.polykey.v1.nodes.Signature} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.nodes.Signature, 2)); +}; + + +/** + * @param {?proto.polykey.v1.nodes.Signature|undefined} value + * @return {!proto.polykey.v1.nodes.ClaimIntermediary} returns this +*/ +proto.polykey.v1.nodes.ClaimIntermediary.prototype.setSignature = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.nodes.ClaimIntermediary} returns this + */ +proto.polykey.v1.nodes.ClaimIntermediary.prototype.clearSignature = function() { + return this.setSignature(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.nodes.ClaimIntermediary.prototype.hasSignature = function() { + return jspb.Message.getField(this, 2) != 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.polykey.v1.nodes.CrossSign.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.nodes.CrossSign.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.polykey.v1.nodes.CrossSign} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.CrossSign.toObject = function(includeInstance, msg) { + var f, obj = { + singlySignedClaim: (f = msg.getSinglySignedClaim()) && proto.polykey.v1.nodes.ClaimIntermediary.toObject(includeInstance, f), + doublySignedClaim: (f = msg.getDoublySignedClaim()) && proto.polykey.v1.nodes.AgentClaim.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.polykey.v1.nodes.CrossSign} + */ +proto.polykey.v1.nodes.CrossSign.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.nodes.CrossSign; + return proto.polykey.v1.nodes.CrossSign.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.nodes.CrossSign} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.nodes.CrossSign} + */ +proto.polykey.v1.nodes.CrossSign.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.polykey.v1.nodes.ClaimIntermediary; + reader.readMessage(value,proto.polykey.v1.nodes.ClaimIntermediary.deserializeBinaryFromReader); + msg.setSinglySignedClaim(value); + break; + case 2: + var value = new proto.polykey.v1.nodes.AgentClaim; + reader.readMessage(value,proto.polykey.v1.nodes.AgentClaim.deserializeBinaryFromReader); + msg.setDoublySignedClaim(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.nodes.CrossSign.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.nodes.CrossSign.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.nodes.CrossSign} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.nodes.CrossSign.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSinglySignedClaim(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.polykey.v1.nodes.ClaimIntermediary.serializeBinaryToWriter + ); + } + f = message.getDoublySignedClaim(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.polykey.v1.nodes.AgentClaim.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ClaimIntermediary singly_signed_claim = 1; + * @return {?proto.polykey.v1.nodes.ClaimIntermediary} + */ +proto.polykey.v1.nodes.CrossSign.prototype.getSinglySignedClaim = function() { + return /** @type{?proto.polykey.v1.nodes.ClaimIntermediary} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.nodes.ClaimIntermediary, 1)); +}; + + +/** + * @param {?proto.polykey.v1.nodes.ClaimIntermediary|undefined} value + * @return {!proto.polykey.v1.nodes.CrossSign} returns this +*/ +proto.polykey.v1.nodes.CrossSign.prototype.setSinglySignedClaim = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.nodes.CrossSign} returns this + */ +proto.polykey.v1.nodes.CrossSign.prototype.clearSinglySignedClaim = function() { + return this.setSinglySignedClaim(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.nodes.CrossSign.prototype.hasSinglySignedClaim = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional AgentClaim doubly_signed_claim = 2; + * @return {?proto.polykey.v1.nodes.AgentClaim} + */ +proto.polykey.v1.nodes.CrossSign.prototype.getDoublySignedClaim = function() { + return /** @type{?proto.polykey.v1.nodes.AgentClaim} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.nodes.AgentClaim, 2)); +}; + + +/** + * @param {?proto.polykey.v1.nodes.AgentClaim|undefined} value + * @return {!proto.polykey.v1.nodes.CrossSign} returns this +*/ +proto.polykey.v1.nodes.CrossSign.prototype.setDoublySignedClaim = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.nodes.CrossSign} returns this + */ +proto.polykey.v1.nodes.CrossSign.prototype.clearDoublySignedClaim = function() { + return this.setDoublySignedClaim(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.nodes.CrossSign.prototype.hasDoublySignedClaim = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.polykey.v1.nodes); diff --git a/src/proto/js/polykey/v1/notifications/notifications_grpc_pb.js b/src/proto/js/polykey/v1/notifications/notifications_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/polykey/v1/notifications/notifications_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/polykey/v1/notifications/notifications_pb.d.ts b/src/proto/js/polykey/v1/notifications/notifications_pb.d.ts new file mode 100644 index 000000000..1ffc8b00a --- /dev/null +++ b/src/proto/js/polykey/v1/notifications/notifications_pb.d.ts @@ -0,0 +1,200 @@ +// package: polykey.v1.notifications +// file: polykey/v1/notifications/notifications.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Notification extends jspb.Message { + + hasGeneral(): boolean; + clearGeneral(): void; + getGeneral(): General | undefined; + setGeneral(value?: General): Notification; + + hasGestaltInvite(): boolean; + clearGestaltInvite(): void; + getGestaltInvite(): string; + setGestaltInvite(value: string): Notification; + + hasVaultShare(): boolean; + clearVaultShare(): void; + getVaultShare(): Share | undefined; + setVaultShare(value?: Share): Notification; + getSenderId(): string; + setSenderId(value: string): Notification; + getIsRead(): boolean; + setIsRead(value: boolean): Notification; + + getDataCase(): Notification.DataCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Notification.AsObject; + static toObject(includeInstance: boolean, msg: Notification): Notification.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Notification, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Notification; + static deserializeBinaryFromReader(message: Notification, reader: jspb.BinaryReader): Notification; +} + +export namespace Notification { + export type AsObject = { + general?: General.AsObject, + gestaltInvite: string, + vaultShare?: Share.AsObject, + senderId: string, + isRead: boolean, + } + + export enum DataCase { + DATA_NOT_SET = 0, + GENERAL = 1, + GESTALT_INVITE = 2, + VAULT_SHARE = 3, + } + +} + +export class Send extends jspb.Message { + getReceiverId(): string; + setReceiverId(value: string): Send; + + hasData(): boolean; + clearData(): void; + getData(): General | undefined; + setData(value?: General): Send; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Send.AsObject; + static toObject(includeInstance: boolean, msg: Send): Send.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Send, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Send; + static deserializeBinaryFromReader(message: Send, reader: jspb.BinaryReader): Send; +} + +export namespace Send { + export type AsObject = { + receiverId: string, + data?: General.AsObject, + } +} + +export class Read extends jspb.Message { + getUnread(): boolean; + setUnread(value: boolean): Read; + getNumber(): string; + setNumber(value: string): Read; + getOrder(): string; + setOrder(value: string): Read; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Read.AsObject; + static toObject(includeInstance: boolean, msg: Read): Read.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Read, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Read; + static deserializeBinaryFromReader(message: Read, reader: jspb.BinaryReader): Read; +} + +export namespace Read { + export type AsObject = { + unread: boolean, + number: string, + order: string, + } +} + +export class List extends jspb.Message { + clearNotificationList(): void; + getNotificationList(): Array; + setNotificationList(value: Array): List; + addNotification(value?: Notification, index?: number): Notification; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): List.AsObject; + static toObject(includeInstance: boolean, msg: List): List.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: List, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): List; + static deserializeBinaryFromReader(message: List, reader: jspb.BinaryReader): List; +} + +export namespace List { + export type AsObject = { + notificationList: Array, + } +} + +export class General extends jspb.Message { + getMessage(): string; + setMessage(value: string): General; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): General.AsObject; + static toObject(includeInstance: boolean, msg: General): General.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: General, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): General; + static deserializeBinaryFromReader(message: General, reader: jspb.BinaryReader): General; +} + +export namespace General { + export type AsObject = { + message: string, + } +} + +export class Share extends jspb.Message { + getVaultId(): string; + setVaultId(value: string): Share; + getVaultName(): string; + setVaultName(value: string): Share; + clearActionsList(): void; + getActionsList(): Array; + setActionsList(value: Array): Share; + addActions(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Share.AsObject; + static toObject(includeInstance: boolean, msg: Share): Share.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Share, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Share; + static deserializeBinaryFromReader(message: Share, reader: jspb.BinaryReader): Share; +} + +export namespace Share { + export type AsObject = { + vaultId: string, + vaultName: string, + actionsList: Array, + } +} + +export class AgentNotification extends jspb.Message { + getContent(): string; + setContent(value: string): AgentNotification; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AgentNotification.AsObject; + static toObject(includeInstance: boolean, msg: AgentNotification): AgentNotification.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AgentNotification, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AgentNotification; + static deserializeBinaryFromReader(message: AgentNotification, reader: jspb.BinaryReader): AgentNotification; +} + +export namespace AgentNotification { + export type AsObject = { + content: string, + } +} diff --git a/src/proto/js/polykey/v1/notifications/notifications_pb.js b/src/proto/js/polykey/v1/notifications/notifications_pb.js new file mode 100644 index 000000000..f50f614f5 --- /dev/null +++ b/src/proto/js/polykey/v1/notifications/notifications_pb.js @@ -0,0 +1,1516 @@ +// source: polykey/v1/notifications/notifications.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.polykey.v1.notifications.AgentNotification', null, global); +goog.exportSymbol('proto.polykey.v1.notifications.General', null, global); +goog.exportSymbol('proto.polykey.v1.notifications.List', null, global); +goog.exportSymbol('proto.polykey.v1.notifications.Notification', null, global); +goog.exportSymbol('proto.polykey.v1.notifications.Notification.DataCase', null, global); +goog.exportSymbol('proto.polykey.v1.notifications.Read', null, global); +goog.exportSymbol('proto.polykey.v1.notifications.Send', null, global); +goog.exportSymbol('proto.polykey.v1.notifications.Share', null, global); +/** + * 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.polykey.v1.notifications.Notification = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.polykey.v1.notifications.Notification.oneofGroups_); +}; +goog.inherits(proto.polykey.v1.notifications.Notification, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.notifications.Notification.displayName = 'proto.polykey.v1.notifications.Notification'; +} +/** + * 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.polykey.v1.notifications.Send = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.notifications.Send, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.notifications.Send.displayName = 'proto.polykey.v1.notifications.Send'; +} +/** + * 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.polykey.v1.notifications.Read = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.notifications.Read, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.notifications.Read.displayName = 'proto.polykey.v1.notifications.Read'; +} +/** + * 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.polykey.v1.notifications.List = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.polykey.v1.notifications.List.repeatedFields_, null); +}; +goog.inherits(proto.polykey.v1.notifications.List, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.notifications.List.displayName = 'proto.polykey.v1.notifications.List'; +} +/** + * 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.polykey.v1.notifications.General = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.notifications.General, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.notifications.General.displayName = 'proto.polykey.v1.notifications.General'; +} +/** + * 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.polykey.v1.notifications.Share = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.polykey.v1.notifications.Share.repeatedFields_, null); +}; +goog.inherits(proto.polykey.v1.notifications.Share, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.notifications.Share.displayName = 'proto.polykey.v1.notifications.Share'; +} +/** + * 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.polykey.v1.notifications.AgentNotification = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.notifications.AgentNotification, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.notifications.AgentNotification.displayName = 'proto.polykey.v1.notifications.AgentNotification'; +} + +/** + * 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.polykey.v1.notifications.Notification.oneofGroups_ = [[1,2,3]]; + +/** + * @enum {number} + */ +proto.polykey.v1.notifications.Notification.DataCase = { + DATA_NOT_SET: 0, + GENERAL: 1, + GESTALT_INVITE: 2, + VAULT_SHARE: 3 +}; + +/** + * @return {proto.polykey.v1.notifications.Notification.DataCase} + */ +proto.polykey.v1.notifications.Notification.prototype.getDataCase = function() { + return /** @type {proto.polykey.v1.notifications.Notification.DataCase} */(jspb.Message.computeOneofCase(this, proto.polykey.v1.notifications.Notification.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.polykey.v1.notifications.Notification.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.notifications.Notification.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.polykey.v1.notifications.Notification} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.Notification.toObject = function(includeInstance, msg) { + var f, obj = { + general: (f = msg.getGeneral()) && proto.polykey.v1.notifications.General.toObject(includeInstance, f), + gestaltInvite: jspb.Message.getFieldWithDefault(msg, 2, ""), + vaultShare: (f = msg.getVaultShare()) && proto.polykey.v1.notifications.Share.toObject(includeInstance, f), + senderId: jspb.Message.getFieldWithDefault(msg, 4, ""), + isRead: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.notifications.Notification} + */ +proto.polykey.v1.notifications.Notification.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.notifications.Notification; + return proto.polykey.v1.notifications.Notification.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.notifications.Notification} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.notifications.Notification} + */ +proto.polykey.v1.notifications.Notification.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.polykey.v1.notifications.General; + reader.readMessage(value,proto.polykey.v1.notifications.General.deserializeBinaryFromReader); + msg.setGeneral(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setGestaltInvite(value); + break; + case 3: + var value = new proto.polykey.v1.notifications.Share; + reader.readMessage(value,proto.polykey.v1.notifications.Share.deserializeBinaryFromReader); + msg.setVaultShare(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSenderId(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsRead(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.notifications.Notification.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.notifications.Notification.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.notifications.Notification} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.Notification.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGeneral(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.polykey.v1.notifications.General.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getVaultShare(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.polykey.v1.notifications.Share.serializeBinaryToWriter + ); + } + f = message.getSenderId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getIsRead(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional General general = 1; + * @return {?proto.polykey.v1.notifications.General} + */ +proto.polykey.v1.notifications.Notification.prototype.getGeneral = function() { + return /** @type{?proto.polykey.v1.notifications.General} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.notifications.General, 1)); +}; + + +/** + * @param {?proto.polykey.v1.notifications.General|undefined} value + * @return {!proto.polykey.v1.notifications.Notification} returns this +*/ +proto.polykey.v1.notifications.Notification.prototype.setGeneral = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.polykey.v1.notifications.Notification.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.notifications.Notification} returns this + */ +proto.polykey.v1.notifications.Notification.prototype.clearGeneral = function() { + return this.setGeneral(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.notifications.Notification.prototype.hasGeneral = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string gestalt_invite = 2; + * @return {string} + */ +proto.polykey.v1.notifications.Notification.prototype.getGestaltInvite = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.notifications.Notification} returns this + */ +proto.polykey.v1.notifications.Notification.prototype.setGestaltInvite = function(value) { + return jspb.Message.setOneofField(this, 2, proto.polykey.v1.notifications.Notification.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.polykey.v1.notifications.Notification} returns this + */ +proto.polykey.v1.notifications.Notification.prototype.clearGestaltInvite = function() { + return jspb.Message.setOneofField(this, 2, proto.polykey.v1.notifications.Notification.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.notifications.Notification.prototype.hasGestaltInvite = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Share vault_share = 3; + * @return {?proto.polykey.v1.notifications.Share} + */ +proto.polykey.v1.notifications.Notification.prototype.getVaultShare = function() { + return /** @type{?proto.polykey.v1.notifications.Share} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.notifications.Share, 3)); +}; + + +/** + * @param {?proto.polykey.v1.notifications.Share|undefined} value + * @return {!proto.polykey.v1.notifications.Notification} returns this +*/ +proto.polykey.v1.notifications.Notification.prototype.setVaultShare = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.polykey.v1.notifications.Notification.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.notifications.Notification} returns this + */ +proto.polykey.v1.notifications.Notification.prototype.clearVaultShare = function() { + return this.setVaultShare(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.notifications.Notification.prototype.hasVaultShare = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string sender_id = 4; + * @return {string} + */ +proto.polykey.v1.notifications.Notification.prototype.getSenderId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.notifications.Notification} returns this + */ +proto.polykey.v1.notifications.Notification.prototype.setSenderId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool is_read = 5; + * @return {boolean} + */ +proto.polykey.v1.notifications.Notification.prototype.getIsRead = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.polykey.v1.notifications.Notification} returns this + */ +proto.polykey.v1.notifications.Notification.prototype.setIsRead = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, 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.polykey.v1.notifications.Send.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.notifications.Send.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.polykey.v1.notifications.Send} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.Send.toObject = function(includeInstance, msg) { + var f, obj = { + receiverId: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: (f = msg.getData()) && proto.polykey.v1.notifications.General.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.polykey.v1.notifications.Send} + */ +proto.polykey.v1.notifications.Send.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.notifications.Send; + return proto.polykey.v1.notifications.Send.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.notifications.Send} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.notifications.Send} + */ +proto.polykey.v1.notifications.Send.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.setReceiverId(value); + break; + case 2: + var value = new proto.polykey.v1.notifications.General; + reader.readMessage(value,proto.polykey.v1.notifications.General.deserializeBinaryFromReader); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.notifications.Send.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.notifications.Send.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.notifications.Send} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.Send.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReceiverId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.polykey.v1.notifications.General.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string receiver_id = 1; + * @return {string} + */ +proto.polykey.v1.notifications.Send.prototype.getReceiverId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.notifications.Send} returns this + */ +proto.polykey.v1.notifications.Send.prototype.setReceiverId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional General data = 2; + * @return {?proto.polykey.v1.notifications.General} + */ +proto.polykey.v1.notifications.Send.prototype.getData = function() { + return /** @type{?proto.polykey.v1.notifications.General} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.notifications.General, 2)); +}; + + +/** + * @param {?proto.polykey.v1.notifications.General|undefined} value + * @return {!proto.polykey.v1.notifications.Send} returns this +*/ +proto.polykey.v1.notifications.Send.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.notifications.Send} returns this + */ +proto.polykey.v1.notifications.Send.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.notifications.Send.prototype.hasData = function() { + return jspb.Message.getField(this, 2) != 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.polykey.v1.notifications.Read.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.notifications.Read.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.polykey.v1.notifications.Read} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.Read.toObject = function(includeInstance, msg) { + var f, obj = { + unread: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + number: jspb.Message.getFieldWithDefault(msg, 2, ""), + order: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.notifications.Read} + */ +proto.polykey.v1.notifications.Read.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.notifications.Read; + return proto.polykey.v1.notifications.Read.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.notifications.Read} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.notifications.Read} + */ +proto.polykey.v1.notifications.Read.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUnread(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNumber(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOrder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.notifications.Read.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.notifications.Read.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.notifications.Read} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.Read.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUnread(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getNumber(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOrder(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bool unread = 1; + * @return {boolean} + */ +proto.polykey.v1.notifications.Read.prototype.getUnread = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.polykey.v1.notifications.Read} returns this + */ +proto.polykey.v1.notifications.Read.prototype.setUnread = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional string number = 2; + * @return {string} + */ +proto.polykey.v1.notifications.Read.prototype.getNumber = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.notifications.Read} returns this + */ +proto.polykey.v1.notifications.Read.prototype.setNumber = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string order = 3; + * @return {string} + */ +proto.polykey.v1.notifications.Read.prototype.getOrder = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.notifications.Read} returns this + */ +proto.polykey.v1.notifications.Read.prototype.setOrder = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.polykey.v1.notifications.List.repeatedFields_ = [1]; + + + +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.polykey.v1.notifications.List.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.notifications.List.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.polykey.v1.notifications.List} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.List.toObject = function(includeInstance, msg) { + var f, obj = { + notificationList: jspb.Message.toObjectList(msg.getNotificationList(), + proto.polykey.v1.notifications.Notification.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.notifications.List} + */ +proto.polykey.v1.notifications.List.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.notifications.List; + return proto.polykey.v1.notifications.List.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.notifications.List} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.notifications.List} + */ +proto.polykey.v1.notifications.List.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.polykey.v1.notifications.Notification; + reader.readMessage(value,proto.polykey.v1.notifications.Notification.deserializeBinaryFromReader); + msg.addNotification(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.notifications.List.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.notifications.List.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.notifications.List} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.List.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNotificationList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.polykey.v1.notifications.Notification.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Notification notification = 1; + * @return {!Array} + */ +proto.polykey.v1.notifications.List.prototype.getNotificationList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.polykey.v1.notifications.Notification, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.polykey.v1.notifications.List} returns this +*/ +proto.polykey.v1.notifications.List.prototype.setNotificationList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.polykey.v1.notifications.Notification=} opt_value + * @param {number=} opt_index + * @return {!proto.polykey.v1.notifications.Notification} + */ +proto.polykey.v1.notifications.List.prototype.addNotification = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.polykey.v1.notifications.Notification, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.polykey.v1.notifications.List} returns this + */ +proto.polykey.v1.notifications.List.prototype.clearNotificationList = function() { + return this.setNotificationList([]); +}; + + + + + +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.polykey.v1.notifications.General.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.notifications.General.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.polykey.v1.notifications.General} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.General.toObject = function(includeInstance, msg) { + var f, obj = { + message: 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.polykey.v1.notifications.General} + */ +proto.polykey.v1.notifications.General.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.notifications.General; + return proto.polykey.v1.notifications.General.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.notifications.General} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.notifications.General} + */ +proto.polykey.v1.notifications.General.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.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.notifications.General.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.notifications.General.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.notifications.General} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.General.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.polykey.v1.notifications.General.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.notifications.General} returns this + */ +proto.polykey.v1.notifications.General.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.polykey.v1.notifications.Share.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.polykey.v1.notifications.Share.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.notifications.Share.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.polykey.v1.notifications.Share} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.Share.toObject = function(includeInstance, msg) { + var f, obj = { + vaultId: jspb.Message.getFieldWithDefault(msg, 1, ""), + vaultName: jspb.Message.getFieldWithDefault(msg, 2, ""), + actionsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : 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.polykey.v1.notifications.Share} + */ +proto.polykey.v1.notifications.Share.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.notifications.Share; + return proto.polykey.v1.notifications.Share.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.notifications.Share} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.notifications.Share} + */ +proto.polykey.v1.notifications.Share.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.setVaultId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVaultName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addActions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.notifications.Share.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.notifications.Share.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.notifications.Share} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.Share.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVaultId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVaultName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getActionsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * optional string vault_id = 1; + * @return {string} + */ +proto.polykey.v1.notifications.Share.prototype.getVaultId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.notifications.Share} returns this + */ +proto.polykey.v1.notifications.Share.prototype.setVaultId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string vault_name = 2; + * @return {string} + */ +proto.polykey.v1.notifications.Share.prototype.getVaultName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.notifications.Share} returns this + */ +proto.polykey.v1.notifications.Share.prototype.setVaultName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string actions = 3; + * @return {!Array} + */ +proto.polykey.v1.notifications.Share.prototype.getActionsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.polykey.v1.notifications.Share} returns this + */ +proto.polykey.v1.notifications.Share.prototype.setActionsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.polykey.v1.notifications.Share} returns this + */ +proto.polykey.v1.notifications.Share.prototype.addActions = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.polykey.v1.notifications.Share} returns this + */ +proto.polykey.v1.notifications.Share.prototype.clearActionsList = function() { + return this.setActionsList([]); +}; + + + + + +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.polykey.v1.notifications.AgentNotification.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.notifications.AgentNotification.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.polykey.v1.notifications.AgentNotification} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.AgentNotification.toObject = function(includeInstance, msg) { + var f, obj = { + content: 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.polykey.v1.notifications.AgentNotification} + */ +proto.polykey.v1.notifications.AgentNotification.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.notifications.AgentNotification; + return proto.polykey.v1.notifications.AgentNotification.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.notifications.AgentNotification} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.notifications.AgentNotification} + */ +proto.polykey.v1.notifications.AgentNotification.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.setContent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.notifications.AgentNotification.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.notifications.AgentNotification.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.notifications.AgentNotification} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.notifications.AgentNotification.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContent(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string content = 1; + * @return {string} + */ +proto.polykey.v1.notifications.AgentNotification.prototype.getContent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.notifications.AgentNotification} returns this + */ +proto.polykey.v1.notifications.AgentNotification.prototype.setContent = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.polykey.v1.notifications); diff --git a/src/proto/js/polykey/v1/permissions/permissions_grpc_pb.js b/src/proto/js/polykey/v1/permissions/permissions_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/polykey/v1/permissions/permissions_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/polykey/v1/permissions/permissions_pb.d.ts b/src/proto/js/polykey/v1/permissions/permissions_pb.d.ts new file mode 100644 index 000000000..e4f06b338 --- /dev/null +++ b/src/proto/js/polykey/v1/permissions/permissions_pb.d.ts @@ -0,0 +1,72 @@ +// package: polykey.v1.permissions +// file: polykey/v1/permissions/permissions.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as polykey_v1_nodes_nodes_pb from "../../../polykey/v1/nodes/nodes_pb"; +import * as polykey_v1_identities_identities_pb from "../../../polykey/v1/identities/identities_pb"; + +export class Actions extends jspb.Message { + clearActionList(): void; + getActionList(): Array; + setActionList(value: Array): Actions; + addAction(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Actions.AsObject; + static toObject(includeInstance: boolean, msg: Actions): Actions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Actions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Actions; + static deserializeBinaryFromReader(message: Actions, reader: jspb.BinaryReader): Actions; +} + +export namespace Actions { + export type AsObject = { + actionList: Array, + } +} + +export class ActionSet extends jspb.Message { + + hasNode(): boolean; + clearNode(): void; + getNode(): polykey_v1_nodes_nodes_pb.Node | undefined; + setNode(value?: polykey_v1_nodes_nodes_pb.Node): ActionSet; + + hasIdentity(): boolean; + clearIdentity(): void; + getIdentity(): polykey_v1_identities_identities_pb.Provider | undefined; + setIdentity(value?: polykey_v1_identities_identities_pb.Provider): ActionSet; + getAction(): string; + setAction(value: string): ActionSet; + + getNodeOrProviderCase(): ActionSet.NodeOrProviderCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ActionSet.AsObject; + static toObject(includeInstance: boolean, msg: ActionSet): ActionSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ActionSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ActionSet; + static deserializeBinaryFromReader(message: ActionSet, reader: jspb.BinaryReader): ActionSet; +} + +export namespace ActionSet { + export type AsObject = { + node?: polykey_v1_nodes_nodes_pb.Node.AsObject, + identity?: polykey_v1_identities_identities_pb.Provider.AsObject, + action: string, + } + + export enum NodeOrProviderCase { + NODE_OR_PROVIDER_NOT_SET = 0, + NODE = 1, + IDENTITY = 2, + } + +} diff --git a/src/proto/js/polykey/v1/permissions/permissions_pb.js b/src/proto/js/polykey/v1/permissions/permissions_pb.js new file mode 100644 index 000000000..29dd4ba20 --- /dev/null +++ b/src/proto/js/polykey/v1/permissions/permissions_pb.js @@ -0,0 +1,480 @@ +// source: polykey/v1/permissions/permissions.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var polykey_v1_nodes_nodes_pb = require('../../../polykey/v1/nodes/nodes_pb.js'); +goog.object.extend(proto, polykey_v1_nodes_nodes_pb); +var polykey_v1_identities_identities_pb = require('../../../polykey/v1/identities/identities_pb.js'); +goog.object.extend(proto, polykey_v1_identities_identities_pb); +goog.exportSymbol('proto.polykey.v1.permissions.ActionSet', null, global); +goog.exportSymbol('proto.polykey.v1.permissions.ActionSet.NodeOrProviderCase', null, global); +goog.exportSymbol('proto.polykey.v1.permissions.Actions', null, global); +/** + * 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.polykey.v1.permissions.Actions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.polykey.v1.permissions.Actions.repeatedFields_, null); +}; +goog.inherits(proto.polykey.v1.permissions.Actions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.permissions.Actions.displayName = 'proto.polykey.v1.permissions.Actions'; +} +/** + * 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.polykey.v1.permissions.ActionSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.polykey.v1.permissions.ActionSet.oneofGroups_); +}; +goog.inherits(proto.polykey.v1.permissions.ActionSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.permissions.ActionSet.displayName = 'proto.polykey.v1.permissions.ActionSet'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.polykey.v1.permissions.Actions.repeatedFields_ = [1]; + + + +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.polykey.v1.permissions.Actions.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.permissions.Actions.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.polykey.v1.permissions.Actions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.permissions.Actions.toObject = function(includeInstance, msg) { + var f, obj = { + actionList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.polykey.v1.permissions.Actions} + */ +proto.polykey.v1.permissions.Actions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.permissions.Actions; + return proto.polykey.v1.permissions.Actions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.permissions.Actions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.permissions.Actions} + */ +proto.polykey.v1.permissions.Actions.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.addAction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.permissions.Actions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.permissions.Actions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.permissions.Actions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.permissions.Actions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getActionList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string action = 1; + * @return {!Array} + */ +proto.polykey.v1.permissions.Actions.prototype.getActionList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.polykey.v1.permissions.Actions} returns this + */ +proto.polykey.v1.permissions.Actions.prototype.setActionList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.polykey.v1.permissions.Actions} returns this + */ +proto.polykey.v1.permissions.Actions.prototype.addAction = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.polykey.v1.permissions.Actions} returns this + */ +proto.polykey.v1.permissions.Actions.prototype.clearActionList = function() { + return this.setActionList([]); +}; + + + +/** + * 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.polykey.v1.permissions.ActionSet.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.polykey.v1.permissions.ActionSet.NodeOrProviderCase = { + NODE_OR_PROVIDER_NOT_SET: 0, + NODE: 1, + IDENTITY: 2 +}; + +/** + * @return {proto.polykey.v1.permissions.ActionSet.NodeOrProviderCase} + */ +proto.polykey.v1.permissions.ActionSet.prototype.getNodeOrProviderCase = function() { + return /** @type {proto.polykey.v1.permissions.ActionSet.NodeOrProviderCase} */(jspb.Message.computeOneofCase(this, proto.polykey.v1.permissions.ActionSet.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.polykey.v1.permissions.ActionSet.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.permissions.ActionSet.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.polykey.v1.permissions.ActionSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.permissions.ActionSet.toObject = function(includeInstance, msg) { + var f, obj = { + node: (f = msg.getNode()) && polykey_v1_nodes_nodes_pb.Node.toObject(includeInstance, f), + identity: (f = msg.getIdentity()) && polykey_v1_identities_identities_pb.Provider.toObject(includeInstance, f), + action: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.permissions.ActionSet} + */ +proto.polykey.v1.permissions.ActionSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.permissions.ActionSet; + return proto.polykey.v1.permissions.ActionSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.permissions.ActionSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.permissions.ActionSet} + */ +proto.polykey.v1.permissions.ActionSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new polykey_v1_nodes_nodes_pb.Node; + reader.readMessage(value,polykey_v1_nodes_nodes_pb.Node.deserializeBinaryFromReader); + msg.setNode(value); + break; + case 2: + var value = new polykey_v1_identities_identities_pb.Provider; + reader.readMessage(value,polykey_v1_identities_identities_pb.Provider.deserializeBinaryFromReader); + msg.setIdentity(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.permissions.ActionSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.permissions.ActionSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.permissions.ActionSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.permissions.ActionSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNode(); + if (f != null) { + writer.writeMessage( + 1, + f, + polykey_v1_nodes_nodes_pb.Node.serializeBinaryToWriter + ); + } + f = message.getIdentity(); + if (f != null) { + writer.writeMessage( + 2, + f, + polykey_v1_identities_identities_pb.Provider.serializeBinaryToWriter + ); + } + f = message.getAction(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional polykey.v1.nodes.Node node = 1; + * @return {?proto.polykey.v1.nodes.Node} + */ +proto.polykey.v1.permissions.ActionSet.prototype.getNode = function() { + return /** @type{?proto.polykey.v1.nodes.Node} */ ( + jspb.Message.getWrapperField(this, polykey_v1_nodes_nodes_pb.Node, 1)); +}; + + +/** + * @param {?proto.polykey.v1.nodes.Node|undefined} value + * @return {!proto.polykey.v1.permissions.ActionSet} returns this +*/ +proto.polykey.v1.permissions.ActionSet.prototype.setNode = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.polykey.v1.permissions.ActionSet.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.permissions.ActionSet} returns this + */ +proto.polykey.v1.permissions.ActionSet.prototype.clearNode = function() { + return this.setNode(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.permissions.ActionSet.prototype.hasNode = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional polykey.v1.identities.Provider identity = 2; + * @return {?proto.polykey.v1.identities.Provider} + */ +proto.polykey.v1.permissions.ActionSet.prototype.getIdentity = function() { + return /** @type{?proto.polykey.v1.identities.Provider} */ ( + jspb.Message.getWrapperField(this, polykey_v1_identities_identities_pb.Provider, 2)); +}; + + +/** + * @param {?proto.polykey.v1.identities.Provider|undefined} value + * @return {!proto.polykey.v1.permissions.ActionSet} returns this +*/ +proto.polykey.v1.permissions.ActionSet.prototype.setIdentity = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.polykey.v1.permissions.ActionSet.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.permissions.ActionSet} returns this + */ +proto.polykey.v1.permissions.ActionSet.prototype.clearIdentity = function() { + return this.setIdentity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.permissions.ActionSet.prototype.hasIdentity = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string action = 3; + * @return {string} + */ +proto.polykey.v1.permissions.ActionSet.prototype.getAction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.permissions.ActionSet} returns this + */ +proto.polykey.v1.permissions.ActionSet.prototype.setAction = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.polykey.v1.permissions); diff --git a/src/proto/js/polykey/v1/secrets/secrets_grpc_pb.js b/src/proto/js/polykey/v1/secrets/secrets_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/polykey/v1/secrets/secrets_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/polykey/v1/secrets/secrets_pb.d.ts b/src/proto/js/polykey/v1/secrets/secrets_pb.d.ts new file mode 100644 index 000000000..4fb4ca872 --- /dev/null +++ b/src/proto/js/polykey/v1/secrets/secrets_pb.d.ts @@ -0,0 +1,91 @@ +// package: polykey.v1.secrets +// file: polykey/v1/secrets/secrets.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as polykey_v1_vaults_vaults_pb from "../../../polykey/v1/vaults/vaults_pb"; + +export class Rename extends jspb.Message { + + hasOldSecret(): boolean; + clearOldSecret(): void; + getOldSecret(): Secret | undefined; + setOldSecret(value?: Secret): Rename; + getNewName(): string; + setNewName(value: string): Rename; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Rename.AsObject; + static toObject(includeInstance: boolean, msg: Rename): Rename.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Rename, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Rename; + static deserializeBinaryFromReader(message: Rename, reader: jspb.BinaryReader): Rename; +} + +export namespace Rename { + export type AsObject = { + oldSecret?: Secret.AsObject, + newName: string, + } +} + +export class Secret extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): polykey_v1_vaults_vaults_pb.Vault | undefined; + setVault(value?: polykey_v1_vaults_vaults_pb.Vault): Secret; + getSecretName(): string; + setSecretName(value: string): Secret; + getSecretContent(): Uint8Array | string; + getSecretContent_asU8(): Uint8Array; + getSecretContent_asB64(): string; + setSecretContent(value: Uint8Array | string): Secret; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Secret.AsObject; + static toObject(includeInstance: boolean, msg: Secret): Secret.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Secret, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Secret; + static deserializeBinaryFromReader(message: Secret, reader: jspb.BinaryReader): Secret; +} + +export namespace Secret { + export type AsObject = { + vault?: polykey_v1_vaults_vaults_pb.Vault.AsObject, + secretName: string, + secretContent: Uint8Array | string, + } +} + +export class Directory extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): polykey_v1_vaults_vaults_pb.Vault | undefined; + setVault(value?: polykey_v1_vaults_vaults_pb.Vault): Directory; + getSecretDirectory(): string; + setSecretDirectory(value: string): Directory; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Directory.AsObject; + static toObject(includeInstance: boolean, msg: Directory): Directory.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Directory, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Directory; + static deserializeBinaryFromReader(message: Directory, reader: jspb.BinaryReader): Directory; +} + +export namespace Directory { + export type AsObject = { + vault?: polykey_v1_vaults_vaults_pb.Vault.AsObject, + secretDirectory: string, + } +} diff --git a/src/proto/js/polykey/v1/secrets/secrets_pb.js b/src/proto/js/polykey/v1/secrets/secrets_pb.js new file mode 100644 index 000000000..58fec23fc --- /dev/null +++ b/src/proto/js/polykey/v1/secrets/secrets_pb.js @@ -0,0 +1,682 @@ +// source: polykey/v1/secrets/secrets.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var polykey_v1_vaults_vaults_pb = require('../../../polykey/v1/vaults/vaults_pb.js'); +goog.object.extend(proto, polykey_v1_vaults_vaults_pb); +goog.exportSymbol('proto.polykey.v1.secrets.Directory', null, global); +goog.exportSymbol('proto.polykey.v1.secrets.Rename', null, global); +goog.exportSymbol('proto.polykey.v1.secrets.Secret', null, global); +/** + * 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.polykey.v1.secrets.Rename = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.secrets.Rename, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.secrets.Rename.displayName = 'proto.polykey.v1.secrets.Rename'; +} +/** + * 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.polykey.v1.secrets.Secret = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.secrets.Secret, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.secrets.Secret.displayName = 'proto.polykey.v1.secrets.Secret'; +} +/** + * 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.polykey.v1.secrets.Directory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.secrets.Directory, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.secrets.Directory.displayName = 'proto.polykey.v1.secrets.Directory'; +} + + + +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.polykey.v1.secrets.Rename.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.secrets.Rename.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.polykey.v1.secrets.Rename} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.secrets.Rename.toObject = function(includeInstance, msg) { + var f, obj = { + oldSecret: (f = msg.getOldSecret()) && proto.polykey.v1.secrets.Secret.toObject(includeInstance, f), + newName: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.secrets.Rename} + */ +proto.polykey.v1.secrets.Rename.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.secrets.Rename; + return proto.polykey.v1.secrets.Rename.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.secrets.Rename} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.secrets.Rename} + */ +proto.polykey.v1.secrets.Rename.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.polykey.v1.secrets.Secret; + reader.readMessage(value,proto.polykey.v1.secrets.Secret.deserializeBinaryFromReader); + msg.setOldSecret(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNewName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.secrets.Rename.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.secrets.Rename.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.secrets.Rename} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.secrets.Rename.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOldSecret(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.polykey.v1.secrets.Secret.serializeBinaryToWriter + ); + } + f = message.getNewName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Secret old_secret = 1; + * @return {?proto.polykey.v1.secrets.Secret} + */ +proto.polykey.v1.secrets.Rename.prototype.getOldSecret = function() { + return /** @type{?proto.polykey.v1.secrets.Secret} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.secrets.Secret, 1)); +}; + + +/** + * @param {?proto.polykey.v1.secrets.Secret|undefined} value + * @return {!proto.polykey.v1.secrets.Rename} returns this +*/ +proto.polykey.v1.secrets.Rename.prototype.setOldSecret = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.secrets.Rename} returns this + */ +proto.polykey.v1.secrets.Rename.prototype.clearOldSecret = function() { + return this.setOldSecret(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.secrets.Rename.prototype.hasOldSecret = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string new_name = 2; + * @return {string} + */ +proto.polykey.v1.secrets.Rename.prototype.getNewName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.secrets.Rename} returns this + */ +proto.polykey.v1.secrets.Rename.prototype.setNewName = function(value) { + return jspb.Message.setProto3StringField(this, 2, 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.polykey.v1.secrets.Secret.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.secrets.Secret.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.polykey.v1.secrets.Secret} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.secrets.Secret.toObject = function(includeInstance, msg) { + var f, obj = { + vault: (f = msg.getVault()) && polykey_v1_vaults_vaults_pb.Vault.toObject(includeInstance, f), + secretName: jspb.Message.getFieldWithDefault(msg, 2, ""), + secretContent: msg.getSecretContent_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.secrets.Secret} + */ +proto.polykey.v1.secrets.Secret.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.secrets.Secret; + return proto.polykey.v1.secrets.Secret.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.secrets.Secret} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.secrets.Secret} + */ +proto.polykey.v1.secrets.Secret.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new polykey_v1_vaults_vaults_pb.Vault; + reader.readMessage(value,polykey_v1_vaults_vaults_pb.Vault.deserializeBinaryFromReader); + msg.setVault(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecretName(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSecretContent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.secrets.Secret.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.secrets.Secret.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.secrets.Secret} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.secrets.Secret.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVault(); + if (f != null) { + writer.writeMessage( + 1, + f, + polykey_v1_vaults_vaults_pb.Vault.serializeBinaryToWriter + ); + } + f = message.getSecretName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSecretContent_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional polykey.v1.vaults.Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} + */ +proto.polykey.v1.secrets.Secret.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, polykey_v1_vaults_vaults_pb.Vault, 1)); +}; + + +/** + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.secrets.Secret} returns this +*/ +proto.polykey.v1.secrets.Secret.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.secrets.Secret} returns this + */ +proto.polykey.v1.secrets.Secret.prototype.clearVault = function() { + return this.setVault(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.secrets.Secret.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string secret_name = 2; + * @return {string} + */ +proto.polykey.v1.secrets.Secret.prototype.getSecretName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.secrets.Secret} returns this + */ +proto.polykey.v1.secrets.Secret.prototype.setSecretName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes secret_content = 3; + * @return {!(string|Uint8Array)} + */ +proto.polykey.v1.secrets.Secret.prototype.getSecretContent = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes secret_content = 3; + * This is a type-conversion wrapper around `getSecretContent()` + * @return {string} + */ +proto.polykey.v1.secrets.Secret.prototype.getSecretContent_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSecretContent())); +}; + + +/** + * optional bytes secret_content = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSecretContent()` + * @return {!Uint8Array} + */ +proto.polykey.v1.secrets.Secret.prototype.getSecretContent_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSecretContent())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.polykey.v1.secrets.Secret} returns this + */ +proto.polykey.v1.secrets.Secret.prototype.setSecretContent = function(value) { + return jspb.Message.setProto3BytesField(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.polykey.v1.secrets.Directory.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.secrets.Directory.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.polykey.v1.secrets.Directory} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.secrets.Directory.toObject = function(includeInstance, msg) { + var f, obj = { + vault: (f = msg.getVault()) && polykey_v1_vaults_vaults_pb.Vault.toObject(includeInstance, f), + secretDirectory: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.secrets.Directory} + */ +proto.polykey.v1.secrets.Directory.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.secrets.Directory; + return proto.polykey.v1.secrets.Directory.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.secrets.Directory} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.secrets.Directory} + */ +proto.polykey.v1.secrets.Directory.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new polykey_v1_vaults_vaults_pb.Vault; + reader.readMessage(value,polykey_v1_vaults_vaults_pb.Vault.deserializeBinaryFromReader); + msg.setVault(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecretDirectory(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.secrets.Directory.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.secrets.Directory.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.secrets.Directory} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.secrets.Directory.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVault(); + if (f != null) { + writer.writeMessage( + 1, + f, + polykey_v1_vaults_vaults_pb.Vault.serializeBinaryToWriter + ); + } + f = message.getSecretDirectory(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional polykey.v1.vaults.Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} + */ +proto.polykey.v1.secrets.Directory.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, polykey_v1_vaults_vaults_pb.Vault, 1)); +}; + + +/** + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.secrets.Directory} returns this +*/ +proto.polykey.v1.secrets.Directory.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.secrets.Directory} returns this + */ +proto.polykey.v1.secrets.Directory.prototype.clearVault = function() { + return this.setVault(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.secrets.Directory.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string secret_directory = 2; + * @return {string} + */ +proto.polykey.v1.secrets.Directory.prototype.getSecretDirectory = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.secrets.Directory} returns this + */ +proto.polykey.v1.secrets.Directory.prototype.setSecretDirectory = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.polykey.v1.secrets); diff --git a/src/proto/js/polykey/v1/sessions/sessions_grpc_pb.js b/src/proto/js/polykey/v1/sessions/sessions_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/polykey/v1/sessions/sessions_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/polykey/v1/sessions/sessions_pb.d.ts b/src/proto/js/polykey/v1/sessions/sessions_pb.d.ts new file mode 100644 index 000000000..426715b31 --- /dev/null +++ b/src/proto/js/polykey/v1/sessions/sessions_pb.d.ts @@ -0,0 +1,65 @@ +// package: polykey.v1.sessions +// file: polykey/v1/sessions/sessions.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Password extends jspb.Message { + + hasPassword(): boolean; + clearPassword(): void; + getPassword(): string; + setPassword(value: string): Password; + + hasPasswordFile(): boolean; + clearPasswordFile(): void; + getPasswordFile(): string; + setPasswordFile(value: string): Password; + + getPasswordOrFileCase(): Password.PasswordOrFileCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Password.AsObject; + static toObject(includeInstance: boolean, msg: Password): Password.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Password, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Password; + static deserializeBinaryFromReader(message: Password, reader: jspb.BinaryReader): Password; +} + +export namespace Password { + export type AsObject = { + password: string, + passwordFile: string, + } + + export enum PasswordOrFileCase { + PASSWORD_OR_FILE_NOT_SET = 0, + PASSWORD = 1, + PASSWORD_FILE = 2, + } + +} + +export class Token extends jspb.Message { + getToken(): string; + setToken(value: string): Token; + + 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 = { + token: string, + } +} diff --git a/src/proto/js/polykey/v1/sessions/sessions_pb.js b/src/proto/js/polykey/v1/sessions/sessions_pb.js new file mode 100644 index 000000000..fe399c6f5 --- /dev/null +++ b/src/proto/js/polykey/v1/sessions/sessions_pb.js @@ -0,0 +1,414 @@ +// source: polykey/v1/sessions/sessions.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.polykey.v1.sessions.Password', null, global); +goog.exportSymbol('proto.polykey.v1.sessions.Password.PasswordOrFileCase', null, global); +goog.exportSymbol('proto.polykey.v1.sessions.Token', null, global); +/** + * 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.polykey.v1.sessions.Password = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.polykey.v1.sessions.Password.oneofGroups_); +}; +goog.inherits(proto.polykey.v1.sessions.Password, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.sessions.Password.displayName = 'proto.polykey.v1.sessions.Password'; +} +/** + * 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.polykey.v1.sessions.Token = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.sessions.Token, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.sessions.Token.displayName = 'proto.polykey.v1.sessions.Token'; +} + +/** + * 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.polykey.v1.sessions.Password.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.polykey.v1.sessions.Password.PasswordOrFileCase = { + PASSWORD_OR_FILE_NOT_SET: 0, + PASSWORD: 1, + PASSWORD_FILE: 2 +}; + +/** + * @return {proto.polykey.v1.sessions.Password.PasswordOrFileCase} + */ +proto.polykey.v1.sessions.Password.prototype.getPasswordOrFileCase = function() { + return /** @type {proto.polykey.v1.sessions.Password.PasswordOrFileCase} */(jspb.Message.computeOneofCase(this, proto.polykey.v1.sessions.Password.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.polykey.v1.sessions.Password.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.sessions.Password.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.polykey.v1.sessions.Password} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.sessions.Password.toObject = function(includeInstance, msg) { + var f, obj = { + password: jspb.Message.getFieldWithDefault(msg, 1, ""), + passwordFile: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.sessions.Password} + */ +proto.polykey.v1.sessions.Password.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.sessions.Password; + return proto.polykey.v1.sessions.Password.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.sessions.Password} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.sessions.Password} + */ +proto.polykey.v1.sessions.Password.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.setPassword(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPasswordFile(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.sessions.Password.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.sessions.Password.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.sessions.Password} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.sessions.Password.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string password = 1; + * @return {string} + */ +proto.polykey.v1.sessions.Password.prototype.getPassword = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.sessions.Password} returns this + */ +proto.polykey.v1.sessions.Password.prototype.setPassword = function(value) { + return jspb.Message.setOneofField(this, 1, proto.polykey.v1.sessions.Password.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.polykey.v1.sessions.Password} returns this + */ +proto.polykey.v1.sessions.Password.prototype.clearPassword = function() { + return jspb.Message.setOneofField(this, 1, proto.polykey.v1.sessions.Password.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.sessions.Password.prototype.hasPassword = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string password_file = 2; + * @return {string} + */ +proto.polykey.v1.sessions.Password.prototype.getPasswordFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.sessions.Password} returns this + */ +proto.polykey.v1.sessions.Password.prototype.setPasswordFile = function(value) { + return jspb.Message.setOneofField(this, 2, proto.polykey.v1.sessions.Password.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.polykey.v1.sessions.Password} returns this + */ +proto.polykey.v1.sessions.Password.prototype.clearPasswordFile = function() { + return jspb.Message.setOneofField(this, 2, proto.polykey.v1.sessions.Password.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.sessions.Password.prototype.hasPasswordFile = function() { + return jspb.Message.getField(this, 2) != 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.polykey.v1.sessions.Token.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.sessions.Token.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.polykey.v1.sessions.Token} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.sessions.Token.toObject = function(includeInstance, msg) { + var f, obj = { + token: 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.polykey.v1.sessions.Token} + */ +proto.polykey.v1.sessions.Token.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.sessions.Token; + return proto.polykey.v1.sessions.Token.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.sessions.Token} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.sessions.Token} + */ +proto.polykey.v1.sessions.Token.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.setToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.sessions.Token.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.sessions.Token.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.sessions.Token} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.sessions.Token.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getToken(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string token = 1; + * @return {string} + */ +proto.polykey.v1.sessions.Token.prototype.getToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.sessions.Token} returns this + */ +proto.polykey.v1.sessions.Token.prototype.setToken = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.polykey.v1.sessions); diff --git a/src/proto/js/polykey/v1/test_service_grpc_pb.d.ts b/src/proto/js/polykey/v1/test_service_grpc_pb.d.ts new file mode 100644 index 000000000..a80406b5e --- /dev/null +++ b/src/proto/js/polykey/v1/test_service_grpc_pb.d.ts @@ -0,0 +1,92 @@ +// package: polykey.v1 +// file: polykey/v1/test_service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import * as polykey_v1_test_service_pb from "../../polykey/v1/test_service_pb"; +import * as polykey_v1_utils_utils_pb from "../../polykey/v1/utils/utils_pb"; + +interface ITestServiceService extends grpc.ServiceDefinition { + unary: ITestServiceService_IUnary; + serverStream: ITestServiceService_IServerStream; + clientStream: ITestServiceService_IClientStream; + duplexStream: ITestServiceService_IDuplexStream; +} + +interface ITestServiceService_IUnary extends grpc.MethodDefinition { + path: "/polykey.v1.TestService/Unary"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITestServiceService_IServerStream extends grpc.MethodDefinition { + path: "/polykey.v1.TestService/ServerStream"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITestServiceService_IClientStream extends grpc.MethodDefinition { + path: "/polykey.v1.TestService/ClientStream"; + requestStream: true; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITestServiceService_IDuplexStream extends grpc.MethodDefinition { + path: "/polykey.v1.TestService/DuplexStream"; + requestStream: true; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const TestServiceService: ITestServiceService; + +export interface ITestServiceServer extends grpc.UntypedServiceImplementation { + unary: grpc.handleUnaryCall; + serverStream: grpc.handleServerStreamingCall; + clientStream: grpc.handleClientStreamingCall; + duplexStream: grpc.handleBidiStreamingCall; +} + +export interface ITestServiceClient { + unary(request: polykey_v1_utils_utils_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + unary(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + unary(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + serverStream(request: polykey_v1_utils_utils_pb.EchoMessage, options?: Partial): grpc.ClientReadableStream; + serverStream(request: polykey_v1_utils_utils_pb.EchoMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + clientStream(callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientWritableStream; + clientStream(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientWritableStream; + clientStream(options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientWritableStream; + clientStream(metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientWritableStream; + duplexStream(): grpc.ClientDuplexStream; + duplexStream(options: Partial): grpc.ClientDuplexStream; + duplexStream(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; +} + +export class TestServiceClient extends grpc.Client implements ITestServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public unary(request: polykey_v1_utils_utils_pb.EchoMessage, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + public unary(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + public unary(request: polykey_v1_utils_utils_pb.EchoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientUnaryCall; + public serverStream(request: polykey_v1_utils_utils_pb.EchoMessage, options?: Partial): grpc.ClientReadableStream; + public serverStream(request: polykey_v1_utils_utils_pb.EchoMessage, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public clientStream(callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientWritableStream; + public clientStream(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientWritableStream; + public clientStream(options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientWritableStream; + public clientStream(metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: polykey_v1_utils_utils_pb.EchoMessage) => void): grpc.ClientWritableStream; + public duplexStream(options?: Partial): grpc.ClientDuplexStream; + public duplexStream(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; +} diff --git a/src/proto/js/polykey/v1/test_service_grpc_pb.js b/src/proto/js/polykey/v1/test_service_grpc_pb.js new file mode 100644 index 000000000..e486305cc --- /dev/null +++ b/src/proto/js/polykey/v1/test_service_grpc_pb.js @@ -0,0 +1,66 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var polykey_v1_utils_utils_pb = require('../../polykey/v1/utils/utils_pb.js'); + +function serialize_polykey_v1_utils_EchoMessage(arg) { + if (!(arg instanceof polykey_v1_utils_utils_pb.EchoMessage)) { + throw new Error('Expected argument of type polykey.v1.utils.EchoMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_polykey_v1_utils_EchoMessage(buffer_arg) { + return polykey_v1_utils_utils_pb.EchoMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var TestServiceService = exports.TestServiceService = { + unary: { + path: '/polykey.v1.TestService/Unary', + requestStream: false, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EchoMessage, + responseType: polykey_v1_utils_utils_pb.EchoMessage, + requestSerialize: serialize_polykey_v1_utils_EchoMessage, + requestDeserialize: deserialize_polykey_v1_utils_EchoMessage, + responseSerialize: serialize_polykey_v1_utils_EchoMessage, + responseDeserialize: deserialize_polykey_v1_utils_EchoMessage, + }, + serverStream: { + path: '/polykey.v1.TestService/ServerStream', + requestStream: false, + responseStream: true, + requestType: polykey_v1_utils_utils_pb.EchoMessage, + responseType: polykey_v1_utils_utils_pb.EchoMessage, + requestSerialize: serialize_polykey_v1_utils_EchoMessage, + requestDeserialize: deserialize_polykey_v1_utils_EchoMessage, + responseSerialize: serialize_polykey_v1_utils_EchoMessage, + responseDeserialize: deserialize_polykey_v1_utils_EchoMessage, + }, + clientStream: { + path: '/polykey.v1.TestService/ClientStream', + requestStream: true, + responseStream: false, + requestType: polykey_v1_utils_utils_pb.EchoMessage, + responseType: polykey_v1_utils_utils_pb.EchoMessage, + requestSerialize: serialize_polykey_v1_utils_EchoMessage, + requestDeserialize: deserialize_polykey_v1_utils_EchoMessage, + responseSerialize: serialize_polykey_v1_utils_EchoMessage, + responseDeserialize: deserialize_polykey_v1_utils_EchoMessage, + }, + duplexStream: { + path: '/polykey.v1.TestService/DuplexStream', + requestStream: true, + responseStream: true, + requestType: polykey_v1_utils_utils_pb.EchoMessage, + responseType: polykey_v1_utils_utils_pb.EchoMessage, + requestSerialize: serialize_polykey_v1_utils_EchoMessage, + requestDeserialize: deserialize_polykey_v1_utils_EchoMessage, + responseSerialize: serialize_polykey_v1_utils_EchoMessage, + responseDeserialize: deserialize_polykey_v1_utils_EchoMessage, + }, +}; + +exports.TestServiceClient = grpc.makeGenericClientConstructor(TestServiceService); diff --git a/src/proto/js/polykey/v1/test_service_pb.d.ts b/src/proto/js/polykey/v1/test_service_pb.d.ts new file mode 100644 index 000000000..3694c5d72 --- /dev/null +++ b/src/proto/js/polykey/v1/test_service_pb.d.ts @@ -0,0 +1,8 @@ +// package: polykey.v1 +// file: polykey/v1/test_service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as polykey_v1_utils_utils_pb from "../../polykey/v1/utils/utils_pb"; diff --git a/src/proto/js/polykey/v1/test_service_pb.js b/src/proto/js/polykey/v1/test_service_pb.js new file mode 100644 index 000000000..f5ab8f2de --- /dev/null +++ b/src/proto/js/polykey/v1/test_service_pb.js @@ -0,0 +1,18 @@ +// source: polykey/v1/test_service.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var polykey_v1_utils_utils_pb = require('../../polykey/v1/utils/utils_pb.js'); +goog.object.extend(proto, polykey_v1_utils_utils_pb); diff --git a/src/proto/js/polykey/v1/utils/utils_grpc_pb.js b/src/proto/js/polykey/v1/utils/utils_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/polykey/v1/utils/utils_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/polykey/v1/utils/utils_pb.d.ts b/src/proto/js/polykey/v1/utils/utils_pb.d.ts new file mode 100644 index 000000000..b75fdb93b --- /dev/null +++ b/src/proto/js/polykey/v1/utils/utils_pb.d.ts @@ -0,0 +1,64 @@ +// package: polykey.v1.utils +// file: polykey/v1/utils/utils.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class EmptyMessage extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EmptyMessage.AsObject; + static toObject(includeInstance: boolean, msg: EmptyMessage): EmptyMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EmptyMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EmptyMessage; + static deserializeBinaryFromReader(message: EmptyMessage, reader: jspb.BinaryReader): EmptyMessage; +} + +export namespace EmptyMessage { + export type AsObject = { + } +} + +export class StatusMessage extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): StatusMessage; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StatusMessage.AsObject; + static toObject(includeInstance: boolean, msg: StatusMessage): StatusMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StatusMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StatusMessage; + static deserializeBinaryFromReader(message: StatusMessage, reader: jspb.BinaryReader): StatusMessage; +} + +export namespace StatusMessage { + export type AsObject = { + success: boolean, + } +} + +export class EchoMessage extends jspb.Message { + getChallenge(): string; + setChallenge(value: string): EchoMessage; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EchoMessage.AsObject; + static toObject(includeInstance: boolean, msg: EchoMessage): EchoMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EchoMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EchoMessage; + static deserializeBinaryFromReader(message: EchoMessage, reader: jspb.BinaryReader): EchoMessage; +} + +export namespace EchoMessage { + export type AsObject = { + challenge: string, + } +} diff --git a/src/proto/js/polykey/v1/utils/utils_pb.js b/src/proto/js/polykey/v1/utils/utils_pb.js new file mode 100644 index 000000000..852c0903d --- /dev/null +++ b/src/proto/js/polykey/v1/utils/utils_pb.js @@ -0,0 +1,444 @@ +// source: polykey/v1/utils/utils.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.polykey.v1.utils.EchoMessage', null, global); +goog.exportSymbol('proto.polykey.v1.utils.EmptyMessage', null, global); +goog.exportSymbol('proto.polykey.v1.utils.StatusMessage', null, global); +/** + * 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.polykey.v1.utils.EmptyMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.utils.EmptyMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.utils.EmptyMessage.displayName = 'proto.polykey.v1.utils.EmptyMessage'; +} +/** + * 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.polykey.v1.utils.StatusMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.utils.StatusMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.utils.StatusMessage.displayName = 'proto.polykey.v1.utils.StatusMessage'; +} +/** + * 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.polykey.v1.utils.EchoMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.polykey.v1.utils.EchoMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.polykey.v1.utils.EchoMessage.displayName = 'proto.polykey.v1.utils.EchoMessage'; +} + + + +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.polykey.v1.utils.EmptyMessage.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.utils.EmptyMessage.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.polykey.v1.utils.EmptyMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.utils.EmptyMessage.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.utils.EmptyMessage} + */ +proto.polykey.v1.utils.EmptyMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.utils.EmptyMessage; + return proto.polykey.v1.utils.EmptyMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.utils.EmptyMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.utils.EmptyMessage} + */ +proto.polykey.v1.utils.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.utils.EmptyMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.utils.EmptyMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.utils.EmptyMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.utils.EmptyMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.polykey.v1.utils.StatusMessage.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.utils.StatusMessage.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.polykey.v1.utils.StatusMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.utils.StatusMessage.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.polykey.v1.utils.StatusMessage} + */ +proto.polykey.v1.utils.StatusMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.utils.StatusMessage; + return proto.polykey.v1.utils.StatusMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.utils.StatusMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.utils.StatusMessage} + */ +proto.polykey.v1.utils.StatusMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.utils.StatusMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.utils.StatusMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.utils.StatusMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.utils.StatusMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.polykey.v1.utils.StatusMessage.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.polykey.v1.utils.StatusMessage} returns this + */ +proto.polykey.v1.utils.StatusMessage.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, 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.polykey.v1.utils.EchoMessage.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.utils.EchoMessage.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.polykey.v1.utils.EchoMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.utils.EchoMessage.toObject = function(includeInstance, msg) { + var f, obj = { + challenge: 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.polykey.v1.utils.EchoMessage} + */ +proto.polykey.v1.utils.EchoMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.polykey.v1.utils.EchoMessage; + return proto.polykey.v1.utils.EchoMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.polykey.v1.utils.EchoMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.polykey.v1.utils.EchoMessage} + */ +proto.polykey.v1.utils.EchoMessage.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.setChallenge(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.polykey.v1.utils.EchoMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.polykey.v1.utils.EchoMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.polykey.v1.utils.EchoMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.polykey.v1.utils.EchoMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChallenge(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string challenge = 1; + * @return {string} + */ +proto.polykey.v1.utils.EchoMessage.prototype.getChallenge = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.utils.EchoMessage} returns this + */ +proto.polykey.v1.utils.EchoMessage.prototype.setChallenge = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.polykey.v1.utils); diff --git a/src/proto/js/polykey/v1/vaults/vaults_grpc_pb.js b/src/proto/js/polykey/v1/vaults/vaults_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/src/proto/js/polykey/v1/vaults/vaults_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/proto/js/polykey/v1/vaults/vaults_pb.d.ts b/src/proto/js/polykey/v1/vaults/vaults_pb.d.ts new file mode 100644 index 000000000..072887bfe --- /dev/null +++ b/src/proto/js/polykey/v1/vaults/vaults_pb.d.ts @@ -0,0 +1,488 @@ +// package: polykey.v1.vaults +// file: polykey/v1/vaults/vaults.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as polykey_v1_nodes_nodes_pb from "../../../polykey/v1/nodes/nodes_pb"; + +export class Vault extends jspb.Message { + getNameOrId(): string; + setNameOrId(value: string): Vault; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Vault.AsObject; + static toObject(includeInstance: boolean, msg: Vault): Vault.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Vault, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Vault; + static deserializeBinaryFromReader(message: Vault, reader: jspb.BinaryReader): Vault; +} + +export namespace Vault { + export type AsObject = { + nameOrId: string, + } +} + +export class List extends jspb.Message { + getVaultName(): string; + setVaultName(value: string): List; + getVaultId(): string; + setVaultId(value: string): List; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): List.AsObject; + static toObject(includeInstance: boolean, msg: List): List.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: List, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): List; + static deserializeBinaryFromReader(message: List, reader: jspb.BinaryReader): List; +} + +export namespace List { + export type AsObject = { + vaultName: string, + vaultId: string, + } +} + +export class Rename extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): Vault | undefined; + setVault(value?: Vault): Rename; + getNewName(): string; + setNewName(value: string): Rename; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Rename.AsObject; + static toObject(includeInstance: boolean, msg: Rename): Rename.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Rename, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Rename; + static deserializeBinaryFromReader(message: Rename, reader: jspb.BinaryReader): Rename; +} + +export namespace Rename { + export type AsObject = { + vault?: Vault.AsObject, + newName: string, + } +} + +export class Mkdir extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): Vault | undefined; + setVault(value?: Vault): Mkdir; + getDirName(): string; + setDirName(value: string): Mkdir; + getRecursive(): boolean; + setRecursive(value: boolean): Mkdir; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Mkdir.AsObject; + static toObject(includeInstance: boolean, msg: Mkdir): Mkdir.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Mkdir, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Mkdir; + static deserializeBinaryFromReader(message: Mkdir, reader: jspb.BinaryReader): Mkdir; +} + +export namespace Mkdir { + export type AsObject = { + vault?: Vault.AsObject, + dirName: string, + recursive: boolean, + } +} + +export class Pull extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): Vault | undefined; + setVault(value?: Vault): Pull; + + hasNode(): boolean; + clearNode(): void; + getNode(): polykey_v1_nodes_nodes_pb.Node | undefined; + setNode(value?: polykey_v1_nodes_nodes_pb.Node): Pull; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Pull.AsObject; + static toObject(includeInstance: boolean, msg: Pull): Pull.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Pull, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Pull; + static deserializeBinaryFromReader(message: Pull, reader: jspb.BinaryReader): Pull; +} + +export namespace Pull { + export type AsObject = { + vault?: Vault.AsObject, + node?: polykey_v1_nodes_nodes_pb.Node.AsObject, + } +} + +export class Clone extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): Vault | undefined; + setVault(value?: Vault): Clone; + + hasNode(): boolean; + clearNode(): void; + getNode(): polykey_v1_nodes_nodes_pb.Node | undefined; + setNode(value?: polykey_v1_nodes_nodes_pb.Node): Clone; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Clone.AsObject; + static toObject(includeInstance: boolean, msg: Clone): Clone.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Clone, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Clone; + static deserializeBinaryFromReader(message: Clone, reader: jspb.BinaryReader): Clone; +} + +export namespace Clone { + export type AsObject = { + vault?: Vault.AsObject, + node?: polykey_v1_nodes_nodes_pb.Node.AsObject, + } +} + +export class Stat extends jspb.Message { + getStats(): string; + setStats(value: string): Stat; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Stat.AsObject; + static toObject(includeInstance: boolean, msg: Stat): Stat.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Stat, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Stat; + static deserializeBinaryFromReader(message: Stat, reader: jspb.BinaryReader): Stat; +} + +export namespace Stat { + export type AsObject = { + stats: string, + } +} + +export class PermSet extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): Vault | undefined; + setVault(value?: Vault): PermSet; + + hasNode(): boolean; + clearNode(): void; + getNode(): polykey_v1_nodes_nodes_pb.Node | undefined; + setNode(value?: polykey_v1_nodes_nodes_pb.Node): PermSet; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PermSet.AsObject; + static toObject(includeInstance: boolean, msg: PermSet): PermSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PermSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PermSet; + static deserializeBinaryFromReader(message: PermSet, reader: jspb.BinaryReader): PermSet; +} + +export namespace PermSet { + export type AsObject = { + vault?: Vault.AsObject, + node?: polykey_v1_nodes_nodes_pb.Node.AsObject, + } +} + +export class PermUnset extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): Vault | undefined; + setVault(value?: Vault): PermUnset; + + hasNode(): boolean; + clearNode(): void; + getNode(): polykey_v1_nodes_nodes_pb.Node | undefined; + setNode(value?: polykey_v1_nodes_nodes_pb.Node): PermUnset; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PermUnset.AsObject; + static toObject(includeInstance: boolean, msg: PermUnset): PermUnset.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PermUnset, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PermUnset; + static deserializeBinaryFromReader(message: PermUnset, reader: jspb.BinaryReader): PermUnset; +} + +export namespace PermUnset { + export type AsObject = { + vault?: Vault.AsObject, + node?: polykey_v1_nodes_nodes_pb.Node.AsObject, + } +} + +export class PermGet extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): Vault | undefined; + setVault(value?: Vault): PermGet; + + hasNode(): boolean; + clearNode(): void; + getNode(): polykey_v1_nodes_nodes_pb.Node | undefined; + setNode(value?: polykey_v1_nodes_nodes_pb.Node): PermGet; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PermGet.AsObject; + static toObject(includeInstance: boolean, msg: PermGet): PermGet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PermGet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PermGet; + static deserializeBinaryFromReader(message: PermGet, reader: jspb.BinaryReader): PermGet; +} + +export namespace PermGet { + export type AsObject = { + vault?: Vault.AsObject, + node?: polykey_v1_nodes_nodes_pb.Node.AsObject, + } +} + +export class Permission extends jspb.Message { + getNodeId(): string; + setNodeId(value: string): Permission; + getAction(): string; + setAction(value: string): Permission; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Permission.AsObject; + static toObject(includeInstance: boolean, msg: Permission): Permission.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Permission, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Permission; + static deserializeBinaryFromReader(message: Permission, reader: jspb.BinaryReader): Permission; +} + +export namespace Permission { + export type AsObject = { + nodeId: string, + action: string, + } +} + +export class Version extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): Vault | undefined; + setVault(value?: Vault): Version; + getVersionId(): string; + setVersionId(value: string): Version; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Version.AsObject; + static toObject(includeInstance: boolean, msg: Version): Version.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Version, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Version; + static deserializeBinaryFromReader(message: Version, reader: jspb.BinaryReader): Version; +} + +export namespace Version { + export type AsObject = { + vault?: Vault.AsObject, + versionId: string, + } +} + +export class VersionResult extends jspb.Message { + getIsLatestVersion(): boolean; + setIsLatestVersion(value: boolean): VersionResult; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VersionResult.AsObject; + static toObject(includeInstance: boolean, msg: VersionResult): VersionResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VersionResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VersionResult; + static deserializeBinaryFromReader(message: VersionResult, reader: jspb.BinaryReader): VersionResult; +} + +export namespace VersionResult { + export type AsObject = { + isLatestVersion: boolean, + } +} + +export class Log extends jspb.Message { + + hasVault(): boolean; + clearVault(): void; + getVault(): Vault | undefined; + setVault(value?: Vault): Log; + getLogDepth(): number; + setLogDepth(value: number): Log; + getCommitId(): string; + setCommitId(value: string): Log; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Log.AsObject; + static toObject(includeInstance: boolean, msg: Log): Log.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Log, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Log; + static deserializeBinaryFromReader(message: Log, reader: jspb.BinaryReader): Log; +} + +export namespace Log { + export type AsObject = { + vault?: Vault.AsObject, + logDepth: number, + commitId: string, + } +} + +export class LogEntry extends jspb.Message { + getOid(): string; + setOid(value: string): LogEntry; + getCommitter(): string; + setCommitter(value: string): LogEntry; + getTimeStamp(): number; + setTimeStamp(value: number): LogEntry; + getMessage(): string; + setMessage(value: string): LogEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LogEntry.AsObject; + static toObject(includeInstance: boolean, msg: LogEntry): LogEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LogEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LogEntry; + static deserializeBinaryFromReader(message: LogEntry, reader: jspb.BinaryReader): LogEntry; +} + +export namespace LogEntry { + export type AsObject = { + oid: string, + committer: string, + timeStamp: number, + message: string, + } +} + +export class PackChunk extends jspb.Message { + getChunk(): Uint8Array | string; + getChunk_asU8(): Uint8Array; + getChunk_asB64(): string; + setChunk(value: Uint8Array | string): PackChunk; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PackChunk.AsObject; + static toObject(includeInstance: boolean, msg: PackChunk): PackChunk.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PackChunk, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PackChunk; + static deserializeBinaryFromReader(message: PackChunk, reader: jspb.BinaryReader): PackChunk; +} + +export namespace PackChunk { + export type AsObject = { + chunk: Uint8Array | string, + } +} + +export class PackRequest extends jspb.Message { + getId(): string; + setId(value: string): PackRequest; + getBody(): Uint8Array | string; + getBody_asU8(): Uint8Array; + getBody_asB64(): string; + setBody(value: Uint8Array | string): PackRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PackRequest.AsObject; + static toObject(includeInstance: boolean, msg: PackRequest): PackRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PackRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PackRequest; + static deserializeBinaryFromReader(message: PackRequest, reader: jspb.BinaryReader): PackRequest; +} + +export namespace PackRequest { + export type AsObject = { + id: string, + body: Uint8Array | string, + } +} + +export class NodePermission extends jspb.Message { + getNodeId(): string; + setNodeId(value: string): NodePermission; + getVaultId(): string; + setVaultId(value: string): NodePermission; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NodePermission.AsObject; + static toObject(includeInstance: boolean, msg: NodePermission): NodePermission.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NodePermission, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NodePermission; + static deserializeBinaryFromReader(message: NodePermission, reader: jspb.BinaryReader): NodePermission; +} + +export namespace NodePermission { + export type AsObject = { + nodeId: string, + vaultId: string, + } +} + +export class NodePermissionAllowed extends jspb.Message { + getPermission(): boolean; + setPermission(value: boolean): NodePermissionAllowed; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NodePermissionAllowed.AsObject; + static toObject(includeInstance: boolean, msg: NodePermissionAllowed): NodePermissionAllowed.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NodePermissionAllowed, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NodePermissionAllowed; + static deserializeBinaryFromReader(message: NodePermissionAllowed, reader: jspb.BinaryReader): NodePermissionAllowed; +} + +export namespace NodePermissionAllowed { + export type AsObject = { + permission: boolean, + } +} diff --git a/src/proto/js/Agent_pb.js b/src/proto/js/polykey/v1/vaults/vaults_pb.js similarity index 53% rename from src/proto/js/Agent_pb.js rename to src/proto/js/polykey/v1/vaults/vaults_pb.js index 20ef173cc..6fbd3c4ac 100644 --- a/src/proto/js/Agent_pb.js +++ b/src/proto/js/polykey/v1/vaults/vaults_pb.js @@ -1,4 +1,4 @@ -// source: Agent.proto +// source: polykey/v1/vaults/vaults.proto /** * @fileoverview * @enhanceable @@ -14,27 +14,27 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -goog.exportSymbol('proto.agentInterface.ChainDataMessage', null, global); -goog.exportSymbol('proto.agentInterface.ClaimIntermediaryMessage', null, global); -goog.exportSymbol('proto.agentInterface.ClaimMessage', null, global); -goog.exportSymbol('proto.agentInterface.ClaimTypeMessage', null, global); -goog.exportSymbol('proto.agentInterface.ClaimsMessage', null, global); -goog.exportSymbol('proto.agentInterface.ConnectionMessage', null, global); -goog.exportSymbol('proto.agentInterface.CrossSignMessage', null, global); -goog.exportSymbol('proto.agentInterface.EchoMessage', null, global); -goog.exportSymbol('proto.agentInterface.EmptyMessage', null, global); -goog.exportSymbol('proto.agentInterface.InfoRequest', null, global); -goog.exportSymbol('proto.agentInterface.NodeAddressMessage', null, global); -goog.exportSymbol('proto.agentInterface.NodeIdMessage', null, global); -goog.exportSymbol('proto.agentInterface.NodeTableMessage', null, global); -goog.exportSymbol('proto.agentInterface.NotificationMessage', null, global); -goog.exportSymbol('proto.agentInterface.PackChunk', null, global); -goog.exportSymbol('proto.agentInterface.PackRequest', null, global); -goog.exportSymbol('proto.agentInterface.PermissionMessage', null, global); -goog.exportSymbol('proto.agentInterface.RelayMessage', null, global); -goog.exportSymbol('proto.agentInterface.SignatureMessage', null, global); -goog.exportSymbol('proto.agentInterface.VaultListMessage', null, global); -goog.exportSymbol('proto.agentInterface.VaultPermMessage', null, global); +var polykey_v1_nodes_nodes_pb = require('../../../polykey/v1/nodes/nodes_pb.js'); +goog.object.extend(proto, polykey_v1_nodes_nodes_pb); +goog.exportSymbol('proto.polykey.v1.vaults.Clone', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.List', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.Log', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.LogEntry', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.Mkdir', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.NodePermission', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.NodePermissionAllowed', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.PackChunk', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.PackRequest', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.PermGet', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.PermSet', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.PermUnset', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.Permission', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.Pull', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.Rename', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.Stat', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.Vault', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.Version', null, global); +goog.exportSymbol('proto.polykey.v1.vaults.VersionResult', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -45,16 +45,16 @@ goog.exportSymbol('proto.agentInterface.VaultPermMessage', null, global); * @extends {jspb.Message} * @constructor */ -proto.agentInterface.EmptyMessage = function(opt_data) { +proto.polykey.v1.vaults.Vault = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.EmptyMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.Vault, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.EmptyMessage.displayName = 'proto.agentInterface.EmptyMessage'; + proto.polykey.v1.vaults.Vault.displayName = 'proto.polykey.v1.vaults.Vault'; } /** * Generated by JsPbCodeGenerator. @@ -66,16 +66,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.EchoMessage = function(opt_data) { +proto.polykey.v1.vaults.List = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.EchoMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.List, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.EchoMessage.displayName = 'proto.agentInterface.EchoMessage'; + proto.polykey.v1.vaults.List.displayName = 'proto.polykey.v1.vaults.List'; } /** * Generated by JsPbCodeGenerator. @@ -87,16 +87,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.InfoRequest = function(opt_data) { +proto.polykey.v1.vaults.Rename = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.InfoRequest, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.Rename, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.InfoRequest.displayName = 'proto.agentInterface.InfoRequest'; + proto.polykey.v1.vaults.Rename.displayName = 'proto.polykey.v1.vaults.Rename'; } /** * Generated by JsPbCodeGenerator. @@ -108,16 +108,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.PackChunk = function(opt_data) { +proto.polykey.v1.vaults.Mkdir = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.PackChunk, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.Mkdir, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.PackChunk.displayName = 'proto.agentInterface.PackChunk'; + proto.polykey.v1.vaults.Mkdir.displayName = 'proto.polykey.v1.vaults.Mkdir'; } /** * Generated by JsPbCodeGenerator. @@ -129,16 +129,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.PackRequest = function(opt_data) { +proto.polykey.v1.vaults.Pull = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.PackRequest, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.Pull, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.PackRequest.displayName = 'proto.agentInterface.PackRequest'; + proto.polykey.v1.vaults.Pull.displayName = 'proto.polykey.v1.vaults.Pull'; } /** * Generated by JsPbCodeGenerator. @@ -150,16 +150,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.VaultListMessage = function(opt_data) { +proto.polykey.v1.vaults.Clone = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.VaultListMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.Clone, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.VaultListMessage.displayName = 'proto.agentInterface.VaultListMessage'; + proto.polykey.v1.vaults.Clone.displayName = 'proto.polykey.v1.vaults.Clone'; } /** * Generated by JsPbCodeGenerator. @@ -171,16 +171,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.VaultPermMessage = function(opt_data) { +proto.polykey.v1.vaults.Stat = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.VaultPermMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.Stat, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.VaultPermMessage.displayName = 'proto.agentInterface.VaultPermMessage'; + proto.polykey.v1.vaults.Stat.displayName = 'proto.polykey.v1.vaults.Stat'; } /** * Generated by JsPbCodeGenerator. @@ -192,16 +192,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.PermissionMessage = function(opt_data) { +proto.polykey.v1.vaults.PermSet = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.PermissionMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.PermSet, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.PermissionMessage.displayName = 'proto.agentInterface.PermissionMessage'; + proto.polykey.v1.vaults.PermSet.displayName = 'proto.polykey.v1.vaults.PermSet'; } /** * Generated by JsPbCodeGenerator. @@ -213,16 +213,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.NodeIdMessage = function(opt_data) { +proto.polykey.v1.vaults.PermUnset = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.NodeIdMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.PermUnset, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.NodeIdMessage.displayName = 'proto.agentInterface.NodeIdMessage'; + proto.polykey.v1.vaults.PermUnset.displayName = 'proto.polykey.v1.vaults.PermUnset'; } /** * Generated by JsPbCodeGenerator. @@ -234,16 +234,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.ConnectionMessage = function(opt_data) { +proto.polykey.v1.vaults.PermGet = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.ConnectionMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.PermGet, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.ConnectionMessage.displayName = 'proto.agentInterface.ConnectionMessage'; + proto.polykey.v1.vaults.PermGet.displayName = 'proto.polykey.v1.vaults.PermGet'; } /** * Generated by JsPbCodeGenerator. @@ -255,16 +255,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.RelayMessage = function(opt_data) { +proto.polykey.v1.vaults.Permission = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.RelayMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.Permission, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.RelayMessage.displayName = 'proto.agentInterface.RelayMessage'; + proto.polykey.v1.vaults.Permission.displayName = 'proto.polykey.v1.vaults.Permission'; } /** * Generated by JsPbCodeGenerator. @@ -276,16 +276,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.NodeAddressMessage = function(opt_data) { +proto.polykey.v1.vaults.Version = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.NodeAddressMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.Version, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.NodeAddressMessage.displayName = 'proto.agentInterface.NodeAddressMessage'; + proto.polykey.v1.vaults.Version.displayName = 'proto.polykey.v1.vaults.Version'; } /** * Generated by JsPbCodeGenerator. @@ -297,16 +297,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.NodeTableMessage = function(opt_data) { +proto.polykey.v1.vaults.VersionResult = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.NodeTableMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.VersionResult, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.NodeTableMessage.displayName = 'proto.agentInterface.NodeTableMessage'; + proto.polykey.v1.vaults.VersionResult.displayName = 'proto.polykey.v1.vaults.VersionResult'; } /** * Generated by JsPbCodeGenerator. @@ -318,16 +318,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.ClaimTypeMessage = function(opt_data) { +proto.polykey.v1.vaults.Log = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.ClaimTypeMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.Log, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.ClaimTypeMessage.displayName = 'proto.agentInterface.ClaimTypeMessage'; + proto.polykey.v1.vaults.Log.displayName = 'proto.polykey.v1.vaults.Log'; } /** * Generated by JsPbCodeGenerator. @@ -339,58 +339,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.ClaimsMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.agentInterface.ClaimsMessage.repeatedFields_, null); -}; -goog.inherits(proto.agentInterface.ClaimsMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agentInterface.ClaimsMessage.displayName = 'proto.agentInterface.ClaimsMessage'; -} -/** - * 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.agentInterface.ChainDataMessage = function(opt_data) { +proto.polykey.v1.vaults.LogEntry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.ChainDataMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agentInterface.ChainDataMessage.displayName = 'proto.agentInterface.ChainDataMessage'; -} -/** - * 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.agentInterface.ClaimMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.agentInterface.ClaimMessage.repeatedFields_, null); -}; -goog.inherits(proto.agentInterface.ClaimMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.LogEntry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.ClaimMessage.displayName = 'proto.agentInterface.ClaimMessage'; + proto.polykey.v1.vaults.LogEntry.displayName = 'proto.polykey.v1.vaults.LogEntry'; } /** * Generated by JsPbCodeGenerator. @@ -402,16 +360,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.SignatureMessage = function(opt_data) { +proto.polykey.v1.vaults.PackChunk = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.SignatureMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.PackChunk, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.SignatureMessage.displayName = 'proto.agentInterface.SignatureMessage'; + proto.polykey.v1.vaults.PackChunk.displayName = 'proto.polykey.v1.vaults.PackChunk'; } /** * Generated by JsPbCodeGenerator. @@ -423,16 +381,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.NotificationMessage = function(opt_data) { +proto.polykey.v1.vaults.PackRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.NotificationMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.PackRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.NotificationMessage.displayName = 'proto.agentInterface.NotificationMessage'; + proto.polykey.v1.vaults.PackRequest.displayName = 'proto.polykey.v1.vaults.PackRequest'; } /** * Generated by JsPbCodeGenerator. @@ -444,16 +402,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.ClaimIntermediaryMessage = function(opt_data) { +proto.polykey.v1.vaults.NodePermission = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.ClaimIntermediaryMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.NodePermission, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.ClaimIntermediaryMessage.displayName = 'proto.agentInterface.ClaimIntermediaryMessage'; + proto.polykey.v1.vaults.NodePermission.displayName = 'proto.polykey.v1.vaults.NodePermission'; } /** * Generated by JsPbCodeGenerator. @@ -465,16 +423,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agentInterface.CrossSignMessage = function(opt_data) { +proto.polykey.v1.vaults.NodePermissionAllowed = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agentInterface.CrossSignMessage, jspb.Message); +goog.inherits(proto.polykey.v1.vaults.NodePermissionAllowed, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agentInterface.CrossSignMessage.displayName = 'proto.agentInterface.CrossSignMessage'; + proto.polykey.v1.vaults.NodePermissionAllowed.displayName = 'proto.polykey.v1.vaults.NodePermissionAllowed'; } @@ -492,8 +450,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.EmptyMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.EmptyMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.Vault.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.Vault.toObject(opt_includeInstance, this); }; @@ -502,13 +460,13 @@ proto.agentInterface.EmptyMessage.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.EmptyMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.Vault} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.EmptyMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.Vault.toObject = function(includeInstance, msg) { var f, obj = { - + nameOrId: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -522,29 +480,33 @@ proto.agentInterface.EmptyMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.EmptyMessage} + * @return {!proto.polykey.v1.vaults.Vault} */ -proto.agentInterface.EmptyMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.Vault.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.EmptyMessage; - return proto.agentInterface.EmptyMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.Vault; + return proto.polykey.v1.vaults.Vault.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.EmptyMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.Vault} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.EmptyMessage} + * @return {!proto.polykey.v1.vaults.Vault} */ -proto.agentInterface.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.Vault.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.setNameOrId(value); + break; default: reader.skipField(); break; @@ -558,9 +520,9 @@ proto.agentInterface.EmptyMessage.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.EmptyMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.Vault.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.EmptyMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.Vault.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -568,12 +530,37 @@ proto.agentInterface.EmptyMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.EmptyMessage} message + * @param {!proto.polykey.v1.vaults.Vault} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.EmptyMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.Vault.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getNameOrId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name_or_Id = 1; + * @return {string} + */ +proto.polykey.v1.vaults.Vault.prototype.getNameOrId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.vaults.Vault} returns this + */ +proto.polykey.v1.vaults.Vault.prototype.setNameOrId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -593,8 +580,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.EchoMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.EchoMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.List.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.List.toObject(opt_includeInstance, this); }; @@ -603,13 +590,14 @@ proto.agentInterface.EchoMessage.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.EchoMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.List} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.EchoMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.List.toObject = function(includeInstance, msg) { var f, obj = { - challenge: jspb.Message.getFieldWithDefault(msg, 1, "") + vaultName: jspb.Message.getFieldWithDefault(msg, 1, ""), + vaultId: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -623,23 +611,23 @@ proto.agentInterface.EchoMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.EchoMessage} + * @return {!proto.polykey.v1.vaults.List} */ -proto.agentInterface.EchoMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.List.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.EchoMessage; - return proto.agentInterface.EchoMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.List; + return proto.polykey.v1.vaults.List.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.EchoMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.List} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.EchoMessage} + * @return {!proto.polykey.v1.vaults.List} */ -proto.agentInterface.EchoMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.List.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -648,7 +636,11 @@ proto.agentInterface.EchoMessage.deserializeBinaryFromReader = function(msg, rea switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setChallenge(value); + msg.setVaultName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVaultId(value); break; default: reader.skipField(); @@ -663,9 +655,9 @@ proto.agentInterface.EchoMessage.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.EchoMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.List.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.EchoMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.List.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -673,40 +665,65 @@ proto.agentInterface.EchoMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.EchoMessage} message + * @param {!proto.polykey.v1.vaults.List} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.EchoMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.List.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChallenge(); + f = message.getVaultName(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getVaultId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; /** - * optional string challenge = 1; + * optional string vault_name = 1; * @return {string} */ -proto.agentInterface.EchoMessage.prototype.getChallenge = function() { +proto.polykey.v1.vaults.List.prototype.getVaultName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agentInterface.EchoMessage} returns this + * @return {!proto.polykey.v1.vaults.List} returns this */ -proto.agentInterface.EchoMessage.prototype.setChallenge = function(value) { +proto.polykey.v1.vaults.List.prototype.setVaultName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; +/** + * optional string vault_id = 2; + * @return {string} + */ +proto.polykey.v1.vaults.List.prototype.getVaultId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.polykey.v1.vaults.List} returns this + */ +proto.polykey.v1.vaults.List.prototype.setVaultId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + @@ -723,8 +740,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.InfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.InfoRequest.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.Rename.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.Rename.toObject(opt_includeInstance, this); }; @@ -733,13 +750,14 @@ proto.agentInterface.InfoRequest.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.InfoRequest} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.Rename} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.InfoRequest.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.Rename.toObject = function(includeInstance, msg) { var f, obj = { - vaultId: jspb.Message.getFieldWithDefault(msg, 1, "") + vault: (f = msg.getVault()) && proto.polykey.v1.vaults.Vault.toObject(includeInstance, f), + newName: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -753,23 +771,23 @@ proto.agentInterface.InfoRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.InfoRequest} + * @return {!proto.polykey.v1.vaults.Rename} */ -proto.agentInterface.InfoRequest.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.Rename.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.InfoRequest; - return proto.agentInterface.InfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.Rename; + return proto.polykey.v1.vaults.Rename.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.InfoRequest} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.Rename} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.InfoRequest} + * @return {!proto.polykey.v1.vaults.Rename} */ -proto.agentInterface.InfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.Rename.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -777,8 +795,13 @@ proto.agentInterface.InfoRequest.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: + var value = new proto.polykey.v1.vaults.Vault; + reader.readMessage(value,proto.polykey.v1.vaults.Vault.deserializeBinaryFromReader); + msg.setVault(value); + break; + case 2: var value = /** @type {string} */ (reader.readString()); - msg.setVaultId(value); + msg.setNewName(value); break; default: reader.skipField(); @@ -793,9 +816,9 @@ proto.agentInterface.InfoRequest.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.InfoRequest.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.Rename.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.InfoRequest.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.Rename.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -803,16 +826,24 @@ proto.agentInterface.InfoRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.InfoRequest} message + * @param {!proto.polykey.v1.vaults.Rename} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.InfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.Rename.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVaultId(); + f = message.getVault(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.polykey.v1.vaults.Vault.serializeBinaryToWriter + ); + } + f = message.getNewName(); if (f.length > 0) { writer.writeString( - 1, + 2, f ); } @@ -820,20 +851,57 @@ proto.agentInterface.InfoRequest.serializeBinaryToWriter = function(message, wri /** - * optional string vault_id = 1; + * optional Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} + */ +proto.polykey.v1.vaults.Rename.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.vaults.Vault, 1)); +}; + + +/** + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.vaults.Rename} returns this +*/ +proto.polykey.v1.vaults.Rename.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.Rename} returns this + */ +proto.polykey.v1.vaults.Rename.prototype.clearVault = function() { + return this.setVault(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.vaults.Rename.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string new_name = 2; * @return {string} */ -proto.agentInterface.InfoRequest.prototype.getVaultId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.polykey.v1.vaults.Rename.prototype.getNewName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.agentInterface.InfoRequest} returns this + * @return {!proto.polykey.v1.vaults.Rename} returns this */ -proto.agentInterface.InfoRequest.prototype.setVaultId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.polykey.v1.vaults.Rename.prototype.setNewName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -853,8 +921,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.PackChunk.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.PackChunk.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.Mkdir.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.Mkdir.toObject(opt_includeInstance, this); }; @@ -863,13 +931,15 @@ proto.agentInterface.PackChunk.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.PackChunk} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.Mkdir} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.PackChunk.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.Mkdir.toObject = function(includeInstance, msg) { var f, obj = { - chunk: msg.getChunk_asB64() + vault: (f = msg.getVault()) && proto.polykey.v1.vaults.Vault.toObject(includeInstance, f), + dirName: jspb.Message.getFieldWithDefault(msg, 2, ""), + recursive: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -883,23 +953,23 @@ proto.agentInterface.PackChunk.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.PackChunk} + * @return {!proto.polykey.v1.vaults.Mkdir} */ -proto.agentInterface.PackChunk.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.Mkdir.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.PackChunk; - return proto.agentInterface.PackChunk.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.Mkdir; + return proto.polykey.v1.vaults.Mkdir.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.PackChunk} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.Mkdir} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.PackChunk} + * @return {!proto.polykey.v1.vaults.Mkdir} */ -proto.agentInterface.PackChunk.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.Mkdir.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -907,8 +977,17 @@ proto.agentInterface.PackChunk.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChunk(value); + var value = new proto.polykey.v1.vaults.Vault; + reader.readMessage(value,proto.polykey.v1.vaults.Vault.deserializeBinaryFromReader); + msg.setVault(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDirName(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRecursive(value); break; default: reader.skipField(); @@ -923,9 +1002,9 @@ proto.agentInterface.PackChunk.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.PackChunk.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.Mkdir.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.PackChunk.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.Mkdir.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -933,16 +1012,31 @@ proto.agentInterface.PackChunk.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.PackChunk} message + * @param {!proto.polykey.v1.vaults.Mkdir} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.PackChunk.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.Mkdir.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChunk_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getVault(); + if (f != null) { + writer.writeMessage( 1, + f, + proto.polykey.v1.vaults.Vault.serializeBinaryToWriter + ); + } + f = message.getDirName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRecursive(); + if (f) { + writer.writeBool( + 3, f ); } @@ -950,44 +1044,75 @@ proto.agentInterface.PackChunk.serializeBinaryToWriter = function(message, write /** - * optional bytes chunk = 1; - * @return {!(string|Uint8Array)} + * optional Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} */ -proto.agentInterface.PackChunk.prototype.getChunk = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.polykey.v1.vaults.Mkdir.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.vaults.Vault, 1)); }; /** - * optional bytes chunk = 1; - * This is a type-conversion wrapper around `getChunk()` + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.vaults.Mkdir} returns this +*/ +proto.polykey.v1.vaults.Mkdir.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.Mkdir} returns this + */ +proto.polykey.v1.vaults.Mkdir.prototype.clearVault = function() { + return this.setVault(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.vaults.Mkdir.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string dir_name = 2; * @return {string} */ -proto.agentInterface.PackChunk.prototype.getChunk_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChunk())); +proto.polykey.v1.vaults.Mkdir.prototype.getDirName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes chunk = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChunk()` - * @return {!Uint8Array} + * @param {string} value + * @return {!proto.polykey.v1.vaults.Mkdir} returns this */ -proto.agentInterface.PackChunk.prototype.getChunk_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChunk())); +proto.polykey.v1.vaults.Mkdir.prototype.setDirName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.agentInterface.PackChunk} returns this + * optional bool recursive = 3; + * @return {boolean} */ -proto.agentInterface.PackChunk.prototype.setChunk = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.polykey.v1.vaults.Mkdir.prototype.getRecursive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.polykey.v1.vaults.Mkdir} returns this + */ +proto.polykey.v1.vaults.Mkdir.prototype.setRecursive = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; @@ -1007,8 +1132,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.PackRequest.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.PackRequest.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.Pull.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.Pull.toObject(opt_includeInstance, this); }; @@ -1017,14 +1142,14 @@ proto.agentInterface.PackRequest.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.PackRequest} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.Pull} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.PackRequest.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.Pull.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - body: msg.getBody_asB64() + vault: (f = msg.getVault()) && proto.polykey.v1.vaults.Vault.toObject(includeInstance, f), + node: (f = msg.getNode()) && polykey_v1_nodes_nodes_pb.Node.toObject(includeInstance, f) }; if (includeInstance) { @@ -1038,23 +1163,23 @@ proto.agentInterface.PackRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.PackRequest} + * @return {!proto.polykey.v1.vaults.Pull} */ -proto.agentInterface.PackRequest.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.Pull.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.PackRequest; - return proto.agentInterface.PackRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.Pull; + return proto.polykey.v1.vaults.Pull.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.PackRequest} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.Pull} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.PackRequest} + * @return {!proto.polykey.v1.vaults.Pull} */ -proto.agentInterface.PackRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.Pull.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1062,12 +1187,14 @@ proto.agentInterface.PackRequest.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); + var value = new proto.polykey.v1.vaults.Vault; + reader.readMessage(value,proto.polykey.v1.vaults.Vault.deserializeBinaryFromReader); + msg.setVault(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBody(value); + var value = new polykey_v1_nodes_nodes_pb.Node; + reader.readMessage(value,polykey_v1_nodes_nodes_pb.Node.deserializeBinaryFromReader); + msg.setNode(value); break; default: reader.skipField(); @@ -1082,9 +1209,9 @@ proto.agentInterface.PackRequest.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.PackRequest.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.Pull.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.PackRequest.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.Pull.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1092,92 +1219,108 @@ proto.agentInterface.PackRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.PackRequest} message + * @param {!proto.polykey.v1.vaults.Pull} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.PackRequest.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.Pull.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( + f = message.getVault(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.polykey.v1.vaults.Vault.serializeBinaryToWriter ); } - f = message.getBody_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getNode(); + if (f != null) { + writer.writeMessage( 2, - f + f, + polykey_v1_nodes_nodes_pb.Node.serializeBinaryToWriter ); } }; /** - * optional string id = 1; - * @return {string} + * optional Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} */ -proto.agentInterface.PackRequest.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.polykey.v1.vaults.Pull.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.vaults.Vault, 1)); }; /** - * @param {string} value - * @return {!proto.agentInterface.PackRequest} returns this - */ -proto.agentInterface.PackRequest.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.vaults.Pull} returns this +*/ +proto.polykey.v1.vaults.Pull.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * optional bytes body = 2; - * @return {!(string|Uint8Array)} + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.Pull} returns this */ -proto.agentInterface.PackRequest.prototype.getBody = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.polykey.v1.vaults.Pull.prototype.clearVault = function() { + return this.setVault(undefined); }; /** - * optional bytes body = 2; - * This is a type-conversion wrapper around `getBody()` - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.agentInterface.PackRequest.prototype.getBody_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBody())); +proto.polykey.v1.vaults.Pull.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes body = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBody()` - * @return {!Uint8Array} + * optional polykey.v1.nodes.Node node = 2; + * @return {?proto.polykey.v1.nodes.Node} */ -proto.agentInterface.PackRequest.prototype.getBody_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBody())); +proto.polykey.v1.vaults.Pull.prototype.getNode = function() { + return /** @type{?proto.polykey.v1.nodes.Node} */ ( + jspb.Message.getWrapperField(this, polykey_v1_nodes_nodes_pb.Node, 2)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.agentInterface.PackRequest} returns this - */ -proto.agentInterface.PackRequest.prototype.setBody = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + * @param {?proto.polykey.v1.nodes.Node|undefined} value + * @return {!proto.polykey.v1.vaults.Pull} returns this +*/ +proto.polykey.v1.vaults.Pull.prototype.setNode = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; - - - +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.Pull} returns this + */ +proto.polykey.v1.vaults.Pull.prototype.clearNode = function() { + return this.setNode(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.vaults.Pull.prototype.hasNode = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -1191,8 +1334,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.VaultListMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.VaultListMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.Clone.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.Clone.toObject(opt_includeInstance, this); }; @@ -1201,13 +1344,14 @@ proto.agentInterface.VaultListMessage.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.VaultListMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.Clone} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.VaultListMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.Clone.toObject = function(includeInstance, msg) { var f, obj = { - vault: msg.getVault_asB64() + vault: (f = msg.getVault()) && proto.polykey.v1.vaults.Vault.toObject(includeInstance, f), + node: (f = msg.getNode()) && polykey_v1_nodes_nodes_pb.Node.toObject(includeInstance, f) }; if (includeInstance) { @@ -1221,23 +1365,23 @@ proto.agentInterface.VaultListMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.VaultListMessage} + * @return {!proto.polykey.v1.vaults.Clone} */ -proto.agentInterface.VaultListMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.Clone.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.VaultListMessage; - return proto.agentInterface.VaultListMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.Clone; + return proto.polykey.v1.vaults.Clone.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.VaultListMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.Clone} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.VaultListMessage} + * @return {!proto.polykey.v1.vaults.Clone} */ -proto.agentInterface.VaultListMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.Clone.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1245,9 +1389,15 @@ proto.agentInterface.VaultListMessage.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); + var value = new proto.polykey.v1.vaults.Vault; + reader.readMessage(value,proto.polykey.v1.vaults.Vault.deserializeBinaryFromReader); msg.setVault(value); break; + case 2: + var value = new polykey_v1_nodes_nodes_pb.Node; + reader.readMessage(value,polykey_v1_nodes_nodes_pb.Node.deserializeBinaryFromReader); + msg.setNode(value); + break; default: reader.skipField(); break; @@ -1261,9 +1411,9 @@ proto.agentInterface.VaultListMessage.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.VaultListMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.Clone.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.VaultListMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.Clone.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1271,61 +1421,102 @@ proto.agentInterface.VaultListMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.VaultListMessage} message + * @param {!proto.polykey.v1.vaults.Clone} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.VaultListMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.Clone.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVault_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getVault(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.polykey.v1.vaults.Vault.serializeBinaryToWriter + ); + } + f = message.getNode(); + if (f != null) { + writer.writeMessage( + 2, + f, + polykey_v1_nodes_nodes_pb.Node.serializeBinaryToWriter ); } }; /** - * optional bytes vault = 1; - * @return {!(string|Uint8Array)} + * optional Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} */ -proto.agentInterface.VaultListMessage.prototype.getVault = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.polykey.v1.vaults.Clone.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.vaults.Vault, 1)); }; /** - * optional bytes vault = 1; - * This is a type-conversion wrapper around `getVault()` - * @return {string} + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.vaults.Clone} returns this +*/ +proto.polykey.v1.vaults.Clone.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.Clone} returns this */ -proto.agentInterface.VaultListMessage.prototype.getVault_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getVault())); +proto.polykey.v1.vaults.Clone.prototype.clearVault = function() { + return this.setVault(undefined); }; /** - * optional bytes vault = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVault()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.agentInterface.VaultListMessage.prototype.getVault_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getVault())); +proto.polykey.v1.vaults.Clone.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.agentInterface.VaultListMessage} returns this + * optional polykey.v1.nodes.Node node = 2; + * @return {?proto.polykey.v1.nodes.Node} */ -proto.agentInterface.VaultListMessage.prototype.setVault = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.polykey.v1.vaults.Clone.prototype.getNode = function() { + return /** @type{?proto.polykey.v1.nodes.Node} */ ( + jspb.Message.getWrapperField(this, polykey_v1_nodes_nodes_pb.Node, 2)); +}; + + +/** + * @param {?proto.polykey.v1.nodes.Node|undefined} value + * @return {!proto.polykey.v1.vaults.Clone} returns this +*/ +proto.polykey.v1.vaults.Clone.prototype.setNode = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.Clone} returns this + */ +proto.polykey.v1.vaults.Clone.prototype.clearNode = function() { + return this.setNode(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.vaults.Clone.prototype.hasNode = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -1345,8 +1536,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.VaultPermMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.VaultPermMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.Stat.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.Stat.toObject(opt_includeInstance, this); }; @@ -1355,14 +1546,13 @@ proto.agentInterface.VaultPermMessage.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.VaultPermMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.Stat} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.VaultPermMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.Stat.toObject = function(includeInstance, msg) { var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - vaultId: jspb.Message.getFieldWithDefault(msg, 2, "") + stats: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -1376,23 +1566,23 @@ proto.agentInterface.VaultPermMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.VaultPermMessage} + * @return {!proto.polykey.v1.vaults.Stat} */ -proto.agentInterface.VaultPermMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.Stat.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.VaultPermMessage; - return proto.agentInterface.VaultPermMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.Stat; + return proto.polykey.v1.vaults.Stat.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.VaultPermMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.Stat} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.VaultPermMessage} + * @return {!proto.polykey.v1.vaults.Stat} */ -proto.agentInterface.VaultPermMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.Stat.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1401,11 +1591,7 @@ proto.agentInterface.VaultPermMessage.deserializeBinaryFromReader = function(msg switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setVaultId(value); + msg.setStats(value); break; default: reader.skipField(); @@ -1420,9 +1606,9 @@ proto.agentInterface.VaultPermMessage.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.VaultPermMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.Stat.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.VaultPermMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.Stat.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1430,65 +1616,40 @@ proto.agentInterface.VaultPermMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.VaultPermMessage} message + * @param {!proto.polykey.v1.vaults.Stat} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.VaultPermMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.Stat.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodeId(); + f = message.getStats(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getVaultId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } }; /** - * optional string node_id = 1; + * optional string stats = 1; * @return {string} */ -proto.agentInterface.VaultPermMessage.prototype.getNodeId = function() { +proto.polykey.v1.vaults.Stat.prototype.getStats = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agentInterface.VaultPermMessage} returns this + * @return {!proto.polykey.v1.vaults.Stat} returns this */ -proto.agentInterface.VaultPermMessage.prototype.setNodeId = function(value) { +proto.polykey.v1.vaults.Stat.prototype.setStats = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional string vault_id = 2; - * @return {string} - */ -proto.agentInterface.VaultPermMessage.prototype.getVaultId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agentInterface.VaultPermMessage} returns this - */ -proto.agentInterface.VaultPermMessage.prototype.setVaultId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - @@ -1505,8 +1666,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.PermissionMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.PermissionMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.PermSet.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.PermSet.toObject(opt_includeInstance, this); }; @@ -1515,13 +1676,14 @@ proto.agentInterface.PermissionMessage.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.PermissionMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.PermSet} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.PermissionMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.PermSet.toObject = function(includeInstance, msg) { var f, obj = { - permission: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + vault: (f = msg.getVault()) && proto.polykey.v1.vaults.Vault.toObject(includeInstance, f), + node: (f = msg.getNode()) && polykey_v1_nodes_nodes_pb.Node.toObject(includeInstance, f) }; if (includeInstance) { @@ -1535,23 +1697,23 @@ proto.agentInterface.PermissionMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.PermissionMessage} + * @return {!proto.polykey.v1.vaults.PermSet} */ -proto.agentInterface.PermissionMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.PermSet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.PermissionMessage; - return proto.agentInterface.PermissionMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.PermSet; + return proto.polykey.v1.vaults.PermSet.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.PermissionMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.PermSet} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.PermissionMessage} + * @return {!proto.polykey.v1.vaults.PermSet} */ -proto.agentInterface.PermissionMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.PermSet.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1559,8 +1721,14 @@ proto.agentInterface.PermissionMessage.deserializeBinaryFromReader = function(ms var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPermission(value); + var value = new proto.polykey.v1.vaults.Vault; + reader.readMessage(value,proto.polykey.v1.vaults.Vault.deserializeBinaryFromReader); + msg.setVault(value); + break; + case 2: + var value = new polykey_v1_nodes_nodes_pb.Node; + reader.readMessage(value,polykey_v1_nodes_nodes_pb.Node.deserializeBinaryFromReader); + msg.setNode(value); break; default: reader.skipField(); @@ -1575,9 +1743,9 @@ proto.agentInterface.PermissionMessage.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.PermissionMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.PermSet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.PermissionMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.PermSet.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1585,167 +1753,102 @@ proto.agentInterface.PermissionMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.PermissionMessage} message + * @param {!proto.polykey.v1.vaults.PermSet} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.PermissionMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.PermSet.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPermission(); - if (f) { - writer.writeBool( + f = message.getVault(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.polykey.v1.vaults.Vault.serializeBinaryToWriter + ); + } + f = message.getNode(); + if (f != null) { + writer.writeMessage( + 2, + f, + polykey_v1_nodes_nodes_pb.Node.serializeBinaryToWriter ); } }; /** - * optional bool permission = 1; - * @return {boolean} - */ -proto.agentInterface.PermissionMessage.prototype.getPermission = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.agentInterface.PermissionMessage} returns this - */ -proto.agentInterface.PermissionMessage.prototype.setPermission = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} */ -proto.agentInterface.NodeIdMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.NodeIdMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.PermSet.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.vaults.Vault, 1)); }; /** - * 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.agentInterface.NodeIdMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agentInterface.NodeIdMessage.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.vaults.PermSet} returns this +*/ +proto.polykey.v1.vaults.PermSet.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.NodeIdMessage} + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.PermSet} returns this */ -proto.agentInterface.NodeIdMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.NodeIdMessage; - return proto.agentInterface.NodeIdMessage.deserializeBinaryFromReader(msg, reader); +proto.polykey.v1.vaults.PermSet.prototype.clearVault = function() { + return this.setVault(undefined); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agentInterface.NodeIdMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.NodeIdMessage} + * Returns whether this field is set. + * @return {boolean} */ -proto.agentInterface.NodeIdMessage.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.setNodeId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.polykey.v1.vaults.PermSet.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional polykey.v1.nodes.Node node = 2; + * @return {?proto.polykey.v1.nodes.Node} */ -proto.agentInterface.NodeIdMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agentInterface.NodeIdMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.polykey.v1.vaults.PermSet.prototype.getNode = function() { + return /** @type{?proto.polykey.v1.nodes.Node} */ ( + jspb.Message.getWrapperField(this, polykey_v1_nodes_nodes_pb.Node, 2)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.NodeIdMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agentInterface.NodeIdMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } + * @param {?proto.polykey.v1.nodes.Node|undefined} value + * @return {!proto.polykey.v1.vaults.PermSet} returns this +*/ +proto.polykey.v1.vaults.PermSet.prototype.setNode = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * optional string node_id = 1; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.PermSet} returns this */ -proto.agentInterface.NodeIdMessage.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.polykey.v1.vaults.PermSet.prototype.clearNode = function() { + return this.setNode(undefined); }; /** - * @param {string} value - * @return {!proto.agentInterface.NodeIdMessage} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.agentInterface.NodeIdMessage.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.polykey.v1.vaults.PermSet.prototype.hasNode = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -1765,8 +1868,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.ConnectionMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.ConnectionMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.PermUnset.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.PermUnset.toObject(opt_includeInstance, this); }; @@ -1775,16 +1878,14 @@ proto.agentInterface.ConnectionMessage.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.ConnectionMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.PermUnset} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.ConnectionMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.PermUnset.toObject = function(includeInstance, msg) { var f, obj = { - aId: jspb.Message.getFieldWithDefault(msg, 1, ""), - bId: jspb.Message.getFieldWithDefault(msg, 2, ""), - aIp: jspb.Message.getFieldWithDefault(msg, 3, ""), - bIp: jspb.Message.getFieldWithDefault(msg, 4, "") + vault: (f = msg.getVault()) && proto.polykey.v1.vaults.Vault.toObject(includeInstance, f), + node: (f = msg.getNode()) && polykey_v1_nodes_nodes_pb.Node.toObject(includeInstance, f) }; if (includeInstance) { @@ -1798,23 +1899,23 @@ proto.agentInterface.ConnectionMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.ConnectionMessage} + * @return {!proto.polykey.v1.vaults.PermUnset} */ -proto.agentInterface.ConnectionMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.PermUnset.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.ConnectionMessage; - return proto.agentInterface.ConnectionMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.PermUnset; + return proto.polykey.v1.vaults.PermUnset.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.ConnectionMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.PermUnset} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.ConnectionMessage} + * @return {!proto.polykey.v1.vaults.PermUnset} */ -proto.agentInterface.ConnectionMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.PermUnset.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1822,20 +1923,14 @@ proto.agentInterface.ConnectionMessage.deserializeBinaryFromReader = function(ms var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAId(value); + var value = new proto.polykey.v1.vaults.Vault; + reader.readMessage(value,proto.polykey.v1.vaults.Vault.deserializeBinaryFromReader); + msg.setVault(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setBId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAIp(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setBIp(value); + var value = new polykey_v1_nodes_nodes_pb.Node; + reader.readMessage(value,polykey_v1_nodes_nodes_pb.Node.deserializeBinaryFromReader); + msg.setNode(value); break; default: reader.skipField(); @@ -1850,9 +1945,9 @@ proto.agentInterface.ConnectionMessage.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.ConnectionMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.PermUnset.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.ConnectionMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.PermUnset.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1860,112 +1955,102 @@ proto.agentInterface.ConnectionMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.ConnectionMessage} message + * @param {!proto.polykey.v1.vaults.PermUnset} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.ConnectionMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.PermUnset.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAId(); - if (f.length > 0) { - writer.writeString( + f = message.getVault(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.polykey.v1.vaults.Vault.serializeBinaryToWriter ); } - f = message.getBId(); - if (f.length > 0) { - writer.writeString( + f = message.getNode(); + if (f != null) { + writer.writeMessage( 2, - f - ); - } - f = message.getAIp(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getBIp(); - if (f.length > 0) { - writer.writeString( - 4, - f + f, + polykey_v1_nodes_nodes_pb.Node.serializeBinaryToWriter ); } }; /** - * optional string a_id = 1; - * @return {string} + * optional Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} */ -proto.agentInterface.ConnectionMessage.prototype.getAId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.polykey.v1.vaults.PermUnset.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.vaults.Vault, 1)); }; /** - * @param {string} value - * @return {!proto.agentInterface.ConnectionMessage} returns this - */ -proto.agentInterface.ConnectionMessage.prototype.setAId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.vaults.PermUnset} returns this +*/ +proto.polykey.v1.vaults.PermUnset.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * optional string b_id = 2; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.PermUnset} returns this */ -proto.agentInterface.ConnectionMessage.prototype.getBId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.polykey.v1.vaults.PermUnset.prototype.clearVault = function() { + return this.setVault(undefined); }; /** - * @param {string} value - * @return {!proto.agentInterface.ConnectionMessage} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.agentInterface.ConnectionMessage.prototype.setBId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.polykey.v1.vaults.PermUnset.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional string a_ip = 3; - * @return {string} + * optional polykey.v1.nodes.Node node = 2; + * @return {?proto.polykey.v1.nodes.Node} */ -proto.agentInterface.ConnectionMessage.prototype.getAIp = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.polykey.v1.vaults.PermUnset.prototype.getNode = function() { + return /** @type{?proto.polykey.v1.nodes.Node} */ ( + jspb.Message.getWrapperField(this, polykey_v1_nodes_nodes_pb.Node, 2)); }; /** - * @param {string} value - * @return {!proto.agentInterface.ConnectionMessage} returns this - */ -proto.agentInterface.ConnectionMessage.prototype.setAIp = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + * @param {?proto.polykey.v1.nodes.Node|undefined} value + * @return {!proto.polykey.v1.vaults.PermUnset} returns this +*/ +proto.polykey.v1.vaults.PermUnset.prototype.setNode = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * optional string b_ip = 4; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.PermUnset} returns this */ -proto.agentInterface.ConnectionMessage.prototype.getBIp = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.polykey.v1.vaults.PermUnset.prototype.clearNode = function() { + return this.setNode(undefined); }; /** - * @param {string} value - * @return {!proto.agentInterface.ConnectionMessage} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.agentInterface.ConnectionMessage.prototype.setBIp = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.polykey.v1.vaults.PermUnset.prototype.hasNode = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -1985,8 +2070,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.RelayMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.RelayMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.PermGet.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.PermGet.toObject(opt_includeInstance, this); }; @@ -1995,16 +2080,14 @@ proto.agentInterface.RelayMessage.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.RelayMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.PermGet} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.RelayMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.PermGet.toObject = function(includeInstance, msg) { var f, obj = { - srcId: jspb.Message.getFieldWithDefault(msg, 1, ""), - targetId: jspb.Message.getFieldWithDefault(msg, 2, ""), - egressAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - signature: jspb.Message.getFieldWithDefault(msg, 4, "") + vault: (f = msg.getVault()) && proto.polykey.v1.vaults.Vault.toObject(includeInstance, f), + node: (f = msg.getNode()) && polykey_v1_nodes_nodes_pb.Node.toObject(includeInstance, f) }; if (includeInstance) { @@ -2018,23 +2101,23 @@ proto.agentInterface.RelayMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.RelayMessage} + * @return {!proto.polykey.v1.vaults.PermGet} */ -proto.agentInterface.RelayMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.PermGet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.RelayMessage; - return proto.agentInterface.RelayMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.PermGet; + return proto.polykey.v1.vaults.PermGet.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.RelayMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.PermGet} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.RelayMessage} + * @return {!proto.polykey.v1.vaults.PermGet} */ -proto.agentInterface.RelayMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.PermGet.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2042,20 +2125,14 @@ proto.agentInterface.RelayMessage.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSrcId(value); + var value = new proto.polykey.v1.vaults.Vault; + reader.readMessage(value,proto.polykey.v1.vaults.Vault.deserializeBinaryFromReader); + msg.setVault(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setTargetId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setEgressAddress(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); + var value = new polykey_v1_nodes_nodes_pb.Node; + reader.readMessage(value,polykey_v1_nodes_nodes_pb.Node.deserializeBinaryFromReader); + msg.setNode(value); break; default: reader.skipField(); @@ -2070,9 +2147,9 @@ proto.agentInterface.RelayMessage.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.RelayMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.PermGet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.RelayMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.PermGet.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2080,112 +2157,102 @@ proto.agentInterface.RelayMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.RelayMessage} message + * @param {!proto.polykey.v1.vaults.PermGet} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.RelayMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.PermGet.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSrcId(); - if (f.length > 0) { - writer.writeString( + f = message.getVault(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.polykey.v1.vaults.Vault.serializeBinaryToWriter ); } - f = message.getTargetId(); - if (f.length > 0) { - writer.writeString( + f = message.getNode(); + if (f != null) { + writer.writeMessage( 2, - f - ); - } - f = message.getEgressAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 4, - f + f, + polykey_v1_nodes_nodes_pb.Node.serializeBinaryToWriter ); } }; /** - * optional string src_id = 1; - * @return {string} + * optional Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} */ -proto.agentInterface.RelayMessage.prototype.getSrcId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.polykey.v1.vaults.PermGet.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.vaults.Vault, 1)); }; /** - * @param {string} value - * @return {!proto.agentInterface.RelayMessage} returns this - */ -proto.agentInterface.RelayMessage.prototype.setSrcId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.vaults.PermGet} returns this +*/ +proto.polykey.v1.vaults.PermGet.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * optional string target_id = 2; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.PermGet} returns this */ -proto.agentInterface.RelayMessage.prototype.getTargetId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.polykey.v1.vaults.PermGet.prototype.clearVault = function() { + return this.setVault(undefined); }; /** - * @param {string} value - * @return {!proto.agentInterface.RelayMessage} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.agentInterface.RelayMessage.prototype.setTargetId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.polykey.v1.vaults.PermGet.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional string egress_address = 3; - * @return {string} + * optional polykey.v1.nodes.Node node = 2; + * @return {?proto.polykey.v1.nodes.Node} */ -proto.agentInterface.RelayMessage.prototype.getEgressAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.polykey.v1.vaults.PermGet.prototype.getNode = function() { + return /** @type{?proto.polykey.v1.nodes.Node} */ ( + jspb.Message.getWrapperField(this, polykey_v1_nodes_nodes_pb.Node, 2)); }; /** - * @param {string} value - * @return {!proto.agentInterface.RelayMessage} returns this - */ -proto.agentInterface.RelayMessage.prototype.setEgressAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + * @param {?proto.polykey.v1.nodes.Node|undefined} value + * @return {!proto.polykey.v1.vaults.PermGet} returns this +*/ +proto.polykey.v1.vaults.PermGet.prototype.setNode = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * optional string signature = 4; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.PermGet} returns this */ -proto.agentInterface.RelayMessage.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.polykey.v1.vaults.PermGet.prototype.clearNode = function() { + return this.setNode(undefined); }; /** - * @param {string} value - * @return {!proto.agentInterface.RelayMessage} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.agentInterface.RelayMessage.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.polykey.v1.vaults.PermGet.prototype.hasNode = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -2205,8 +2272,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.NodeAddressMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.NodeAddressMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.Permission.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.Permission.toObject(opt_includeInstance, this); }; @@ -2215,14 +2282,14 @@ proto.agentInterface.NodeAddressMessage.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.NodeAddressMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.Permission} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.NodeAddressMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.Permission.toObject = function(includeInstance, msg) { var f, obj = { - ip: jspb.Message.getFieldWithDefault(msg, 1, ""), - port: jspb.Message.getFieldWithDefault(msg, 2, 0) + nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), + action: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -2236,23 +2303,23 @@ proto.agentInterface.NodeAddressMessage.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.NodeAddressMessage} + * @return {!proto.polykey.v1.vaults.Permission} */ -proto.agentInterface.NodeAddressMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.Permission.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.NodeAddressMessage; - return proto.agentInterface.NodeAddressMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.Permission; + return proto.polykey.v1.vaults.Permission.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.NodeAddressMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.Permission} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.NodeAddressMessage} + * @return {!proto.polykey.v1.vaults.Permission} */ -proto.agentInterface.NodeAddressMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.Permission.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2261,11 +2328,11 @@ proto.agentInterface.NodeAddressMessage.deserializeBinaryFromReader = function(m switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setIp(value); + msg.setNodeId(value); break; case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPort(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAction(value); break; default: reader.skipField(); @@ -2280,9 +2347,9 @@ proto.agentInterface.NodeAddressMessage.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.NodeAddressMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.Permission.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.NodeAddressMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.Permission.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2290,22 +2357,22 @@ proto.agentInterface.NodeAddressMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.NodeAddressMessage} message + * @param {!proto.polykey.v1.vaults.Permission} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.NodeAddressMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.Permission.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIp(); + f = message.getNodeId(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getPort(); - if (f !== 0) { - writer.writeInt32( + f = message.getAction(); + if (f.length > 0) { + writer.writeString( 2, f ); @@ -2314,38 +2381,38 @@ proto.agentInterface.NodeAddressMessage.serializeBinaryToWriter = function(messa /** - * optional string ip = 1; + * optional string node_id = 1; * @return {string} */ -proto.agentInterface.NodeAddressMessage.prototype.getIp = function() { +proto.polykey.v1.vaults.Permission.prototype.getNodeId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agentInterface.NodeAddressMessage} returns this + * @return {!proto.polykey.v1.vaults.Permission} returns this */ -proto.agentInterface.NodeAddressMessage.prototype.setIp = function(value) { +proto.polykey.v1.vaults.Permission.prototype.setNodeId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional int32 port = 2; - * @return {number} + * optional string action = 2; + * @return {string} */ -proto.agentInterface.NodeAddressMessage.prototype.getPort = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.polykey.v1.vaults.Permission.prototype.getAction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.agentInterface.NodeAddressMessage} returns this + * @param {string} value + * @return {!proto.polykey.v1.vaults.Permission} returns this */ -proto.agentInterface.NodeAddressMessage.prototype.setPort = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.polykey.v1.vaults.Permission.prototype.setAction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2365,8 +2432,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.NodeTableMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.NodeTableMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.Version.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.Version.toObject(opt_includeInstance, this); }; @@ -2375,13 +2442,14 @@ proto.agentInterface.NodeTableMessage.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.NodeTableMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.Version} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.NodeTableMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.Version.toObject = function(includeInstance, msg) { var f, obj = { - nodeTableMap: (f = msg.getNodeTableMap()) ? f.toObject(includeInstance, proto.agentInterface.NodeAddressMessage.toObject) : [] + vault: (f = msg.getVault()) && proto.polykey.v1.vaults.Vault.toObject(includeInstance, f), + versionId: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -2395,23 +2463,23 @@ proto.agentInterface.NodeTableMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.NodeTableMessage} + * @return {!proto.polykey.v1.vaults.Version} */ -proto.agentInterface.NodeTableMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.Version.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.NodeTableMessage; - return proto.agentInterface.NodeTableMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.Version; + return proto.polykey.v1.vaults.Version.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.NodeTableMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.Version} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.NodeTableMessage} + * @return {!proto.polykey.v1.vaults.Version} */ -proto.agentInterface.NodeTableMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.Version.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2419,10 +2487,13 @@ proto.agentInterface.NodeTableMessage.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = msg.getNodeTableMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.agentInterface.NodeAddressMessage.deserializeBinaryFromReader, "", new proto.agentInterface.NodeAddressMessage()); - }); + var value = new proto.polykey.v1.vaults.Vault; + reader.readMessage(value,proto.polykey.v1.vaults.Vault.deserializeBinaryFromReader); + msg.setVault(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); break; default: reader.skipField(); @@ -2437,9 +2508,9 @@ proto.agentInterface.NodeTableMessage.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.NodeTableMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.Version.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.NodeTableMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.Version.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2447,39 +2518,83 @@ proto.agentInterface.NodeTableMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.NodeTableMessage} message + * @param {!proto.polykey.v1.vaults.Version} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.NodeTableMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.Version.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodeTableMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.agentInterface.NodeAddressMessage.serializeBinaryToWriter); + f = message.getVault(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.polykey.v1.vaults.Vault.serializeBinaryToWriter + ); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); } }; /** - * map node_table = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} + */ +proto.polykey.v1.vaults.Version.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.vaults.Vault, 1)); +}; + + +/** + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.vaults.Version} returns this +*/ +proto.polykey.v1.vaults.Version.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.Version} returns this + */ +proto.polykey.v1.vaults.Version.prototype.clearVault = function() { + return this.setVault(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.polykey.v1.vaults.Version.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string version_id = 2; + * @return {string} */ -proto.agentInterface.NodeTableMessage.prototype.getNodeTableMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.agentInterface.NodeAddressMessage)); +proto.polykey.v1.vaults.Version.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.agentInterface.NodeTableMessage} returns this + * @param {string} value + * @return {!proto.polykey.v1.vaults.Version} returns this */ -proto.agentInterface.NodeTableMessage.prototype.clearNodeTableMap = function() { - this.getNodeTableMap().clear(); - return this;}; +proto.polykey.v1.vaults.Version.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; @@ -2498,8 +2613,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.ClaimTypeMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.ClaimTypeMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.VersionResult.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.VersionResult.toObject(opt_includeInstance, this); }; @@ -2508,13 +2623,13 @@ proto.agentInterface.ClaimTypeMessage.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.ClaimTypeMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.VersionResult} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.ClaimTypeMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.VersionResult.toObject = function(includeInstance, msg) { var f, obj = { - claimType: jspb.Message.getFieldWithDefault(msg, 1, "") + isLatestVersion: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -2528,23 +2643,23 @@ proto.agentInterface.ClaimTypeMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.ClaimTypeMessage} + * @return {!proto.polykey.v1.vaults.VersionResult} */ -proto.agentInterface.ClaimTypeMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.VersionResult.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.ClaimTypeMessage; - return proto.agentInterface.ClaimTypeMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.VersionResult; + return proto.polykey.v1.vaults.VersionResult.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.ClaimTypeMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.VersionResult} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.ClaimTypeMessage} + * @return {!proto.polykey.v1.vaults.VersionResult} */ -proto.agentInterface.ClaimTypeMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.VersionResult.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2552,8 +2667,8 @@ proto.agentInterface.ClaimTypeMessage.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setClaimType(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsLatestVersion(value); break; default: reader.skipField(); @@ -2568,9 +2683,9 @@ proto.agentInterface.ClaimTypeMessage.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.ClaimTypeMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.VersionResult.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.ClaimTypeMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.VersionResult.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2578,15 +2693,15 @@ proto.agentInterface.ClaimTypeMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.ClaimTypeMessage} message + * @param {!proto.polykey.v1.vaults.VersionResult} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.ClaimTypeMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.VersionResult.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getClaimType(); - if (f.length > 0) { - writer.writeString( + f = message.getIsLatestVersion(); + if (f) { + writer.writeBool( 1, f ); @@ -2595,31 +2710,24 @@ proto.agentInterface.ClaimTypeMessage.serializeBinaryToWriter = function(message /** - * optional string claim_type = 1; - * @return {string} + * optional bool is_latest_version = 1; + * @return {boolean} */ -proto.agentInterface.ClaimTypeMessage.prototype.getClaimType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.polykey.v1.vaults.VersionResult.prototype.getIsLatestVersion = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {string} value - * @return {!proto.agentInterface.ClaimTypeMessage} returns this + * @param {boolean} value + * @return {!proto.polykey.v1.vaults.VersionResult} returns this */ -proto.agentInterface.ClaimTypeMessage.prototype.setClaimType = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.polykey.v1.vaults.VersionResult.prototype.setIsLatestVersion = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.agentInterface.ClaimsMessage.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2635,8 +2743,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.ClaimsMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.ClaimsMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.Log.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.Log.toObject(opt_includeInstance, this); }; @@ -2645,14 +2753,15 @@ proto.agentInterface.ClaimsMessage.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.ClaimsMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.Log} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.ClaimsMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.Log.toObject = function(includeInstance, msg) { var f, obj = { - claimsList: jspb.Message.toObjectList(msg.getClaimsList(), - proto.agentInterface.ClaimMessage.toObject, includeInstance) + vault: (f = msg.getVault()) && proto.polykey.v1.vaults.Vault.toObject(includeInstance, f), + logDepth: jspb.Message.getFieldWithDefault(msg, 3, 0), + commitId: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -2666,23 +2775,23 @@ proto.agentInterface.ClaimsMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.ClaimsMessage} + * @return {!proto.polykey.v1.vaults.Log} */ -proto.agentInterface.ClaimsMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.Log.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.ClaimsMessage; - return proto.agentInterface.ClaimsMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.Log; + return proto.polykey.v1.vaults.Log.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.ClaimsMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.Log} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.ClaimsMessage} + * @return {!proto.polykey.v1.vaults.Log} */ -proto.agentInterface.ClaimsMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.Log.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2690,9 +2799,17 @@ proto.agentInterface.ClaimsMessage.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.agentInterface.ClaimMessage; - reader.readMessage(value,proto.agentInterface.ClaimMessage.deserializeBinaryFromReader); - msg.addClaims(value); + var value = new proto.polykey.v1.vaults.Vault; + reader.readMessage(value,proto.polykey.v1.vaults.Vault.deserializeBinaryFromReader); + msg.setVault(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLogDepth(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCommitId(value); break; default: reader.skipField(); @@ -2707,9 +2824,9 @@ proto.agentInterface.ClaimsMessage.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.ClaimsMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.Log.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.ClaimsMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.Log.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2717,201 +2834,110 @@ proto.agentInterface.ClaimsMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.ClaimsMessage} message + * @param {!proto.polykey.v1.vaults.Log} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.ClaimsMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.Log.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getClaimsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getVault(); + if (f != null) { + writer.writeMessage( 1, f, - proto.agentInterface.ClaimMessage.serializeBinaryToWriter + proto.polykey.v1.vaults.Vault.serializeBinaryToWriter + ); + } + f = message.getLogDepth(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getCommitId(); + if (f.length > 0) { + writer.writeString( + 4, + f ); } }; /** - * repeated ClaimMessage claims = 1; - * @return {!Array} + * optional Vault vault = 1; + * @return {?proto.polykey.v1.vaults.Vault} */ -proto.agentInterface.ClaimsMessage.prototype.getClaimsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.agentInterface.ClaimMessage, 1)); +proto.polykey.v1.vaults.Log.prototype.getVault = function() { + return /** @type{?proto.polykey.v1.vaults.Vault} */ ( + jspb.Message.getWrapperField(this, proto.polykey.v1.vaults.Vault, 1)); }; /** - * @param {!Array} value - * @return {!proto.agentInterface.ClaimsMessage} returns this + * @param {?proto.polykey.v1.vaults.Vault|undefined} value + * @return {!proto.polykey.v1.vaults.Log} returns this */ -proto.agentInterface.ClaimsMessage.prototype.setClaimsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.agentInterface.ClaimMessage=} opt_value - * @param {number=} opt_index - * @return {!proto.agentInterface.ClaimMessage} - */ -proto.agentInterface.ClaimsMessage.prototype.addClaims = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.agentInterface.ClaimMessage, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.agentInterface.ClaimsMessage} returns this - */ -proto.agentInterface.ClaimsMessage.prototype.clearClaimsList = function() { - return this.setClaimsList([]); -}; - - - - - -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.agentInterface.ChainDataMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.ChainDataMessage.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.agentInterface.ChainDataMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agentInterface.ChainDataMessage.toObject = function(includeInstance, msg) { - var f, obj = { - chainDataMap: (f = msg.getChainDataMap()) ? f.toObject(includeInstance, proto.agentInterface.ClaimMessage.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.ChainDataMessage} - */ -proto.agentInterface.ChainDataMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.ChainDataMessage; - return proto.agentInterface.ChainDataMessage.deserializeBinaryFromReader(msg, reader); +proto.polykey.v1.vaults.Log.prototype.setVault = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agentInterface.ChainDataMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.ChainDataMessage} - */ -proto.agentInterface.ChainDataMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getChainDataMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.agentInterface.ClaimMessage.deserializeBinaryFromReader, "", new proto.agentInterface.ClaimMessage()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * Clears the message field making it undefined. + * @return {!proto.polykey.v1.vaults.Log} returns this + */ +proto.polykey.v1.vaults.Log.prototype.clearVault = function() { + return this.setVault(undefined); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.agentInterface.ChainDataMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agentInterface.ChainDataMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.polykey.v1.vaults.Log.prototype.hasVault = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.ChainDataMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int32 log_depth = 3; + * @return {number} */ -proto.agentInterface.ChainDataMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChainDataMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.agentInterface.ClaimMessage.serializeBinaryToWriter); - } +proto.polykey.v1.vaults.Log.prototype.getLogDepth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * map chain_data = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * @param {number} value + * @return {!proto.polykey.v1.vaults.Log} returns this */ -proto.agentInterface.ChainDataMessage.prototype.getChainDataMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.agentInterface.ClaimMessage)); +proto.polykey.v1.vaults.Log.prototype.setLogDepth = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.agentInterface.ChainDataMessage} returns this + * optional string commit_id = 4; + * @return {string} */ -proto.agentInterface.ChainDataMessage.prototype.clearChainDataMap = function() { - this.getChainDataMap().clear(); - return this;}; - +proto.polykey.v1.vaults.Log.prototype.getCommitId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {string} value + * @return {!proto.polykey.v1.vaults.Log} returns this */ -proto.agentInterface.ClaimMessage.repeatedFields_ = [2]; +proto.polykey.v1.vaults.Log.prototype.setCommitId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + @@ -2928,8 +2954,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.ClaimMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.ClaimMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.LogEntry.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.LogEntry.toObject(opt_includeInstance, this); }; @@ -2938,15 +2964,16 @@ proto.agentInterface.ClaimMessage.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.ClaimMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.LogEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.ClaimMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.LogEntry.toObject = function(includeInstance, msg) { var f, obj = { - payload: jspb.Message.getFieldWithDefault(msg, 1, ""), - signaturesList: jspb.Message.toObjectList(msg.getSignaturesList(), - proto.agentInterface.SignatureMessage.toObject, includeInstance) + oid: jspb.Message.getFieldWithDefault(msg, 1, ""), + committer: jspb.Message.getFieldWithDefault(msg, 2, ""), + timeStamp: jspb.Message.getFieldWithDefault(msg, 4, 0), + message: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -2960,23 +2987,23 @@ proto.agentInterface.ClaimMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.ClaimMessage} + * @return {!proto.polykey.v1.vaults.LogEntry} */ -proto.agentInterface.ClaimMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.LogEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.ClaimMessage; - return proto.agentInterface.ClaimMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.LogEntry; + return proto.polykey.v1.vaults.LogEntry.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.ClaimMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.LogEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.ClaimMessage} + * @return {!proto.polykey.v1.vaults.LogEntry} */ -proto.agentInterface.ClaimMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.LogEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2985,12 +3012,19 @@ proto.agentInterface.ClaimMessage.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPayload(value); + msg.setOid(value); break; case 2: - var value = new proto.agentInterface.SignatureMessage; - reader.readMessage(value,proto.agentInterface.SignatureMessage.deserializeBinaryFromReader); - msg.addSignatures(value); + var value = /** @type {string} */ (reader.readString()); + msg.setCommitter(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeStamp(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); break; default: reader.skipField(); @@ -3005,9 +3039,9 @@ proto.agentInterface.ClaimMessage.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.ClaimMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.LogEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.ClaimMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.LogEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3015,83 +3049,112 @@ proto.agentInterface.ClaimMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.ClaimMessage} message + * @param {!proto.polykey.v1.vaults.LogEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.ClaimMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.LogEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPayload(); + f = message.getOid(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getSignaturesList(); + f = message.getCommitter(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 2, - f, - proto.agentInterface.SignatureMessage.serializeBinaryToWriter + f + ); + } + f = message.getTimeStamp(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 3, + f ); } }; /** - * optional string payload = 1; + * optional string oid = 1; * @return {string} */ -proto.agentInterface.ClaimMessage.prototype.getPayload = function() { +proto.polykey.v1.vaults.LogEntry.prototype.getOid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agentInterface.ClaimMessage} returns this + * @return {!proto.polykey.v1.vaults.LogEntry} returns this */ -proto.agentInterface.ClaimMessage.prototype.setPayload = function(value) { +proto.polykey.v1.vaults.LogEntry.prototype.setOid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated SignatureMessage signatures = 2; - * @return {!Array} + * optional string committer = 2; + * @return {string} */ -proto.agentInterface.ClaimMessage.prototype.getSignaturesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.agentInterface.SignatureMessage, 2)); +proto.polykey.v1.vaults.LogEntry.prototype.getCommitter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!Array} value - * @return {!proto.agentInterface.ClaimMessage} returns this -*/ -proto.agentInterface.ClaimMessage.prototype.setSignaturesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + * @param {string} value + * @return {!proto.polykey.v1.vaults.LogEntry} returns this + */ +proto.polykey.v1.vaults.LogEntry.prototype.setCommitter = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 time_stamp = 4; + * @return {number} + */ +proto.polykey.v1.vaults.LogEntry.prototype.getTimeStamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.polykey.v1.vaults.LogEntry} returns this + */ +proto.polykey.v1.vaults.LogEntry.prototype.setTimeStamp = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * @param {!proto.agentInterface.SignatureMessage=} opt_value - * @param {number=} opt_index - * @return {!proto.agentInterface.SignatureMessage} + * optional string message = 3; + * @return {string} */ -proto.agentInterface.ClaimMessage.prototype.addSignatures = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.agentInterface.SignatureMessage, opt_index); +proto.polykey.v1.vaults.LogEntry.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.agentInterface.ClaimMessage} returns this + * @param {string} value + * @return {!proto.polykey.v1.vaults.LogEntry} returns this */ -proto.agentInterface.ClaimMessage.prototype.clearSignaturesList = function() { - return this.setSignaturesList([]); +proto.polykey.v1.vaults.LogEntry.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -3111,8 +3174,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.SignatureMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.SignatureMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.PackChunk.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.PackChunk.toObject(opt_includeInstance, this); }; @@ -3121,14 +3184,13 @@ proto.agentInterface.SignatureMessage.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.SignatureMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.PackChunk} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.SignatureMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.PackChunk.toObject = function(includeInstance, msg) { var f, obj = { - signature: jspb.Message.getFieldWithDefault(msg, 1, ""), - pb_protected: jspb.Message.getFieldWithDefault(msg, 2, "") + chunk: msg.getChunk_asB64() }; if (includeInstance) { @@ -3142,23 +3204,23 @@ proto.agentInterface.SignatureMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.SignatureMessage} + * @return {!proto.polykey.v1.vaults.PackChunk} */ -proto.agentInterface.SignatureMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.PackChunk.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.SignatureMessage; - return proto.agentInterface.SignatureMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.PackChunk; + return proto.polykey.v1.vaults.PackChunk.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.SignatureMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.PackChunk} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.SignatureMessage} + * @return {!proto.polykey.v1.vaults.PackChunk} */ -proto.agentInterface.SignatureMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.PackChunk.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3166,12 +3228,8 @@ proto.agentInterface.SignatureMessage.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setProtected(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChunk(value); break; default: reader.skipField(); @@ -3186,9 +3244,9 @@ proto.agentInterface.SignatureMessage.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.SignatureMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.PackChunk.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.SignatureMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.PackChunk.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3196,62 +3254,61 @@ proto.agentInterface.SignatureMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.SignatureMessage} message + * @param {!proto.polykey.v1.vaults.PackChunk} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.SignatureMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.PackChunk.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignature(); + f = message.getChunk_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } - f = message.getProtected(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } }; /** - * optional string signature = 1; - * @return {string} + * optional bytes chunk = 1; + * @return {!(string|Uint8Array)} */ -proto.agentInterface.SignatureMessage.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.polykey.v1.vaults.PackChunk.prototype.getChunk = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {string} value - * @return {!proto.agentInterface.SignatureMessage} returns this + * optional bytes chunk = 1; + * This is a type-conversion wrapper around `getChunk()` + * @return {string} */ -proto.agentInterface.SignatureMessage.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.polykey.v1.vaults.PackChunk.prototype.getChunk_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChunk())); }; /** - * optional string protected = 2; - * @return {string} + * optional bytes chunk = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChunk()` + * @return {!Uint8Array} */ -proto.agentInterface.SignatureMessage.prototype.getProtected = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.polykey.v1.vaults.PackChunk.prototype.getChunk_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChunk())); }; /** - * @param {string} value - * @return {!proto.agentInterface.SignatureMessage} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.polykey.v1.vaults.PackChunk} returns this */ -proto.agentInterface.SignatureMessage.prototype.setProtected = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.polykey.v1.vaults.PackChunk.prototype.setChunk = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3271,8 +3328,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.NotificationMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.NotificationMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.PackRequest.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.PackRequest.toObject(opt_includeInstance, this); }; @@ -3281,13 +3338,14 @@ proto.agentInterface.NotificationMessage.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.agentInterface.NotificationMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.PackRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.NotificationMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.PackRequest.toObject = function(includeInstance, msg) { var f, obj = { - content: jspb.Message.getFieldWithDefault(msg, 1, "") + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + body: msg.getBody_asB64() }; if (includeInstance) { @@ -3301,23 +3359,23 @@ proto.agentInterface.NotificationMessage.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.NotificationMessage} + * @return {!proto.polykey.v1.vaults.PackRequest} */ -proto.agentInterface.NotificationMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.PackRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.NotificationMessage; - return proto.agentInterface.NotificationMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.PackRequest; + return proto.polykey.v1.vaults.PackRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.NotificationMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.PackRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.NotificationMessage} + * @return {!proto.polykey.v1.vaults.PackRequest} */ -proto.agentInterface.NotificationMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.PackRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3326,7 +3384,11 @@ proto.agentInterface.NotificationMessage.deserializeBinaryFromReader = function( switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setContent(value); + msg.setId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBody(value); break; default: reader.skipField(); @@ -3341,9 +3403,9 @@ proto.agentInterface.NotificationMessage.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.NotificationMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.PackRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.NotificationMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.PackRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3351,40 +3413,89 @@ proto.agentInterface.NotificationMessage.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.NotificationMessage} message + * @param {!proto.polykey.v1.vaults.PackRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.NotificationMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.PackRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContent(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getBody_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } }; /** - * optional string content = 1; + * optional string id = 1; * @return {string} */ -proto.agentInterface.NotificationMessage.prototype.getContent = function() { +proto.polykey.v1.vaults.PackRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agentInterface.NotificationMessage} returns this + * @return {!proto.polykey.v1.vaults.PackRequest} returns this */ -proto.agentInterface.NotificationMessage.prototype.setContent = function(value) { +proto.polykey.v1.vaults.PackRequest.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; +/** + * optional bytes body = 2; + * @return {!(string|Uint8Array)} + */ +proto.polykey.v1.vaults.PackRequest.prototype.getBody = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes body = 2; + * This is a type-conversion wrapper around `getBody()` + * @return {string} + */ +proto.polykey.v1.vaults.PackRequest.prototype.getBody_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBody())); +}; + + +/** + * optional bytes body = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBody()` + * @return {!Uint8Array} + */ +proto.polykey.v1.vaults.PackRequest.prototype.getBody_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBody())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.polykey.v1.vaults.PackRequest} returns this + */ +proto.polykey.v1.vaults.PackRequest.prototype.setBody = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + @@ -3401,8 +3512,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.ClaimIntermediaryMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.ClaimIntermediaryMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.NodePermission.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.NodePermission.toObject(opt_includeInstance, this); }; @@ -3411,14 +3522,14 @@ proto.agentInterface.ClaimIntermediaryMessage.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.ClaimIntermediaryMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.NodePermission} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.ClaimIntermediaryMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.NodePermission.toObject = function(includeInstance, msg) { var f, obj = { - payload: jspb.Message.getFieldWithDefault(msg, 1, ""), - signature: (f = msg.getSignature()) && proto.agentInterface.SignatureMessage.toObject(includeInstance, f) + nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), + vaultId: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -3432,23 +3543,23 @@ proto.agentInterface.ClaimIntermediaryMessage.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.ClaimIntermediaryMessage} + * @return {!proto.polykey.v1.vaults.NodePermission} */ -proto.agentInterface.ClaimIntermediaryMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.NodePermission.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.ClaimIntermediaryMessage; - return proto.agentInterface.ClaimIntermediaryMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.NodePermission; + return proto.polykey.v1.vaults.NodePermission.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.ClaimIntermediaryMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.NodePermission} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.ClaimIntermediaryMessage} + * @return {!proto.polykey.v1.vaults.NodePermission} */ -proto.agentInterface.ClaimIntermediaryMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.NodePermission.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3457,12 +3568,11 @@ proto.agentInterface.ClaimIntermediaryMessage.deserializeBinaryFromReader = func switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPayload(value); + msg.setNodeId(value); break; case 2: - var value = new proto.agentInterface.SignatureMessage; - reader.readMessage(value,proto.agentInterface.SignatureMessage.deserializeBinaryFromReader); - msg.setSignature(value); + var value = /** @type {string} */ (reader.readString()); + msg.setVaultId(value); break; default: reader.skipField(); @@ -3477,9 +3587,9 @@ proto.agentInterface.ClaimIntermediaryMessage.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.ClaimIntermediaryMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.NodePermission.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.ClaimIntermediaryMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.NodePermission.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3487,82 +3597,62 @@ proto.agentInterface.ClaimIntermediaryMessage.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.ClaimIntermediaryMessage} message + * @param {!proto.polykey.v1.vaults.NodePermission} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.ClaimIntermediaryMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.NodePermission.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPayload(); + f = message.getNodeId(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getSignature(); - if (f != null) { - writer.writeMessage( + f = message.getVaultId(); + if (f.length > 0) { + writer.writeString( 2, - f, - proto.agentInterface.SignatureMessage.serializeBinaryToWriter + f ); } }; /** - * optional string payload = 1; + * optional string node_id = 1; * @return {string} */ -proto.agentInterface.ClaimIntermediaryMessage.prototype.getPayload = function() { +proto.polykey.v1.vaults.NodePermission.prototype.getNodeId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agentInterface.ClaimIntermediaryMessage} returns this + * @return {!proto.polykey.v1.vaults.NodePermission} returns this */ -proto.agentInterface.ClaimIntermediaryMessage.prototype.setPayload = function(value) { +proto.polykey.v1.vaults.NodePermission.prototype.setNodeId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional SignatureMessage signature = 2; - * @return {?proto.agentInterface.SignatureMessage} - */ -proto.agentInterface.ClaimIntermediaryMessage.prototype.getSignature = function() { - return /** @type{?proto.agentInterface.SignatureMessage} */ ( - jspb.Message.getWrapperField(this, proto.agentInterface.SignatureMessage, 2)); -}; - - -/** - * @param {?proto.agentInterface.SignatureMessage|undefined} value - * @return {!proto.agentInterface.ClaimIntermediaryMessage} returns this -*/ -proto.agentInterface.ClaimIntermediaryMessage.prototype.setSignature = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.agentInterface.ClaimIntermediaryMessage} returns this + * optional string vault_id = 2; + * @return {string} */ -proto.agentInterface.ClaimIntermediaryMessage.prototype.clearSignature = function() { - return this.setSignature(undefined); +proto.polykey.v1.vaults.NodePermission.prototype.getVaultId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.polykey.v1.vaults.NodePermission} returns this */ -proto.agentInterface.ClaimIntermediaryMessage.prototype.hasSignature = function() { - return jspb.Message.getField(this, 2) != null; +proto.polykey.v1.vaults.NodePermission.prototype.setVaultId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -3582,8 +3672,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agentInterface.CrossSignMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agentInterface.CrossSignMessage.toObject(opt_includeInstance, this); +proto.polykey.v1.vaults.NodePermissionAllowed.prototype.toObject = function(opt_includeInstance) { + return proto.polykey.v1.vaults.NodePermissionAllowed.toObject(opt_includeInstance, this); }; @@ -3592,14 +3682,13 @@ proto.agentInterface.CrossSignMessage.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agentInterface.CrossSignMessage} msg The msg instance to transform. + * @param {!proto.polykey.v1.vaults.NodePermissionAllowed} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.CrossSignMessage.toObject = function(includeInstance, msg) { +proto.polykey.v1.vaults.NodePermissionAllowed.toObject = function(includeInstance, msg) { var f, obj = { - singlySignedClaim: (f = msg.getSinglySignedClaim()) && proto.agentInterface.ClaimIntermediaryMessage.toObject(includeInstance, f), - doublySignedClaim: (f = msg.getDoublySignedClaim()) && proto.agentInterface.ClaimMessage.toObject(includeInstance, f) + permission: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -3613,23 +3702,23 @@ proto.agentInterface.CrossSignMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agentInterface.CrossSignMessage} + * @return {!proto.polykey.v1.vaults.NodePermissionAllowed} */ -proto.agentInterface.CrossSignMessage.deserializeBinary = function(bytes) { +proto.polykey.v1.vaults.NodePermissionAllowed.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agentInterface.CrossSignMessage; - return proto.agentInterface.CrossSignMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.polykey.v1.vaults.NodePermissionAllowed; + return proto.polykey.v1.vaults.NodePermissionAllowed.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agentInterface.CrossSignMessage} msg The message object to deserialize into. + * @param {!proto.polykey.v1.vaults.NodePermissionAllowed} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agentInterface.CrossSignMessage} + * @return {!proto.polykey.v1.vaults.NodePermissionAllowed} */ -proto.agentInterface.CrossSignMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.polykey.v1.vaults.NodePermissionAllowed.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3637,14 +3726,8 @@ proto.agentInterface.CrossSignMessage.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.agentInterface.ClaimIntermediaryMessage; - reader.readMessage(value,proto.agentInterface.ClaimIntermediaryMessage.deserializeBinaryFromReader); - msg.setSinglySignedClaim(value); - break; - case 2: - var value = new proto.agentInterface.ClaimMessage; - reader.readMessage(value,proto.agentInterface.ClaimMessage.deserializeBinaryFromReader); - msg.setDoublySignedClaim(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPermission(value); break; default: reader.skipField(); @@ -3659,9 +3742,9 @@ proto.agentInterface.CrossSignMessage.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agentInterface.CrossSignMessage.prototype.serializeBinary = function() { +proto.polykey.v1.vaults.NodePermissionAllowed.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agentInterface.CrossSignMessage.serializeBinaryToWriter(this, writer); + proto.polykey.v1.vaults.NodePermissionAllowed.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3669,103 +3752,38 @@ proto.agentInterface.CrossSignMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agentInterface.CrossSignMessage} message + * @param {!proto.polykey.v1.vaults.NodePermissionAllowed} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agentInterface.CrossSignMessage.serializeBinaryToWriter = function(message, writer) { +proto.polykey.v1.vaults.NodePermissionAllowed.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSinglySignedClaim(); - if (f != null) { - writer.writeMessage( + f = message.getPermission(); + if (f) { + writer.writeBool( 1, - f, - proto.agentInterface.ClaimIntermediaryMessage.serializeBinaryToWriter - ); - } - f = message.getDoublySignedClaim(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.agentInterface.ClaimMessage.serializeBinaryToWriter + f ); } }; /** - * optional ClaimIntermediaryMessage singly_signed_claim = 1; - * @return {?proto.agentInterface.ClaimIntermediaryMessage} - */ -proto.agentInterface.CrossSignMessage.prototype.getSinglySignedClaim = function() { - return /** @type{?proto.agentInterface.ClaimIntermediaryMessage} */ ( - jspb.Message.getWrapperField(this, proto.agentInterface.ClaimIntermediaryMessage, 1)); -}; - - -/** - * @param {?proto.agentInterface.ClaimIntermediaryMessage|undefined} value - * @return {!proto.agentInterface.CrossSignMessage} returns this -*/ -proto.agentInterface.CrossSignMessage.prototype.setSinglySignedClaim = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.agentInterface.CrossSignMessage} returns this - */ -proto.agentInterface.CrossSignMessage.prototype.clearSinglySignedClaim = function() { - return this.setSinglySignedClaim(undefined); -}; - - -/** - * Returns whether this field is set. + * optional bool permission = 1; * @return {boolean} */ -proto.agentInterface.CrossSignMessage.prototype.hasSinglySignedClaim = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ClaimMessage doubly_signed_claim = 2; - * @return {?proto.agentInterface.ClaimMessage} - */ -proto.agentInterface.CrossSignMessage.prototype.getDoublySignedClaim = function() { - return /** @type{?proto.agentInterface.ClaimMessage} */ ( - jspb.Message.getWrapperField(this, proto.agentInterface.ClaimMessage, 2)); -}; - - -/** - * @param {?proto.agentInterface.ClaimMessage|undefined} value - * @return {!proto.agentInterface.CrossSignMessage} returns this -*/ -proto.agentInterface.CrossSignMessage.prototype.setDoublySignedClaim = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.agentInterface.CrossSignMessage} returns this - */ -proto.agentInterface.CrossSignMessage.prototype.clearDoublySignedClaim = function() { - return this.setDoublySignedClaim(undefined); +proto.polykey.v1.vaults.NodePermissionAllowed.prototype.getPermission = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.polykey.v1.vaults.NodePermissionAllowed} returns this */ -proto.agentInterface.CrossSignMessage.prototype.hasDoublySignedClaim = function() { - return jspb.Message.getField(this, 2) != null; +proto.polykey.v1.vaults.NodePermissionAllowed.prototype.setPermission = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; -goog.object.extend(exports, proto.agentInterface); +goog.object.extend(exports, proto.polykey.v1.vaults); diff --git a/src/proto/schemas/Agent.proto b/src/proto/schemas/Agent.proto deleted file mode 100644 index 260f0c986..000000000 --- a/src/proto/schemas/Agent.proto +++ /dev/null @@ -1,130 +0,0 @@ -syntax = "proto3"; - -package agentInterface; - -service Agent { - - // Echo - rpc Echo(EchoMessage) returns (EchoMessage) {}; - - // Vaults - rpc VaultsGitInfoGet (InfoRequest) returns (stream PackChunk) {}; - rpc VaultsGitPackGet(stream PackChunk) returns (stream PackChunk) {}; - rpc VaultsScan (NodeIdMessage) returns (stream VaultListMessage) {}; - rpc VaultsPermisssionsCheck (VaultPermMessage) returns (PermissionMessage) {} - - // Nodes - rpc NodesClosestLocalNodesGet (NodeIdMessage) returns (NodeTableMessage) {} - rpc NodesClaimsGet (ClaimTypeMessage) returns (ClaimsMessage) {} - rpc NodesChainDataGet (EmptyMessage) returns (ChainDataMessage) {} - rpc NodesHolePunchMessageSend (RelayMessage) returns (EmptyMessage) {} - rpc NodesCrossSignClaim (stream CrossSignMessage) returns (stream CrossSignMessage) {} - - // Notifications - rpc NotificationsSend (NotificationMessage) returns (EmptyMessage) {} -} - -message EmptyMessage {} - -// Echo messages -message EchoMessage { - string challenge = 1; -} - -// Vaults messages -message InfoRequest { - string vault_id = 1; -} - -message PackChunk { - bytes chunk = 1; -} - -message PackRequest { - string id = 1; - bytes body = 2; -} - -message VaultListMessage { - bytes vault = 1; -} - -message VaultPermMessage { - string node_id = 1; - string vault_id = 2; -} - -message PermissionMessage { - bool permission = 1; -} - -//Shared messages -message NodeIdMessage { - string node_id = 1; -} - -//Nodes messages -message ConnectionMessage { - string a_id = 1; - string b_id = 2; - string a_ip = 3; - string b_ip = 4; -} - -message RelayMessage { - string src_id = 1; - string target_id = 2; - string egress_address = 3; - string signature = 4; -} - -message NodeAddressMessage { - string ip = 1; - int32 port = 2; -} - -message NodeTableMessage { - map node_table = 1; -} - -// The specific ClaimType of Claims to get -message ClaimTypeMessage { - string claim_type = 1; -} - -// A list of base64url encoded claims -message ClaimsMessage { - repeated ClaimMessage claims = 1; -} - -// A map of ClaimId -> ClaimEncoded -message ChainDataMessage { - map chain_data = 1; -} - -// The components of a ClaimEncoded type (i.e. a GeneralJWS) for GRPC transport -message ClaimMessage { - string payload = 1; // base64 encoded - repeated SignatureMessage signatures = 2; -} - -message SignatureMessage { - string signature = 1; // base64 encoded - string protected = 2; // base64 encoded ('protected' header field in GeneralJWS) -} - -// Notification messages -message NotificationMessage { - string content = 1; -} - -// Claims messages -message ClaimIntermediaryMessage { - string payload = 1; - SignatureMessage signature = 2; -} - -message CrossSignMessage { - ClaimIntermediaryMessage singly_signed_claim = 1; - ClaimMessage doubly_signed_claim = 2; -} diff --git a/src/proto/schemas/Client.proto b/src/proto/schemas/Client.proto deleted file mode 100644 index aeddd17c1..000000000 --- a/src/proto/schemas/Client.proto +++ /dev/null @@ -1,333 +0,0 @@ -syntax = "proto3"; - -package clientInterface; - -service Client { - rpc Echo(EchoMessage) returns (EchoMessage) {}; - - // Agent - rpc AgentStop(EmptyMessage) returns (EmptyMessage) {}; - - // Session - rpc SessionUnlock (PasswordMessage) returns (SessionTokenMessage) {}; - rpc SessionRefresh (EmptyMessage) returns (SessionTokenMessage) {}; - rpc SessionLockAll (EmptyMessage) returns (StatusMessage) {}; - - // Nodes - rpc NodesAdd(NodeAddressMessage) returns (EmptyMessage) {}; - rpc NodesPing(NodeMessage) returns (StatusMessage) {}; - rpc NodesClaim(NodeClaimMessage) returns (StatusMessage) {}; - rpc NodesFind(NodeMessage) returns (NodeAddressMessage) {}; - - // Keys - rpc KeysKeyPairRoot (EmptyMessage) returns (KeyPairMessage) {}; - rpc KeysKeyPairReset (KeyMessage) returns (EmptyMessage) {}; - rpc KeysKeyPairRenew (KeyMessage) returns (EmptyMessage) {}; - rpc KeysEncrypt (CryptoMessage) returns (CryptoMessage) {}; - rpc KeysDecrypt (CryptoMessage) returns (CryptoMessage) {}; - rpc KeysSign (CryptoMessage) returns (CryptoMessage) {}; - rpc KeysVerify (CryptoMessage) returns (StatusMessage) {}; - rpc KeysPasswordChange (PasswordMessage) returns (EmptyMessage) {}; - rpc KeysCertsGet (EmptyMessage) returns (CertificateMessage) {}; - rpc KeysCertsChainGet (EmptyMessage) returns (stream CertificateMessage) {}; - - // Vaults - rpc VaultsList(EmptyMessage) returns (stream VaultListMessage) {}; - rpc VaultsCreate(VaultMessage) returns (VaultMessage) {}; - rpc VaultsRename(VaultRenameMessage) returns (VaultMessage) {}; - rpc VaultsDelete(VaultMessage) returns (StatusMessage) {}; - rpc VaultsPull(VaultPullMessage) returns (StatusMessage) {}; - rpc VaultsClone(VaultCloneMessage) returns (StatusMessage) {}; - rpc VaultsScan(NodeMessage) returns (stream VaultListMessage) {}; - rpc VaultsSecretsList(VaultMessage) returns (stream SecretMessage) {}; - rpc VaultsSecretsMkdir(VaultMkdirMessage) returns (StatusMessage) {}; - rpc VaultsSecretsStat(VaultMessage) returns (StatMessage) {}; - rpc VaultsSecretsDelete(SecretMessage) returns (StatusMessage) {}; - rpc VaultsSecretsEdit(SecretMessage) returns (StatusMessage) {}; - rpc VaultsSecretsGet(SecretMessage) returns (SecretMessage) {}; - rpc VaultsSecretsRename(SecretRenameMessage) returns (StatusMessage) {}; - rpc VaultsSecretsNew(SecretMessage) returns (StatusMessage) {}; - rpc VaultsSecretsNewDir(SecretDirectoryMessage) returns (StatusMessage) {}; - rpc VaultsPermissionsSet(SetVaultPermMessage) returns (StatusMessage) {}; - rpc VaultsPermissionsUnset(UnsetVaultPermMessage) returns (StatusMessage) {} - rpc VaultsPermissions(GetVaultPermMessage) returns (stream PermissionMessage) {}; - rpc VaultsVersion(VaultsVersionMessage) returns (VaultsVersionResultMessage) {}; - rpc VaultsLog(VaultsLogMessage) returns (stream VaultsLogEntryMessage) {}; - - // Identities - rpc IdentitiesAuthenticate(ProviderMessage) returns (stream ProviderMessage) {}; - rpc IdentitiesTokenPut(TokenSpecificMessage) returns (EmptyMessage) {}; - rpc IdentitiesTokenGet(ProviderMessage) returns (TokenMessage) {}; - rpc IdentitiesTokenDelete(ProviderMessage) returns (EmptyMessage) {}; - rpc IdentitiesProvidersList(EmptyMessage) returns (ProviderMessage) {}; - rpc IdentitiesInfoGet(ProviderMessage) returns (ProviderMessage) {}; - rpc IdentitiesInfoGetConnected(ProviderSearchMessage) returns (stream IdentityInfoMessage) {}; - rpc IdentitiesClaim(ProviderMessage) returns (EmptyMessage) {}; - - // Gestalts - rpc GestaltsGestaltList(EmptyMessage) returns (stream GestaltMessage) {}; - rpc GestaltsGestaltGetByNode(NodeMessage) returns (GestaltGraphMessage) {}; - rpc GestaltsGestaltGetByIdentity(ProviderMessage) returns (GestaltGraphMessage) {}; - rpc GestaltsDiscoveryByNode(NodeMessage) returns (EmptyMessage) {}; - rpc GestaltsDiscoveryByIdentity(ProviderMessage) returns (EmptyMessage) {}; - rpc GestaltsActionsGetByNode(NodeMessage) returns (ActionsMessage) {}; - rpc GestaltsActionsGetByIdentity(ProviderMessage) returns (ActionsMessage) {}; - rpc GestaltsActionsSetByNode(SetActionsMessage) returns (EmptyMessage) {}; - rpc GestaltsActionsSetByIdentity(SetActionsMessage) returns (EmptyMessage) {}; - rpc GestaltsActionsUnsetByNode(SetActionsMessage) returns (EmptyMessage) {}; - rpc GestaltsActionsUnsetByIdentity(SetActionsMessage) returns (EmptyMessage) {}; - - // Notifications - rpc NotificationsSend(NotificationsSendMessage) returns (EmptyMessage) {}; - rpc NotificationsRead(NotificationsReadMessage) returns (NotificationsListMessage) {}; - rpc NotificationsClear(EmptyMessage) returns (EmptyMessage) {}; -} - -message EmptyMessage {} - -message StatusMessage { - bool success = 1; -} - -message EchoMessage { - string challenge = 1; -} - -// Session - -message PasswordMessage { - oneof password_or_file{ - string password = 1; - string password_file = 2; - } -} - -message SessionTokenMessage { - string token = 1; -} - -// Vaults - -message VaultListMessage { - string vault_name = 1; - string vault_id = 2; -} - -message VaultMessage { - string name_or_Id = 1; -} - -message VaultRenameMessage { - VaultMessage vault = 1; - string new_name = 2; -} - -message VaultMkdirMessage { - VaultMessage vault = 1; - string dir_name = 2; - bool recursive = 3; -} - -message VaultPullMessage { - VaultMessage vault = 1; - NodeMessage node = 2; -} - -message VaultCloneMessage { - VaultMessage vault = 1; - NodeMessage node = 2; -} - -message SecretRenameMessage { - SecretMessage old_secret = 1; - string new_name = 2; -} - -message SecretMessage { - VaultMessage vault = 1; - string secret_name = 2; - bytes secret_content = 3; -} - -message SecretDirectoryMessage { - VaultMessage vault = 1; - string secret_directory = 2; -} - -message StatMessage { - string stats = 1; -} - -message SetVaultPermMessage { - VaultMessage vault = 1; - NodeMessage node = 2; -} - -message UnsetVaultPermMessage { - VaultMessage vault = 1; - NodeMessage node = 2; -} - -message GetVaultPermMessage { - VaultMessage vault = 1; - NodeMessage node = 2; -} - -message PermissionMessage { - string node_id = 1; - string action = 2; -} - -message VaultsVersionMessage { - VaultMessage vault = 1; - string version_id = 2; -} - -message VaultsVersionResultMessage { - bool is_latest_version = 1; -} - -message VaultsLogMessage { - VaultMessage vault = 1; - int32 log_depth = 3; - string commit_id = 4; -} - -message VaultsLogEntryMessage { - string oid = 1; - string committer = 2; - uint64 time_stamp = 4; - string message = 3; -} - -// Nodes - -message NodeMessage { - string node_id = 1; -} - -message NodeAddressMessage { - string node_id = 1; - string host = 2; - int32 port = 3; -} - -message NodeClaimMessage { - string node_id = 1; - bool force_invite = 2; -} - -// Keys - -message CryptoMessage { - string data = 1; - string signature = 2; -} - -message KeyMessage { - string name = 1; - string key = 2; -} - -message KeyPairMessage { - string public = 1; - string private = 2; -} - -message CertificateMessage { - string cert = 1; -} - - -// Identities - -message ProviderMessage { - string provider_id = 1; - string message = 2; -} - -message TokenSpecificMessage { - ProviderMessage provider = 1; - string token = 2; -} - -message TokenMessage { - string token = 1; -} - -message ProviderSearchMessage { - ProviderMessage provider = 1; - repeated string search_term = 2; -} - -message IdentityInfoMessage { - ProviderMessage provider = 1; - string name = 3; - string email = 4; - string url = 5; -} - -// Gestalts - -message GestaltMessage { - string name = 1; -} - -message GestaltGraphMessage { - string gestalt_graph = 1; -} - -message GestaltTrustMessage { - string provider = 1; - string name = 2; - bool set = 3; -} - -// Permissions -message ActionsMessage { - repeated string action = 1; -} - -message SetActionsMessage { - oneof node_or_provider { - NodeMessage node = 1; - ProviderMessage identity = 2; - } - string action = 3; -} - -// Notifications -message NotificationsMessage { - oneof data { - GeneralTypeMessage general = 1; - string gestalt_invite = 2; - VaultShareTypeMessage vault_share = 3; - }; - string sender_id = 4; - bool is_read = 5; -} - -message NotificationsSendMessage { - string receiver_id = 1; - GeneralTypeMessage data = 2; -} - -message NotificationsReadMessage { - bool unread = 1; - string number = 2; - string order = 3; -} - -message NotificationsListMessage { - repeated NotificationsMessage notification = 1; -} - -message GeneralTypeMessage { - string message = 1; -} - -message VaultShareTypeMessage { - string vault_id = 1; - string vault_name = 2; - repeated string actions = 3; -} diff --git a/src/proto/schemas/Test.proto b/src/proto/schemas/Test.proto deleted file mode 100644 index ba2eedff3..000000000 --- a/src/proto/schemas/Test.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; - -package testInterface; - -service Test { - rpc Unary(EchoMessage) returns (EchoMessage) {}; - rpc ServerStream(EchoMessage) returns (stream EchoMessage) {}; - rpc ClientStream(stream EchoMessage) returns (EchoMessage) {}; - rpc DuplexStream(stream EchoMessage) returns (stream EchoMessage) {}; -} - -message EchoMessage { - string challenge = 1; -} diff --git a/src/proto/schemas/google/protobuf/any.proto b/src/proto/schemas/google/protobuf/any.proto new file mode 100644 index 000000000..6ed8a23cf --- /dev/null +++ b/src/proto/schemas/google/protobuf/any.proto @@ -0,0 +1,158 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "google.golang.org/protobuf/types/known/anypb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +message Any { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; +} diff --git a/src/proto/schemas/google/protobuf/descriptor.proto b/src/proto/schemas/google/protobuf/descriptor.proto new file mode 100644 index 000000000..156e410ae --- /dev/null +++ b/src/proto/schemas/google/protobuf/descriptor.proto @@ -0,0 +1,911 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + + +syntax = "proto2"; + +package google.protobuf; + +option go_package = "google.golang.org/protobuf/types/descriptorpb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DescriptorProtos"; +option csharp_namespace = "Google.Protobuf.Reflection"; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// descriptor.proto must be optimized for speed because reflection-based +// algorithms don't work during bootstrapping. +option optimize_for = SPEED; + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +message FileDescriptorSet { + repeated FileDescriptorProto file = 1; +} + +// Describes a complete .proto file. +message FileDescriptorProto { + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. + + // Names of files imported by this file. + repeated string dependency = 3; + // Indexes of the public imported files in the dependency list above. + repeated int32 public_dependency = 10; + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + repeated int32 weak_dependency = 11; + + // All top-level definitions in this file. + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated ServiceDescriptorProto service = 6; + repeated FieldDescriptorProto extension = 7; + + optional FileOptions options = 8; + + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + optional SourceCodeInfo source_code_info = 9; + + // The syntax of the proto file. + // The supported values are "proto2" and "proto3". + optional string syntax = 12; +} + +// Describes a message type. +message DescriptorProto { + optional string name = 1; + + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + + message ExtensionRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + + optional ExtensionRangeOptions options = 3; + } + repeated ExtensionRange extension_range = 5; + + repeated OneofDescriptorProto oneof_decl = 8; + + optional MessageOptions options = 7; + + // Range of reserved tag numbers. Reserved tag numbers may not be used by + // fields or extension ranges in the same message. Reserved ranges may + // not overlap. + message ReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + } + repeated ReservedRange reserved_range = 9; + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + repeated string reserved_name = 10; +} + +message ExtensionRangeOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// Describes a field within a message. +message FieldDescriptorProto { + enum Type { + // 0 is reserved for errors. + // Order is weird for historical reasons. + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + // Tag-delimited aggregate. + // Group type is deprecated and not supported in proto3. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; // Length-delimited aggregate. + + // New in version 2. + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + } + + enum Label { + // 0 is reserved for errors + LABEL_OPTIONAL = 1; + LABEL_REQUIRED = 2; + LABEL_REPEATED = 3; + } + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + optional Type type = 5; + + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + optional string type_name = 6; + + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + optional string extendee = 2; + + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + // TODO(kenton): Base-64 encode? + optional string default_value = 7; + + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + optional int32 oneof_index = 9; + + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + optional string json_name = 10; + + optional FieldOptions options = 8; + + // If true, this is a proto3 "optional". When a proto3 field is optional, it + // tracks presence regardless of field type. + // + // When proto3_optional is true, this field must be belong to a oneof to + // signal to old proto3 clients that presence is tracked for this field. This + // oneof is known as a "synthetic" oneof, and this field must be its sole + // member (each proto3 optional field gets its own synthetic oneof). Synthetic + // oneofs exist in the descriptor only, and do not generate any API. Synthetic + // oneofs must be ordered after all "real" oneofs. + // + // For message fields, proto3_optional doesn't create any semantic change, + // since non-repeated message fields always track presence. However it still + // indicates the semantic detail of whether the user wrote "optional" or not. + // This can be useful for round-tripping the .proto file. For consistency we + // give message fields a synthetic oneof also, even though it is not required + // to track presence. This is especially important because the parser can't + // tell if a field is a message or an enum, so it must always create a + // synthetic oneof. + // + // Proto2 optional fields do not set this flag, because they already indicate + // optional with `LABEL_OPTIONAL`. + optional bool proto3_optional = 17; +} + +// Describes a oneof. +message OneofDescriptorProto { + optional string name = 1; + optional OneofOptions options = 2; +} + +// Describes an enum type. +message EnumDescriptorProto { + optional string name = 1; + + repeated EnumValueDescriptorProto value = 2; + + optional EnumOptions options = 3; + + // Range of reserved numeric values. Reserved values may not be used by + // entries in the same enum. Reserved ranges may not overlap. + // + // Note that this is distinct from DescriptorProto.ReservedRange in that it + // is inclusive such that it can appropriately represent the entire int32 + // domain. + message EnumReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Inclusive. + } + + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + repeated EnumReservedRange reserved_range = 4; + + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + repeated string reserved_name = 5; +} + +// Describes a value within an enum. +message EnumValueDescriptorProto { + optional string name = 1; + optional int32 number = 2; + + optional EnumValueOptions options = 3; +} + +// Describes a service. +message ServiceDescriptorProto { + optional string name = 1; + repeated MethodDescriptorProto method = 2; + + optional ServiceOptions options = 3; +} + +// Describes a method of a service. +message MethodDescriptorProto { + optional string name = 1; + + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + optional string input_type = 2; + optional string output_type = 3; + + optional MethodOptions options = 4; + + // Identifies if client streams multiple client messages + optional bool client_streaming = 5 [default = false]; + // Identifies if server streams multiple server messages + optional bool server_streaming = 6 [default = false]; +} + + +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + +message FileOptions { + + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + optional string java_package = 1; + + + // Controls the name of the wrapper Java class generated for the .proto file. + // That class will always contain the .proto file's getDescriptor() method as + // well as any top-level extensions defined in the .proto file. + // If java_multiple_files is disabled, then all the other classes from the + // .proto file will be nested inside the single wrapper outer class. + optional string java_outer_classname = 8; + + // If enabled, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the wrapper class + // named by java_outer_classname. However, the wrapper class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + optional bool java_multiple_files = 10 [default = false]; + + // This option does nothing. + optional bool java_generate_equals_and_hash = 20 [deprecated=true]; + + // If set true, then the Java2 code generator will generate code that + // throws an exception whenever an attempt is made to assign a non-UTF-8 + // byte sequence to a string field. + // Message reflection will do the same. + // However, an extension field still accepts non-UTF-8 byte sequences. + // This option has no effect on when used with the lite runtime. + optional bool java_string_check_utf8 = 27 [default = false]; + + + // Generated classes can be optimized for speed or code size. + enum OptimizeMode { + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + } + optional OptimizeMode optimize_for = 9 [default = SPEED]; + + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + optional string go_package = 11; + + + + + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + optional bool cc_generic_services = 16 [default = false]; + optional bool java_generic_services = 17 [default = false]; + optional bool py_generic_services = 18 [default = false]; + optional bool php_generic_services = 42 [default = false]; + + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + optional bool deprecated = 23 [default = false]; + + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + optional bool cc_enable_arenas = 31 [default = true]; + + + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + optional string objc_class_prefix = 36; + + // Namespace for generated classes; defaults to the package. + optional string csharp_namespace = 37; + + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + optional string swift_prefix = 39; + + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + optional string php_class_prefix = 40; + + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + optional string php_namespace = 41; + + // Use this option to change the namespace of php generated metadata classes. + // Default is empty. When this option is empty, the proto file name will be + // used for determining the namespace. + optional string php_metadata_namespace = 44; + + // Use this option to change the package of ruby generated classes. Default + // is empty. When this option is not set, the package name will be used for + // determining the ruby package. + optional string ruby_package = 45; + + + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. + // See the documentation for the "Options" section above. + extensions 1000 to max; + + reserved 38; +} + +message MessageOptions { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + optional bool message_set_wire_format = 1 [default = false]; + + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + optional bool no_standard_descriptor_accessor = 2 [default = false]; + + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + optional bool deprecated = 3 [default = false]; + + reserved 4, 5, 6; + + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementations still need to work as + // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + optional bool map_entry = 7; + + reserved 8; // javalite_serializable + reserved 9; // javanano_as_lite + + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message FieldOptions { + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is not yet implemented in the open source + // release -- sorry, we'll try to include it in a future version! + optional CType ctype = 1 [default = STRING]; + enum CType { + // Default mode. + STRING = 0; + + CORD = 1; + + STRING_PIECE = 2; + } + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. + optional bool packed = 2; + + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. + optional JSType jstype = 6 [default = JS_NORMAL]; + enum JSType { + // Use the default type. + JS_NORMAL = 0; + + // Use JavaScript strings. + JS_STRING = 1; + + // Use JavaScript numbers. + JS_NUMBER = 2; + } + + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // + // Note that implementations may choose not to check required fields within + // a lazy sub-message. That is, calling IsInitialized() on the outer message + // may return true even if the inner message has missing required fields. + // This is necessary because otherwise the inner message would have to be + // parsed in order to perform the check, defeating the purpose of lazy + // parsing. An implementation which chooses not to check required fields + // must be consistent about it. That is, for any particular sub-message, the + // implementation must either *always* check its required fields, or *never* + // check its required fields, regardless of whether or not the message has + // been parsed. + optional bool lazy = 5 [default = false]; + + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + optional bool deprecated = 3 [default = false]; + + // For Google-internal migration only. Do not use. + optional bool weak = 10 [default = false]; + + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; + + reserved 4; // removed jtype +} + +message OneofOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumOptions { + + // Set this option to true to allow mapping different tag names to the same + // value. + optional bool allow_alias = 2; + + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + optional bool deprecated = 3 [default = false]; + + reserved 5; // javanano_as_lite + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumValueOptions { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + optional bool deprecated = 1 [default = false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message ServiceOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + optional bool deprecated = 33 [default = false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message MethodOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + optional bool deprecated = 33 [default = false]; + + // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + // or neither? HTTP based RPC implementation may choose GET verb for safe + // methods, and PUT verb for idempotent methods instead of the default POST. + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0; + NO_SIDE_EFFECTS = 1; // implies idempotent + IDEMPOTENT = 2; // idempotent, but may have side effects + } + optional IdempotencyLevel idempotency_level = 34 + [default = IDEMPOTENCY_UNKNOWN]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +message UninterpretedOption { + // The name of the uninterpreted option. Each string represents a segment in + // a dot-separated name. is_extension is true iff a segment represents an + // extension (denoted with parentheses in options specs in .proto files). + // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents + // "foo.(bar.baz).qux". + message NamePart { + required string name_part = 1; + required bool is_extension = 2; + } + repeated NamePart name = 2; + + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; +} + +// =================================================================== +// Optional source code info + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +message SourceCodeInfo { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendant. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + repeated Location location = 1; + message Location { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition. For + // example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + repeated int32 path = 1 [packed = true]; + + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + repeated int32 span = 2 [packed = true]; + + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to qux. + // // + // // Another line attached to qux. + // optional double qux = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to qux or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + optional string leading_comments = 3; + optional string trailing_comments = 4; + repeated string leading_detached_comments = 6; + } +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +message GeneratedCodeInfo { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + repeated Annotation annotation = 1; + message Annotation { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + repeated int32 path = 1 [packed = true]; + + // Identifies the filesystem path to the original source .proto. + optional string source_file = 2; + + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + optional int32 begin = 3; + + // Identifies the ending offset in bytes in the generated code that + // relates to the identified offset. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + optional int32 end = 4; + } +} diff --git a/src/proto/schemas/google/protobuf/duration.proto b/src/proto/schemas/google/protobuf/duration.proto new file mode 100644 index 000000000..81c3e369f --- /dev/null +++ b/src/proto/schemas/google/protobuf/duration.proto @@ -0,0 +1,116 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "google.golang.org/protobuf/types/known/durationpb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DurationProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// A Duration represents a signed, fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". It is related to Timestamp in that the difference between +// two Timestamp values is a Duration and it can be added or subtracted +// from a Timestamp. Range is approximately +-10,000 years. +// +// # Examples +// +// Example 1: Compute Duration from two Timestamps in pseudo code. +// +// Timestamp start = ...; +// Timestamp end = ...; +// Duration duration = ...; +// +// duration.seconds = end.seconds - start.seconds; +// duration.nanos = end.nanos - start.nanos; +// +// if (duration.seconds < 0 && duration.nanos > 0) { +// duration.seconds += 1; +// duration.nanos -= 1000000000; +// } else if (duration.seconds > 0 && duration.nanos < 0) { +// duration.seconds -= 1; +// duration.nanos += 1000000000; +// } +// +// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +// +// Timestamp start = ...; +// Duration duration = ...; +// Timestamp end = ...; +// +// end.seconds = start.seconds + duration.seconds; +// end.nanos = start.nanos + duration.nanos; +// +// if (end.nanos < 0) { +// end.seconds -= 1; +// end.nanos += 1000000000; +// } else if (end.nanos >= 1000000000) { +// end.seconds += 1; +// end.nanos -= 1000000000; +// } +// +// Example 3: Compute Duration from datetime.timedelta in Python. +// +// td = datetime.timedelta(days=3, minutes=10) +// duration = Duration() +// duration.FromTimedelta(td) +// +// # JSON Mapping +// +// In JSON format, the Duration type is encoded as a string rather than an +// object, where the string ends in the suffix "s" (indicating seconds) and +// is preceded by the number of seconds, with nanoseconds expressed as +// fractional seconds. For example, 3 seconds with 0 nanoseconds should be +// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should +// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 +// microsecond should be expressed in JSON format as "3.000001s". +// +// +message Duration { + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. Note: these bounds are computed from: + // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + int64 seconds = 1; + + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + int32 nanos = 2; +} diff --git a/src/proto/schemas/google/protobuf/empty.proto b/src/proto/schemas/google/protobuf/empty.proto new file mode 100644 index 000000000..5f992de94 --- /dev/null +++ b/src/proto/schemas/google/protobuf/empty.proto @@ -0,0 +1,52 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "google.golang.org/protobuf/types/known/emptypb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "EmptyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// A generic empty message that you can re-use to avoid defining duplicated +// empty messages in your APIs. A typical example is to use it as the request +// or the response type of an API method. For instance: +// +// service Foo { +// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +// } +// +// The JSON representation for `Empty` is empty JSON object `{}`. +message Empty {} diff --git a/src/proto/schemas/google/protobuf/field_mask.proto b/src/proto/schemas/google/protobuf/field_mask.proto new file mode 100644 index 000000000..6b5104f18 --- /dev/null +++ b/src/proto/schemas/google/protobuf/field_mask.proto @@ -0,0 +1,245 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "FieldMaskProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option go_package = "google.golang.org/protobuf/types/known/fieldmaskpb"; +option cc_enable_arenas = true; + +// `FieldMask` represents a set of symbolic field paths, for example: +// +// paths: "f.a" +// paths: "f.b.d" +// +// Here `f` represents a field in some root message, `a` and `b` +// fields in the message found in `f`, and `d` a field found in the +// message in `f.b`. +// +// Field masks are used to specify a subset of fields that should be +// returned by a get operation or modified by an update operation. +// Field masks also have a custom JSON encoding (see below). +// +// # Field Masks in Projections +// +// When used in the context of a projection, a response message or +// sub-message is filtered by the API to only contain those fields as +// specified in the mask. For example, if the mask in the previous +// example is applied to a response message as follows: +// +// f { +// a : 22 +// b { +// d : 1 +// x : 2 +// } +// y : 13 +// } +// z: 8 +// +// The result will not contain specific values for fields x,y and z +// (their value will be set to the default, and omitted in proto text +// output): +// +// +// f { +// a : 22 +// b { +// d : 1 +// } +// } +// +// A repeated field is not allowed except at the last position of a +// paths string. +// +// If a FieldMask object is not present in a get operation, the +// operation applies to all fields (as if a FieldMask of all fields +// had been specified). +// +// Note that a field mask does not necessarily apply to the +// top-level response message. In case of a REST get operation, the +// field mask applies directly to the response, but in case of a REST +// list operation, the mask instead applies to each individual message +// in the returned resource list. In case of a REST custom method, +// other definitions may be used. Where the mask applies will be +// clearly documented together with its declaration in the API. In +// any case, the effect on the returned resource/resources is required +// behavior for APIs. +// +// # Field Masks in Update Operations +// +// A field mask in update operations specifies which fields of the +// targeted resource are going to be updated. The API is required +// to only change the values of the fields as specified in the mask +// and leave the others untouched. If a resource is passed in to +// describe the updated values, the API ignores the values of all +// fields not covered by the mask. +// +// If a repeated field is specified for an update operation, new values will +// be appended to the existing repeated field in the target resource. Note that +// a repeated field is only allowed in the last position of a `paths` string. +// +// If a sub-message is specified in the last position of the field mask for an +// update operation, then new value will be merged into the existing sub-message +// in the target resource. +// +// For example, given the target message: +// +// f { +// b { +// d: 1 +// x: 2 +// } +// c: [1] +// } +// +// And an update message: +// +// f { +// b { +// d: 10 +// } +// c: [2] +// } +// +// then if the field mask is: +// +// paths: ["f.b", "f.c"] +// +// then the result will be: +// +// f { +// b { +// d: 10 +// x: 2 +// } +// c: [1, 2] +// } +// +// An implementation may provide options to override this default behavior for +// repeated and message fields. +// +// In order to reset a field's value to the default, the field must +// be in the mask and set to the default value in the provided resource. +// Hence, in order to reset all fields of a resource, provide a default +// instance of the resource and set all fields in the mask, or do +// not provide a mask as described below. +// +// If a field mask is not present on update, the operation applies to +// all fields (as if a field mask of all fields has been specified). +// Note that in the presence of schema evolution, this may mean that +// fields the client does not know and has therefore not filled into +// the request will be reset to their default. If this is unwanted +// behavior, a specific service may require a client to always specify +// a field mask, producing an error if not. +// +// As with get operations, the location of the resource which +// describes the updated values in the request message depends on the +// operation kind. In any case, the effect of the field mask is +// required to be honored by the API. +// +// ## Considerations for HTTP REST +// +// The HTTP kind of an update operation which uses a field mask must +// be set to PATCH instead of PUT in order to satisfy HTTP semantics +// (PUT must only be used for full updates). +// +// # JSON Encoding of Field Masks +// +// In JSON, a field mask is encoded as a single string where paths are +// separated by a comma. Fields name in each path are converted +// to/from lower-camel naming conventions. +// +// As an example, consider the following message declarations: +// +// message Profile { +// User user = 1; +// Photo photo = 2; +// } +// message User { +// string display_name = 1; +// string address = 2; +// } +// +// In proto a field mask for `Profile` may look as such: +// +// mask { +// paths: "user.display_name" +// paths: "photo" +// } +// +// In JSON, the same mask is represented as below: +// +// { +// mask: "user.displayName,photo" +// } +// +// # Field Masks and Oneof Fields +// +// Field masks treat fields in oneofs just as regular fields. Consider the +// following message: +// +// message SampleMessage { +// oneof test_oneof { +// string name = 4; +// SubMessage sub_message = 9; +// } +// } +// +// The field mask can be: +// +// mask { +// paths: "name" +// } +// +// Or: +// +// mask { +// paths: "sub_message" +// } +// +// Note that oneof type names ("test_oneof" in this case) cannot be used in +// paths. +// +// ## Field Mask Verification +// +// The implementation of any API method which has a FieldMask type field in the +// request should verify the included field paths, and return an +// `INVALID_ARGUMENT` error if any path is unmappable. +message FieldMask { + // The set of field mask paths. + repeated string paths = 1; +} diff --git a/src/proto/schemas/google/protobuf/struct.proto b/src/proto/schemas/google/protobuf/struct.proto new file mode 100644 index 000000000..0ac843ca0 --- /dev/null +++ b/src/proto/schemas/google/protobuf/struct.proto @@ -0,0 +1,95 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "google.golang.org/protobuf/types/known/structpb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "StructProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +message Struct { + // Unordered map of dynamically typed values. + map fields = 1; +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of these +// variants. Absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +message Value { + // The kind of value. + oneof kind { + // Represents a null value. + NullValue null_value = 1; + // Represents a double value. + double number_value = 2; + // Represents a string value. + string string_value = 3; + // Represents a boolean value. + bool bool_value = 4; + // Represents a structured value. + Struct struct_value = 5; + // Represents a repeated `Value`. + ListValue list_value = 6; + } +} + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +enum NullValue { + // Null value. + NULL_VALUE = 0; +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +message ListValue { + // Repeated field of dynamically typed values. + repeated Value values = 1; +} diff --git a/src/proto/schemas/google/protobuf/timestamp.proto b/src/proto/schemas/google/protobuf/timestamp.proto new file mode 100644 index 000000000..3b2df6d91 --- /dev/null +++ b/src/proto/schemas/google/protobuf/timestamp.proto @@ -0,0 +1,147 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "google.golang.org/protobuf/types/known/timestamppb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "TimestampProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// A Timestamp represents a point in time independent of any time zone or local +// calendar, encoded as a count of seconds and fractions of seconds at +// nanosecond resolution. The count is relative to an epoch at UTC midnight on +// January 1, 1970, in the proleptic Gregorian calendar which extends the +// Gregorian calendar backwards to year one. +// +// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +// second table is needed for interpretation, using a [24-hour linear +// smear](https://developers.google.com/time/smear). +// +// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +// restricting to that range, we ensure that we can convert to and from [RFC +// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. +// +// # Examples +// +// Example 1: Compute Timestamp from POSIX `time()`. +// +// Timestamp timestamp; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// +// Example 5: Compute Timestamp from Java `Instant.now()`. +// +// Instant now = Instant.now(); +// +// Timestamp timestamp = +// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) +// .setNanos(now.getNano()).build(); +// +// +// Example 6: Compute Timestamp from current time in Python. +// +// timestamp = Timestamp() +// timestamp.GetCurrentTime() +// +// # JSON Mapping +// +// In JSON format, the Timestamp type is encoded as a string in the +// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +// where {year} is always expressed using four digits while {month}, {day}, +// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +// is required. A proto3 JSON serializer should always use UTC (as indicated by +// "Z") when printing the Timestamp type and a proto3 JSON parser should be +// able to accept both UTC and other timezones (as indicated by an offset). +// +// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +// 01:30 UTC on January 15, 2017. +// +// In JavaScript, one can convert a Date object to this format using the +// standard +// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) +// method. In Python, a standard `datetime.datetime` object can be converted +// to this format using +// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D +// ) to obtain a formatter capable of generating timestamps in this format. +// +// +message Timestamp { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + int64 seconds = 1; + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + int32 nanos = 2; +} diff --git a/src/proto/schemas/google/protobuf/wrappers.proto b/src/proto/schemas/google/protobuf/wrappers.proto new file mode 100644 index 000000000..d49dd53c8 --- /dev/null +++ b/src/proto/schemas/google/protobuf/wrappers.proto @@ -0,0 +1,123 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Wrappers for primitive (non-message) types. These types are useful +// for embedding primitives in the `google.protobuf.Any` type and for places +// where we need to distinguish between the absence of a primitive +// typed field and its default value. +// +// These wrappers have no meaningful use within repeated fields as they lack +// the ability to detect presence on individual elements. +// These wrappers have no meaningful use within a map or a oneof since +// individual entries of a map or fields of a oneof can already detect presence. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "google.golang.org/protobuf/types/known/wrapperspb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "WrappersProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// Wrapper message for `double`. +// +// The JSON representation for `DoubleValue` is JSON number. +message DoubleValue { + // The double value. + double value = 1; +} + +// Wrapper message for `float`. +// +// The JSON representation for `FloatValue` is JSON number. +message FloatValue { + // The float value. + float value = 1; +} + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +message Int64Value { + // The int64 value. + int64 value = 1; +} + +// Wrapper message for `uint64`. +// +// The JSON representation for `UInt64Value` is JSON string. +message UInt64Value { + // The uint64 value. + uint64 value = 1; +} + +// Wrapper message for `int32`. +// +// The JSON representation for `Int32Value` is JSON number. +message Int32Value { + // The int32 value. + int32 value = 1; +} + +// Wrapper message for `uint32`. +// +// The JSON representation for `UInt32Value` is JSON number. +message UInt32Value { + // The uint32 value. + uint32 value = 1; +} + +// Wrapper message for `bool`. +// +// The JSON representation for `BoolValue` is JSON `true` and `false`. +message BoolValue { + // The bool value. + bool value = 1; +} + +// Wrapper message for `string`. +// +// The JSON representation for `StringValue` is JSON string. +message StringValue { + // The string value. + string value = 1; +} + +// Wrapper message for `bytes`. +// +// The JSON representation for `BytesValue` is JSON string. +message BytesValue { + // The bytes value. + bytes value = 1; +} diff --git a/src/proto/schemas/polykey/v1/agent_service.proto b/src/proto/schemas/polykey/v1/agent_service.proto new file mode 100644 index 000000000..5c27703ed --- /dev/null +++ b/src/proto/schemas/polykey/v1/agent_service.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; + +import "polykey/v1/utils/utils.proto"; +import "polykey/v1/nodes/nodes.proto"; +import "polykey/v1/vaults/vaults.proto"; +import "polykey/v1/notifications/notifications.proto"; + +package polykey.v1; + +service AgentService { + + // Echo + rpc Echo(polykey.v1.utils.EchoMessage) returns (polykey.v1.utils.EchoMessage); + + // Vaults + rpc VaultsGitInfoGet (polykey.v1.vaults.Vault) returns (stream polykey.v1.vaults.PackChunk); + rpc VaultsGitPackGet(stream polykey.v1.vaults.PackChunk) returns (stream polykey.v1.vaults.PackChunk); + rpc VaultsScan (polykey.v1.nodes.Node) returns (stream polykey.v1.vaults.Vault); + rpc VaultsPermisssionsCheck (polykey.v1.vaults.NodePermission) returns (polykey.v1.vaults.NodePermissionAllowed); + + // Nodes + rpc NodesClosestLocalNodesGet (polykey.v1.nodes.Node) returns (polykey.v1.nodes.NodeTable); + rpc NodesClaimsGet (polykey.v1.nodes.ClaimType) returns (polykey.v1.nodes.Claims); + rpc NodesChainDataGet (polykey.v1.utils.EmptyMessage) returns (polykey.v1.nodes.ChainData); + rpc NodesHolePunchMessageSend (polykey.v1.nodes.Relay) returns (polykey.v1.utils.EmptyMessage); + rpc NodesCrossSignClaim (stream polykey.v1.nodes.CrossSign) returns (stream polykey.v1.nodes.CrossSign); + + // Notifications + rpc NotificationsSend (polykey.v1.notifications.AgentNotification) returns (polykey.v1.utils.EmptyMessage); +} diff --git a/src/proto/schemas/polykey/v1/client_service.proto b/src/proto/schemas/polykey/v1/client_service.proto new file mode 100644 index 000000000..17a730f7c --- /dev/null +++ b/src/proto/schemas/polykey/v1/client_service.proto @@ -0,0 +1,95 @@ +syntax = "proto3"; + +import "polykey/v1/gestalts/gestalts.proto"; +import "polykey/v1/identities/identities.proto"; +import "polykey/v1/keys/keys.proto"; +import "polykey/v1/nodes/nodes.proto"; +import "polykey/v1/notifications/notifications.proto"; +import "polykey/v1/permissions/permissions.proto"; +import "polykey/v1/secrets/secrets.proto"; +import "polykey/v1/sessions/sessions.proto"; +import "polykey/v1/vaults/vaults.proto"; +import "polykey/v1/utils/utils.proto"; + +package polykey.v1; + +service ClientService { + rpc Echo(polykey.v1.utils.EchoMessage) returns (polykey.v1.utils.EchoMessage); + + // Agent + rpc AgentStop(polykey.v1.utils.EmptyMessage) returns (polykey.v1.utils.EmptyMessage); + + // Session + rpc SessionUnlock (polykey.v1.sessions.Password) returns (polykey.v1.sessions.Token); + rpc SessionRefresh (polykey.v1.utils.EmptyMessage) returns (polykey.v1.sessions.Token); + rpc SessionLockAll (polykey.v1.utils.EmptyMessage) returns (polykey.v1.utils.StatusMessage); + + // Nodes + rpc NodesAdd(polykey.v1.nodes.NodeAddress) returns (polykey.v1.utils.EmptyMessage); + rpc NodesPing(polykey.v1.nodes.Node) returns (polykey.v1.utils.StatusMessage); + rpc NodesClaim(polykey.v1.nodes.Claim) returns (polykey.v1.utils.StatusMessage); + rpc NodesFind(polykey.v1.nodes.Node) returns (polykey.v1.nodes.NodeAddress); + + // Keys + rpc KeysKeyPairRoot (polykey.v1.utils.EmptyMessage) returns (polykey.v1.keys.KeyPair); + rpc KeysKeyPairReset (polykey.v1.keys.Key) returns (polykey.v1.utils.EmptyMessage); + rpc KeysKeyPairRenew (polykey.v1.keys.Key) returns (polykey.v1.utils.EmptyMessage); + rpc KeysEncrypt (polykey.v1.keys.Crypto) returns (polykey.v1.keys.Crypto); + rpc KeysDecrypt (polykey.v1.keys.Crypto) returns (polykey.v1.keys.Crypto); + rpc KeysSign (polykey.v1.keys.Crypto) returns (polykey.v1.keys.Crypto); + rpc KeysVerify (polykey.v1.keys.Crypto) returns (polykey.v1.utils.StatusMessage); + rpc KeysPasswordChange (polykey.v1.sessions.Password) returns (polykey.v1.utils.EmptyMessage); + rpc KeysCertsGet (polykey.v1.utils.EmptyMessage) returns (polykey.v1.keys.Certificate); + rpc KeysCertsChainGet (polykey.v1.utils.EmptyMessage) returns (stream polykey.v1.keys.Certificate); + + // Vaults + rpc VaultsList(polykey.v1.utils.EmptyMessage) returns (stream polykey.v1.vaults.List); + rpc VaultsCreate(polykey.v1.vaults.Vault) returns (polykey.v1.vaults.Vault); + rpc VaultsRename(polykey.v1.vaults.Rename) returns (polykey.v1.vaults.Vault); + rpc VaultsDelete(polykey.v1.vaults.Vault) returns (polykey.v1.utils.StatusMessage); + rpc VaultsPull(polykey.v1.vaults.Pull) returns (polykey.v1.utils.StatusMessage); + rpc VaultsClone(polykey.v1.vaults.Clone) returns (polykey.v1.utils.StatusMessage); + rpc VaultsScan(polykey.v1.nodes.Node) returns (stream polykey.v1.vaults.List); + rpc VaultsSecretsList(polykey.v1.vaults.Vault) returns (stream polykey.v1.secrets.Secret); + rpc VaultsSecretsMkdir(polykey.v1.vaults.Mkdir) returns (polykey.v1.utils.StatusMessage); + rpc VaultsSecretsStat(polykey.v1.vaults.Vault) returns (polykey.v1.vaults.Stat); + rpc VaultsSecretsDelete(polykey.v1.secrets.Secret) returns (polykey.v1.utils.StatusMessage); + rpc VaultsSecretsEdit(polykey.v1.secrets.Secret) returns (polykey.v1.utils.StatusMessage); + rpc VaultsSecretsGet(polykey.v1.secrets.Secret) returns (polykey.v1.secrets.Secret); + rpc VaultsSecretsRename(polykey.v1.secrets.Rename) returns (polykey.v1.utils.StatusMessage); + rpc VaultsSecretsNew(polykey.v1.secrets.Secret) returns (polykey.v1.utils.StatusMessage); + rpc VaultsSecretsNewDir(polykey.v1.secrets.Directory) returns (polykey.v1.utils.StatusMessage); + rpc VaultsPermissionsSet(polykey.v1.vaults.PermSet) returns (polykey.v1.utils.StatusMessage); + rpc VaultsPermissionsUnset(polykey.v1.vaults.PermUnset) returns (polykey.v1.utils.StatusMessage); + rpc VaultsPermissions(polykey.v1.vaults.PermGet) returns (stream polykey.v1.vaults.Permission); + rpc VaultsVersion(polykey.v1.vaults.Version) returns (polykey.v1.vaults.VersionResult); + rpc VaultsLog(polykey.v1.vaults.Log) returns (stream polykey.v1.vaults.LogEntry); + + // Identities + rpc IdentitiesAuthenticate(polykey.v1.identities.Provider) returns (stream polykey.v1.identities.Provider); + rpc IdentitiesTokenPut(polykey.v1.identities.TokenSpecific) returns (polykey.v1.utils.EmptyMessage); + rpc IdentitiesTokenGet(polykey.v1.identities.Provider) returns (polykey.v1.identities.Token); + rpc IdentitiesTokenDelete(polykey.v1.identities.Provider) returns (polykey.v1.utils.EmptyMessage); + rpc IdentitiesProvidersList(polykey.v1.utils.EmptyMessage) returns (polykey.v1.identities.Provider); + rpc IdentitiesInfoGet(polykey.v1.identities.Provider) returns (polykey.v1.identities.Provider); + rpc IdentitiesInfoGetConnected(polykey.v1.identities.ProviderSearch) returns (stream polykey.v1.identities.Info); + rpc IdentitiesClaim(polykey.v1.identities.Provider) returns (polykey.v1.utils.EmptyMessage); + + // Gestalts + rpc GestaltsGestaltList(polykey.v1.utils.EmptyMessage) returns (stream polykey.v1.gestalts.Gestalt); + rpc GestaltsGestaltGetByNode(polykey.v1.nodes.Node) returns (polykey.v1.gestalts.Graph); + rpc GestaltsGestaltGetByIdentity(polykey.v1.identities.Provider) returns (polykey.v1.gestalts.Graph); + rpc GestaltsDiscoveryByNode(polykey.v1.nodes.Node) returns (polykey.v1.utils.EmptyMessage); + rpc GestaltsDiscoveryByIdentity(polykey.v1.identities.Provider) returns (polykey.v1.utils.EmptyMessage); + rpc GestaltsActionsGetByNode(polykey.v1.nodes.Node) returns (polykey.v1.permissions.Actions); + rpc GestaltsActionsGetByIdentity(polykey.v1.identities.Provider) returns (polykey.v1.permissions.Actions); + rpc GestaltsActionsSetByNode(polykey.v1.permissions.ActionSet) returns (polykey.v1.utils.EmptyMessage); + rpc GestaltsActionsSetByIdentity(polykey.v1.permissions.ActionSet) returns (polykey.v1.utils.EmptyMessage); + rpc GestaltsActionsUnsetByNode(polykey.v1.permissions.ActionSet) returns (polykey.v1.utils.EmptyMessage); + rpc GestaltsActionsUnsetByIdentity(polykey.v1.permissions.ActionSet) returns (polykey.v1.utils.EmptyMessage); + + // Notifications + rpc NotificationsSend(polykey.v1.notifications.Send) returns (polykey.v1.utils.EmptyMessage); + rpc NotificationsRead(polykey.v1.notifications.Read) returns (polykey.v1.notifications.List); + rpc NotificationsClear(polykey.v1.utils.EmptyMessage) returns (polykey.v1.utils.EmptyMessage); +} diff --git a/src/proto/schemas/polykey/v1/gestalts/gestalts.proto b/src/proto/schemas/polykey/v1/gestalts/gestalts.proto new file mode 100644 index 000000000..0a12f5e86 --- /dev/null +++ b/src/proto/schemas/polykey/v1/gestalts/gestalts.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package polykey.v1.gestalts; + +message Gestalt { + string name = 1; +} + +message Graph { + string gestalt_graph = 1; +} + +message Trust { + string provider = 1; + string name = 2; + bool set = 3; +} diff --git a/src/proto/schemas/polykey/v1/identities/identities.proto b/src/proto/schemas/polykey/v1/identities/identities.proto new file mode 100644 index 000000000..b45a27fc7 --- /dev/null +++ b/src/proto/schemas/polykey/v1/identities/identities.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package polykey.v1.identities; + +message Provider { + string provider_id = 1; + string message = 2; +} + +message TokenSpecific { + Provider provider = 1; + string token = 2; +} + +message Token { + string token = 1; +} + +message ProviderSearch { + Provider provider = 1; + repeated string search_term = 2; +} + +message Info { + Provider provider = 1; + string name = 3; + string email = 4; + string url = 5; +} diff --git a/src/proto/schemas/polykey/v1/keys/keys.proto b/src/proto/schemas/polykey/v1/keys/keys.proto new file mode 100644 index 000000000..277b1308c --- /dev/null +++ b/src/proto/schemas/polykey/v1/keys/keys.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package polykey.v1.keys; + +message Crypto { + string data = 1; + string signature = 2; +} + +message Key { + string name = 1; + string key = 2; +} + +message KeyPair { + string public = 1; + string private = 2; +} + +message Certificate { + string cert = 1; +} diff --git a/src/proto/schemas/polykey/v1/nodes/nodes.proto b/src/proto/schemas/polykey/v1/nodes/nodes.proto new file mode 100644 index 000000000..83566e6d3 --- /dev/null +++ b/src/proto/schemas/polykey/v1/nodes/nodes.proto @@ -0,0 +1,82 @@ +syntax = "proto3"; + +package polykey.v1.nodes; + +//Shared + +message Node { + string node_id = 1; +} + +message Address { + string host = 1; + int32 port = 2; +} + +// Client specific + +message NodeAddress { + string node_id = 1; + Address address = 2; +} + +message Claim { + string node_id = 1; + bool force_invite = 2; +} + +// Agent specific. + +message Connection { + string a_id = 1; + string b_id = 2; + string a_ip = 3; + string b_ip = 4; +} + +message Relay { + string src_id = 1; + string target_id = 2; + string egress_address = 3; + string signature = 4; +} + +message NodeTable { + map node_table = 1; +} + +// The specific ClaimType of Claims to get +message ClaimType { + string claim_type = 1; +} + +// A list of base64url encoded claims +message Claims { + repeated AgentClaim claims = 1; +} + +// A map of ClaimId -> ClaimEncoded +message ChainData { + map chain_data = 1; +} + +// The components of a ClaimEncoded type (i.e. a GeneralJWS) for GRPC transport +message AgentClaim { + string payload = 1; // base64 encoded + repeated Signature signatures = 2; +} + +message Signature { + string signature = 1; // base64 encoded + string protected = 2; // base64 encoded ('protected' header field in GeneralJWS) +} + +message ClaimIntermediary { + string payload = 1; + Signature signature = 2; +} + +message CrossSign { + ClaimIntermediary singly_signed_claim = 1; + AgentClaim doubly_signed_claim = 2; +} diff --git a/src/proto/schemas/polykey/v1/notifications/notifications.proto b/src/proto/schemas/polykey/v1/notifications/notifications.proto new file mode 100644 index 000000000..c8ae8258a --- /dev/null +++ b/src/proto/schemas/polykey/v1/notifications/notifications.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package polykey.v1.notifications; + +message Notification { + oneof data { + General general = 1; + string gestalt_invite = 2; + Share vault_share = 3; + }; + string sender_id = 4; + bool is_read = 5; +} + +message Send { + string receiver_id = 1; + General data = 2; +} + +message Read { + bool unread = 1; + string number = 2; + string order = 3; +} + +message List { + repeated Notification notification = 1; +} + +message General { + string message = 1; +} + +message Share { + string vault_id = 1; + string vault_name = 2; + repeated string actions = 3; +} + +// Agent specific + +message AgentNotification { + string content = 1; +} diff --git a/src/proto/schemas/polykey/v1/permissions/permissions.proto b/src/proto/schemas/polykey/v1/permissions/permissions.proto new file mode 100644 index 000000000..65441b294 --- /dev/null +++ b/src/proto/schemas/polykey/v1/permissions/permissions.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +import "polykey/v1/nodes/nodes.proto"; +import "polykey/v1/identities/identities.proto"; + +package polykey.v1.permissions; + +message Actions { + repeated string action = 1; +} + +message ActionSet { + oneof node_or_provider { + polykey.v1.nodes.Node node = 1; + polykey.v1.identities.Provider identity = 2; + } + string action = 3; +} diff --git a/src/proto/schemas/polykey/v1/secrets/secrets.proto b/src/proto/schemas/polykey/v1/secrets/secrets.proto new file mode 100644 index 000000000..a8f5cc207 --- /dev/null +++ b/src/proto/schemas/polykey/v1/secrets/secrets.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +import "polykey/v1/vaults/vaults.proto"; + +package polykey.v1.secrets; + +message Rename { + Secret old_secret = 1; + string new_name = 2; +} + +message Secret { + polykey.v1.vaults.Vault vault = 1; + string secret_name = 2; + bytes secret_content = 3; +} + +message Directory { + polykey.v1.vaults.Vault vault = 1; + string secret_directory = 2; +} diff --git a/src/proto/schemas/polykey/v1/sessions/sessions.proto b/src/proto/schemas/polykey/v1/sessions/sessions.proto new file mode 100644 index 000000000..b15dde353 --- /dev/null +++ b/src/proto/schemas/polykey/v1/sessions/sessions.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package polykey.v1.sessions; + +message Password { + oneof password_or_file{ + string password = 1; + string password_file = 2; + } +} + +message Token { + string token = 1; +} diff --git a/src/proto/schemas/polykey/v1/test_service.proto b/src/proto/schemas/polykey/v1/test_service.proto new file mode 100644 index 000000000..b9ad0cf06 --- /dev/null +++ b/src/proto/schemas/polykey/v1/test_service.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +import "polykey/v1/utils/utils.proto"; + +package polykey.v1; + +service TestService { + rpc Unary(polykey.v1.utils.EchoMessage) returns (polykey.v1.utils.EchoMessage) {}; + rpc ServerStream(polykey.v1.utils.EchoMessage) returns (stream polykey.v1.utils.EchoMessage) {}; + rpc ClientStream(stream polykey.v1.utils.EchoMessage) returns (polykey.v1.utils.EchoMessage) {}; + rpc DuplexStream(stream polykey.v1.utils.EchoMessage) returns (stream polykey.v1.utils.EchoMessage) {}; +} diff --git a/src/proto/schemas/polykey/v1/utils/utils.proto b/src/proto/schemas/polykey/v1/utils/utils.proto new file mode 100644 index 000000000..12ad01a97 --- /dev/null +++ b/src/proto/schemas/polykey/v1/utils/utils.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package polykey.v1.utils; + +message EmptyMessage {}; + +message StatusMessage { + bool success = 1; +} + +message EchoMessage { + string challenge = 1; +} diff --git a/src/proto/schemas/polykey/v1/vaults/vaults.proto b/src/proto/schemas/polykey/v1/vaults/vaults.proto new file mode 100644 index 000000000..efd2d45b0 --- /dev/null +++ b/src/proto/schemas/polykey/v1/vaults/vaults.proto @@ -0,0 +1,107 @@ +syntax = "proto3"; + +import "polykey/v1/nodes/nodes.proto"; + +package polykey.v1.vaults; + +// Shared. + +//Note: I'm thinking this should be a vault info that includes vault_name and vault_id +// and only use vault_name when we are specifying a vaultNameOrId. +message Vault { + string name_or_Id = 1; +} + +// client specific +message List { + string vault_name = 1; + string vault_id = 2; +} + +message Rename { + Vault vault = 1; + string new_name = 2; +} + +message Mkdir { + Vault vault = 1; + string dir_name = 2; + bool recursive = 3; +} + +message Pull { + Vault vault = 1; + polykey.v1.nodes.Node node = 2; +} + +message Clone { + Vault vault = 1; + polykey.v1.nodes.Node node = 2; +} + +message Stat { + string stats = 1; +} + +message PermSet { + Vault vault = 1; + polykey.v1.nodes.Node node = 2; +} + +message PermUnset { + Vault vault = 1; + polykey.v1.nodes.Node node = 2; +} + +message PermGet { + Vault vault = 1; + polykey.v1.nodes.Node node = 2; +} + +message Permission { + string node_id = 1; + string action = 2; +} + +message Version { + Vault vault = 1; + string version_id = 2; +} + +message VersionResult { + bool is_latest_version = 1; +} + +message Log { + Vault vault = 1; + int32 log_depth = 3; + string commit_id = 4; +} + +message LogEntry { + string oid = 1; + string committer = 2; + uint64 time_stamp = 4; + string message = 3; +} + +// Agent specific. + +message PackChunk { + bytes chunk = 1; +} + +message PackRequest { + string id = 1; + bytes body = 2; +} + +message NodePermission { + string node_id = 1; + string vault_id = 2; +} + +message NodePermissionAllowed { + bool permission = 1; +} + diff --git a/src/sessions/utils.ts b/src/sessions/utils.ts index 22d93803c..230563aea 100644 --- a/src/sessions/utils.ts +++ b/src/sessions/utils.ts @@ -12,8 +12,7 @@ import { errors as keyErrors, KeyManager, utils as keyUtils } from '../keys'; import * as grpc from '@grpc/grpc-js'; import * as keysUtils from '../keys/utils'; import * as clientErrors from '../client/errors'; -import { PasswordMessage } from '../proto/js/Client_pb'; -import PasswordOrFileCase = PasswordMessage.PasswordOrFileCase; +import * as sessionsPB from '../proto/js/polykey/v1/sessions/sessions_pb'; async function generateRandomPayload() { const bytes = await keysUtils.getRandomBytes(32); @@ -64,17 +63,18 @@ async function passwordFromMetadata( return password; } async function passwordFromPasswordMessage( - passwordMessage: PasswordMessage, + passwordMessage: sessionsPB.Password, ): Promise { + const passwordOrFileCase = sessionsPB.Password.PasswordOrFileCase; switch (passwordMessage.getPasswordOrFileCase()) { // If password is set explicitly use it - case PasswordOrFileCase.PASSWORD: { + case passwordOrFileCase.PASSWORD: { let password = passwordMessage.getPassword(); password = password.trim(); return password; } - case PasswordOrFileCase.PASSWORD_FILE: { + case passwordOrFileCase.PASSWORD_FILE: { // Read password file to get password const passwordFile = passwordMessage.getPasswordFile(); let password = await fs.promises.readFile(passwordFile, { @@ -84,7 +84,7 @@ async function passwordFromPasswordMessage( return password; } - case PasswordOrFileCase.PASSWORD_OR_FILE_NOT_SET: + case passwordOrFileCase.PASSWORD_OR_FILE_NOT_SET: default: //None set. return undefined; diff --git a/src/vaults/VaultManager.ts b/src/vaults/VaultManager.ts index e5bf2ea6e..03bf1a0ad 100644 --- a/src/vaults/VaultManager.ts +++ b/src/vaults/VaultManager.ts @@ -22,8 +22,7 @@ import { KeyManager } from '../keys'; import { NodeManager } from '../nodes'; import { GestaltGraph } from '../gestalts'; import { ACL } from '../acl'; -import { agentPB } from '../agent'; - +import * as vaultsPB from '../proto/js/polykey/v1/vaults/vaults_pb'; import * as utils from '../utils'; import * as vaultsUtils from './utils'; import * as vaultsErrors from './errors'; @@ -379,11 +378,11 @@ class VaultManager { if (method === 'GET') { const infoResponse = { async *[Symbol.iterator]() { - const request = new agentPB.InfoRequest(); + const request = new vaultsPB.Vault(); if (typeof vaultNameOrId === 'string') { - request.setVaultId(vaultNameOrId); + request.setNameOrId(vaultNameOrId); } else { - request.setVaultId(idUtils.toString(vaultNameOrId)); + request.setNameOrId(idUtils.toString(vaultNameOrId)); } const response = client.vaultsGitInfoGet(request); response.stream.on('metadata', async (meta) => { @@ -423,7 +422,7 @@ class VaultManager { stream.on('data', (d) => { responseBuffers.push(d.getChunk_asU8()); }); - const chunk = new agentPB.PackChunk(); + const chunk = new vaultsPB.PackChunk(); chunk.setChunk(body[0]); write(chunk); stream.end(); @@ -545,11 +544,11 @@ class VaultManager { if (method === 'GET') { const infoResponse = { async *[Symbol.iterator]() { - const request = new agentPB.InfoRequest(); + const request = new vaultsPB.Vault(); if (typeof pullVaultNameOrId === 'string') { - request.setVaultId(pullVaultNameOrId); + request.setNameOrId(pullVaultNameOrId); } else { - request.setVaultId(idUtils.toString(pullVaultNameOrId!)); + request.setNameOrId(idUtils.toString(pullVaultNameOrId!)); } const response = client.vaultsGitInfoGet(request); response.stream.on('metadata', async (meta) => { @@ -588,7 +587,7 @@ class VaultManager { stream.on('data', (d) => { responseBuffers.push(d.getChunk_asU8()); }); - const chunk = new agentPB.PackChunk(); + const chunk = new vaultsPB.PackChunk(); chunk.setChunk(body[0]); write(chunk); stream.end(); diff --git a/src/vaults/utils.ts b/src/vaults/utils.ts index c2d4896f4..00358cd49 100644 --- a/src/vaults/utils.ts +++ b/src/vaults/utils.ts @@ -19,8 +19,9 @@ import * as grpc from '@grpc/grpc-js'; import { promisify } from '../utils'; -import * as agentPB from '../proto/js/Agent_pb'; import { GRPCClientAgent } from '../agent'; +import * as vaultsPB from '../proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb'; import * as keysUtils from '../keys/utils'; import { errors as vaultErrors } from './'; @@ -181,8 +182,8 @@ async function* requestInfo( vaultNameOrId: string, client: GRPCClientAgent, ): AsyncGenerator { - const request = new agentPB.InfoRequest(); - // Request.setVaultId(idUtils.toBuffer(makeVaultId(vaultNameOrId))); + const request = new vaultsPB.Vault(); + request.setNameOrId(vaultNameOrId); const response = client.vaultsGitInfoGet(request); for await (const resp of response) { yield resp.getChunk_asU8(); @@ -214,7 +215,7 @@ async function* requestPack( responseBuffers.push(d.getChunk_asU8()); }); - const chunk = new agentPB.PackChunk(); + const chunk = new vaultsPB.PackChunk(); chunk.setChunk(body); write(chunk); stream.end(); @@ -235,13 +236,13 @@ async function requestVaultNames( client: GRPCClientAgent, nodeId: NodeId, ): Promise { - const request = new agentPB.NodeIdMessage(); + const request = new nodesPB.Node(); request.setNodeId(nodeId); const vaultList = client.vaultsScan(request); const data: string[] = []; for await (const vault of vaultList) { - const vaultMessage = vault.getVault_asU8(); - data.push(Buffer.from(vaultMessage).toString()); + const vaultMessage = vault.getNameOrId(); + data.push(vaultMessage); } return data; diff --git a/tests/agent/GRPCClientAgent.test.ts b/tests/agent/GRPCClientAgent.test.ts index b412edd1f..615d5fe72 100644 --- a/tests/agent/GRPCClientAgent.test.ts +++ b/tests/agent/GRPCClientAgent.test.ts @@ -16,7 +16,10 @@ import { VaultManager } from '@/vaults'; import { Sigchain } from '@/sigchain'; import { ACL } from '@/acl'; import { GestaltGraph } from '@/gestalts'; -import { agentPB, GRPCClientAgent } from '@/agent'; +import { GRPCClientAgent } from '@/agent'; +import * as utilsPB from '@/proto/js/polykey/v1/utils/utils_pb'; +import * as vaultsPB from '@/proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '@/proto/js/polykey/v1/nodes/nodes_pb'; import { ForwardProxy, ReverseProxy } from '@/network'; import { DB } from '@matrixai/db'; import { NotificationsManager } from '@/notifications'; @@ -174,7 +177,7 @@ describe('GRPC agent', () => { }); }); test('echo', async () => { - const echoMessage = new agentPB.EchoMessage(); + const echoMessage = new utilsPB.EchoMessage(); echoMessage.setChallenge('yes'); await client.echo(echoMessage); const response = await client.echo(echoMessage); @@ -186,7 +189,7 @@ describe('GRPC agent', () => { await gestaltGraph.setNode(node1); // Await vaultManager.setVaultPermissions('12345' as NodeId, vault.vaultId); // await vaultManager.unsetVaultPermissions('12345' as NodeId, vault.vaultId); - const vaultPermMessage = new agentPB.VaultPermMessage(); + const vaultPermMessage = new vaultsPB.NodePermission(); vaultPermMessage.setNodeId(node1.id); // VaultPermMessage.setVaultId(vault.vaultId); const response = await client.vaultsPermisssionsCheck(vaultPermMessage); @@ -200,12 +203,12 @@ describe('GRPC agent', () => { //FIXME, permissions not implemented on vaults const vault = await vaultManager.createVault('TestAgentVault' as VaultName); await gestaltGraph.setNode(node1); - const nodeIdMessage = new agentPB.NodeIdMessage(); + const nodeIdMessage = new nodesPB.Node(); nodeIdMessage.setNodeId(node1.id); const response = client.vaultsScan(nodeIdMessage); const data: string[] = []; for await (const resp of response) { - const chunk = resp.getVault_asU8(); + const chunk = resp.getNameOrId(); data.push(Buffer.from(chunk).toString()); } expect(data).toStrictEqual([]); @@ -214,14 +217,14 @@ describe('GRPC agent', () => { const response2 = client.vaultsScan(nodeIdMessage); const data2: string[] = []; for await (const resp of response2) { - const chunk = resp.getVault_asU8(); + const chunk = resp.getNameOrId(); // Data2.push(Buffer.from(chunk).toString()); } // Expect(data2).toStrictEqual([`${vault.vaultName}\t${vault.vaultId}`]); // await vaultManager.deleteVault(vault.vaultId); }); test('Can connect over insecure connection.', async () => { - const echoMessage = new agentPB.EchoMessage(); + const echoMessage = new utilsPB.EchoMessage(); echoMessage.setChallenge('yes'); await client.echo(echoMessage); const response = await client.echo(echoMessage); @@ -317,8 +320,8 @@ describe('GRPC agent', () => { // Check X's sigchain is locked at start expect(sigchain.locked).toBe(true); expect(response.done).toBe(false); - expect(response.value).toBeInstanceOf(agentPB.CrossSignMessage); - const receivedMessage = response.value as agentPB.CrossSignMessage; + expect(response.value).toBeInstanceOf(nodesPB.CrossSign); + const receivedMessage = response.value as nodesPB.CrossSign; expect(receivedMessage.getSinglySignedClaim()).toBeDefined(); expect(receivedMessage.getDoublySignedClaim()).toBeDefined(); const constructedIntermediary = claimsUtils.reconstructClaimIntermediary( @@ -379,7 +382,7 @@ describe('GRPC agent', () => { const genClaims = client.nodesCrossSignClaim(); expect(genClaims.stream.destroyed).toBe(false); // 2. X <- sends its intermediary signed claim <- Y - const crossSignMessageUndefinedSingly = new agentPB.CrossSignMessage(); + const crossSignMessageUndefinedSingly = new nodesPB.CrossSign(); await genClaims.write(crossSignMessageUndefinedSingly); await expect(() => genClaims.read()).rejects.toThrow( claimsErrors.ErrorUndefinedSinglySignedClaim, @@ -392,9 +395,8 @@ describe('GRPC agent', () => { const genClaims = client.nodesCrossSignClaim(); expect(genClaims.stream.destroyed).toBe(false); // 2. X <- sends its intermediary signed claim <- Y - const crossSignMessageUndefinedSinglySignature = - new agentPB.CrossSignMessage(); - const intermediaryNoSignature = new agentPB.ClaimIntermediaryMessage(); + const crossSignMessageUndefinedSinglySignature = new nodesPB.CrossSign(); + const intermediaryNoSignature = new nodesPB.ClaimIntermediary(); crossSignMessageUndefinedSinglySignature.setSinglySignedClaim( intermediaryNoSignature, ); diff --git a/tests/agent/utils.ts b/tests/agent/utils.ts index 4310715d0..2c152f061 100644 --- a/tests/agent/utils.ts +++ b/tests/agent/utils.ts @@ -3,8 +3,12 @@ import type { NodeId } from '@/nodes/types'; import * as grpc from '@grpc/grpc-js'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { createAgentService, GRPCClientAgent, AgentService } from '@/agent'; -import { IAgentServer } from '@/proto/js/Agent_grpc_pb'; +import { + createAgentService, + GRPCClientAgent, + AgentServiceService, +} from '@/agent'; +import { IAgentServiceServer } from '@/proto/js/polykey/v1/agent_service_grpc_pb'; import { KeyManager } from '@/keys'; import { VaultManager } from '@/vaults'; import { NodeManager } from '@/nodes'; @@ -25,7 +29,7 @@ async function openTestAgentServer({ sigchain: Sigchain; notificationsManager: NotificationsManager; }) { - const agentService: IAgentServer = createAgentService({ + const agentService: IAgentServiceServer = createAgentService({ keyManager, vaultManager, nodeManager, @@ -34,7 +38,7 @@ async function openTestAgentServer({ }); const server = new grpc.Server(); - server.addService(AgentService, agentService); + server.addService(AgentServiceService, agentService); const bindAsync = promisify(server.bindAsync).bind(server); const port = await bindAsync( `127.0.0.1:0`, diff --git a/tests/client/GRPCClientClient.test.ts b/tests/client/GRPCClientClient.test.ts index 7ff796d2a..bfb192f8f 100644 --- a/tests/client/GRPCClientClient.test.ts +++ b/tests/client/GRPCClientClient.test.ts @@ -8,7 +8,8 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import * as grpc from '@grpc/grpc-js'; -import { clientPB, GRPCClientClient } from '@/client'; +import { GRPCClientClient } from '@/client'; +import * as utilsPB from '@/proto/js/polykey/v1/utils/utils_pb'; import { PolykeyAgent } from '@'; import * as testUtils from './utils'; @@ -73,7 +74,7 @@ describe('GRPCClientClient', () => { }); }); test('echo', async () => { - const echoMessage = new clientPB.EchoMessage(); + const echoMessage = new utilsPB.EchoMessage(); echoMessage.setChallenge('yes'); const response = await client.echo(echoMessage); expect(response.getChallenge()).toBe('yes'); diff --git a/tests/client/PolykeyClient.test.ts b/tests/client/PolykeyClient.test.ts index 8152ff8ec..18817662e 100644 --- a/tests/client/PolykeyClient.test.ts +++ b/tests/client/PolykeyClient.test.ts @@ -6,7 +6,8 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import * as grpc from '@grpc/grpc-js'; import { PolykeyClient } from '@'; -import { clientPB, GRPCClientClient } from '@/client'; +import { GRPCClientClient } from '@/client'; +import * as utilsPB from '@/proto/js/polykey/v1/utils/utils_pb'; import { PolykeyAgent } from '@'; import * as testUtils from './utils'; @@ -72,7 +73,7 @@ describe('GRPCClientClient', () => { }); }); test('echo', async () => { - const echoMessage = new clientPB.EchoMessage(); + const echoMessage = new utilsPB.EchoMessage(); echoMessage.setChallenge('yes'); const response = await client.echo(echoMessage); expect(response.getChallenge()).toBe('yes'); @@ -125,7 +126,7 @@ describe('TLS tests', () => { const client = pkClient.grpcClient; await pkClient.session.start({ token }); - const echoMessage = new clientPB.EchoMessage(); + const echoMessage = new utilsPB.EchoMessage(); echoMessage.setChallenge('yes'); const response = await client.echo(echoMessage); expect(response.getChallenge()).toBe('yes'); diff --git a/tests/client/clientService.test.ts b/tests/client/clientService.test.ts index 40471c903..62867ce1f 100644 --- a/tests/client/clientService.test.ts +++ b/tests/client/clientService.test.ts @@ -11,14 +11,23 @@ import * as grpc from '@grpc/grpc-js'; import TestProvider from '../identities/TestProvider'; import { PolykeyAgent, PolykeyClient } from '@'; -import { clientPB } from '@/client'; +import * as utilsPB from '@/proto/js/polykey/v1/utils/utils_pb'; +import * as vaultsPB from '@/proto/js/polykey/v1/vaults/vaults_pb'; +import * as nodesPB from '@/proto/js/polykey/v1/nodes/nodes_pb'; +import * as notificationsPB from '@/proto/js/polykey/v1/notifications/notifications_pb'; +import * as sessionsPB from '@/proto/js/polykey/v1/sessions/sessions_pb'; +import * as gestaltsPB from '@/proto/js/polykey/v1/gestalts/gestalts_pb'; +import * as identitiesPB from '@/proto/js/polykey/v1/identities/identities_pb'; +import * as keysPB from '@/proto/js/polykey/v1/keys/keys_pb'; +import * as permissionsPB from '@/proto/js/polykey/v1/permissions/permissions_pb'; +import * as secretsPB from '@/proto/js/polykey/v1/secrets/secrets_pb'; import { NodeManager } from '@/nodes'; import { GestaltGraph } from '@/gestalts'; import { VaultManager } from '@/vaults'; import { IdentitiesManager } from '@/identities'; import { KeyManager } from '@/keys'; import { ForwardProxy } from '@/network'; -import { ClientClient } from '@/proto/js/Client_grpc_pb'; +import { ClientServiceClient } from '@/proto/js/polykey/v1/client_service_grpc_pb'; import * as testKeynodeUtils from '../utils'; import * as testUtils from './utils'; @@ -37,6 +46,9 @@ import { Vault, VaultName } from '@/vaults/types'; import { vaultOps } from '@/vaults'; import { makeVaultId, makeVaultIdPretty } from '@/vaults/utils'; import { utils as idUtils } from '@matrixai/id'; +import { Any } from 'google-protobuf/google/protobuf/any_pb'; +import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; +import { Struct } from 'google-protobuf/google/protobuf/struct_pb'; /** * This test file has been optimised to use only one instance of PolykeyAgent where posible. @@ -56,7 +68,7 @@ describe('Client service', () => { const logger = new Logger('ClientServerTest', LogLevel.WARN, [ new StreamHandler(), ]); - let client: ClientClient; + let client: ClientServiceClient; let server: grpc.Server; let port: number; @@ -188,13 +200,13 @@ describe('Client service', () => { }); test('can echo', async () => { - const echo = grpcUtils.promisifyUnaryCall( + const echo = grpcUtils.promisifyUnaryCall( client, client.echo, ); - const m = new clientPB.EchoMessage(); + const m = new utilsPB.EchoMessage(); m.setChallenge('Hello'); - const res: clientPB.EchoMessage = await echo(m, callCredentials); + const res: utilsPB.EchoMessage = await echo(m, callCredentials); expect(res.getChallenge()).toBe('Hello'); // Hard Coded error @@ -203,13 +215,12 @@ describe('Client service', () => { }); describe('sessions', () => { test('can request a session', async () => { - const requestJWT = - grpcUtils.promisifyUnaryCall( - client, - client.sessionUnlock, - ); + const requestJWT = grpcUtils.promisifyUnaryCall( + client, + client.sessionUnlock, + ); - const passwordMessage = new clientPB.PasswordMessage(); + const passwordMessage = new sessionsPB.Password(); passwordMessage.setPasswordFile(passwordFile); const res = await requestJWT(passwordMessage); @@ -220,26 +231,24 @@ describe('Client service', () => { expect(result).toBeTruthy(); }); test('can refresh session', async () => { - const requestJWT = - grpcUtils.promisifyUnaryCall( - client, - client.sessionUnlock, - ); + const requestJWT = grpcUtils.promisifyUnaryCall( + client, + client.sessionUnlock, + ); - const passwordMessage = new clientPB.PasswordMessage(); + const passwordMessage = new sessionsPB.Password(); passwordMessage.setPasswordFile(passwordFile); const res1 = await requestJWT(passwordMessage); const token1 = res1.getToken() as SessionToken; const callCredentialsRefresh = testUtils.createCallCredentials(token1); - const sessionRefresh = - grpcUtils.promisifyUnaryCall( - client, - client.sessionRefresh, - ); + const sessionRefresh = grpcUtils.promisifyUnaryCall( + client, + client.sessionRefresh, + ); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); const res2 = await sessionRefresh(emptyMessage, callCredentialsRefresh); expect(typeof res2.getToken()).toBe('string'); @@ -252,24 +261,24 @@ describe('Client service', () => { test('session can lock all', async () => { //Starts off unlocked. - const echo = grpcUtils.promisifyUnaryCall( + const echo = grpcUtils.promisifyUnaryCall( client, client.echo, ); // Checking that session is working. - const echoMessage = new clientPB.EchoMessage(); + const echoMessage = new utilsPB.EchoMessage(); echoMessage.setChallenge('Hello'); const res = await echo(echoMessage, callCredentials); expect(res.getChallenge()).toBe('Hello'); //Locking the session. - const sessionLockAll = grpcUtils.promisifyUnaryCall( + const sessionLockAll = grpcUtils.promisifyUnaryCall( client, client.sessionLockAll, ); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); await sessionLockAll(emptyMessage, callCredentials); //Should reject the session token. @@ -302,7 +311,7 @@ describe('Client service', () => { await newClient.start({}); await newClient.session.start({ token }); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); await newClient.grpcClient.agentStop(emptyMessage); await sleep(10000); @@ -321,11 +330,10 @@ describe('Client service', () => { }); test('should get vaults', async () => { - const listVaults = - grpcUtils.promisifyReadableStreamCall( - client, - client.vaultsList, - ); + const listVaults = grpcUtils.promisifyReadableStreamCall( + client, + client.vaultsList, + ); const vaultList = ['Vault1', 'Vault2', 'Vault3', 'Vault4', 'Vault5']; @@ -333,7 +341,7 @@ describe('Client service', () => { await vaultManager.createVault(vaultName as VaultName); } - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); const res = await listVaults(emptyMessage, callCredentials); const names: Array = []; for await (const val of res) { @@ -345,12 +353,12 @@ describe('Client service', () => { test('should create vault', async () => { const vaultName = 'NewVault' as VaultName; - const createVault = grpcUtils.promisifyUnaryCall( + const createVault = grpcUtils.promisifyUnaryCall( client, client.vaultsCreate, ); - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(vaultName); const vaultId = await createVault(vaultMessage, callCredentials); @@ -361,7 +369,7 @@ describe('Client service', () => { ); }); test('should delete vaults', async () => { - const deleteVault = grpcUtils.promisifyUnaryCall( + const deleteVault = grpcUtils.promisifyUnaryCall( client, client.vaultsDelete, ); @@ -375,7 +383,7 @@ describe('Client service', () => { vaults.push(await vaultManager.createVault(vaultName as VaultName)); } - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(vaultList[0]); const res = await deleteVault(vaultMessage, callCredentials); @@ -395,15 +403,15 @@ describe('Client service', () => { test('should rename vaults', async () => { const vaultName = 'MyFirstVault' as VaultName; const vaultRename = 'MyRenamedVault' as VaultName; - const renameVault = grpcUtils.promisifyUnaryCall( + const renameVault = grpcUtils.promisifyUnaryCall( client, client.vaultsRename, ); const vault = await vaultManager.createVault(vaultName); - const vaultRenameMessage = new clientPB.VaultRenameMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const vaultRenameMessage = new vaultsPB.Rename(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); vaultRenameMessage.setVault(vaultMessage); vaultRenameMessage.setNewName(vaultRename); @@ -417,7 +425,7 @@ describe('Client service', () => { //FIXME, fix this when vault secrets stat is re-implemented test.skip('should get stats for vaults', async () => { fail('not implemented'); - const statsVault = grpcUtils.promisifyUnaryCall( + const statsVault = grpcUtils.promisifyUnaryCall( client, client.vaultsSecretsStat, ); @@ -427,7 +435,7 @@ describe('Client service', () => { 'MySecondVault' as VaultName, ); - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); const res = await statsVault(vaultMessage, callCredentials); @@ -448,7 +456,7 @@ describe('Client service', () => { test('should make a directory in a vault', async () => { const vaultName = 'MySecondVault' as VaultName; - const mkdirVault = grpcUtils.promisifyUnaryCall( + const mkdirVault = grpcUtils.promisifyUnaryCall( client, client.vaultsSecretsMkdir, ); @@ -456,8 +464,8 @@ describe('Client service', () => { const vault = await vaultManager.createVault(vaultName); const dirPath = 'dir/dir1/dir2'; - const vaultMkdirMessage = new clientPB.VaultMkdirMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const vaultMkdirMessage = new vaultsPB.Mkdir(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); vaultMkdirMessage.setVault(vaultMessage); vaultMkdirMessage.setDirName(dirPath); @@ -472,7 +480,7 @@ describe('Client service', () => { test('should list secrets in a vault', async () => { const vaultName = 'MyFirstVault' as VaultName; const listSecretsVault = - grpcUtils.promisifyReadableStreamCall( + grpcUtils.promisifyReadableStreamCall( client, client.vaultsSecretsList, ); @@ -493,10 +501,10 @@ describe('Client service', () => { } }); - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); - const res = listSecretsVault(vaultMessage, callCredentials); + const res = await listSecretsVault(vaultMessage, callCredentials); const names: Array = []; for await (const val of res) { @@ -508,7 +516,7 @@ describe('Client service', () => { test('should delete secrets in a vault', async () => { const vaultName = 'MyFirstVault' as VaultName; const deleteSecretVault = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.vaultsSecretsDelete, ); @@ -530,8 +538,8 @@ describe('Client service', () => { } }); - const secretMessage = new clientPB.SecretMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const secretMessage = new secretsPB.Secret(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); secretMessage.setVault(vaultMessage); secretMessage.setSecretName('Secret1'); @@ -547,7 +555,7 @@ describe('Client service', () => { test('should edit secrets in a vault', async () => { const vaultName = 'MyFirstVault' as VaultName; const editSecretVault = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.vaultsSecretsEdit, ); @@ -568,8 +576,8 @@ describe('Client service', () => { } }); - const secretMessage = new clientPB.SecretMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const secretMessage = new secretsPB.Secret(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); secretMessage.setVault(vaultMessage); secretMessage.setSecretName('Secret1'); @@ -586,11 +594,10 @@ describe('Client service', () => { test('should get secrets in a vault', async () => { const vaultName = 'MyFirstVault' as VaultName; - const getSecretVault = - grpcUtils.promisifyUnaryCall( - client, - client.vaultsSecretsGet, - ); + const getSecretVault = grpcUtils.promisifyUnaryCall( + client, + client.vaultsSecretsGet, + ); const vault = await vaultManager.createVault(vaultName); @@ -608,8 +615,8 @@ describe('Client service', () => { } }); - const secretMessage = new clientPB.SecretMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const secretMessage = new secretsPB.Secret(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); secretMessage.setVault(vaultMessage); secretMessage.setSecretName('Secret1'); @@ -624,7 +631,7 @@ describe('Client service', () => { const vaultName = 'MyFirstVault' as VaultName; const renameSecretVault = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.vaultsSecretsRename, ); @@ -652,9 +659,9 @@ describe('Client service', () => { } }); - const secretRenameMessage = new clientPB.SecretRenameMessage(); - const vaultMessage = new clientPB.VaultMessage(); - const secretMessage = new clientPB.SecretMessage(); + const secretRenameMessage = new secretsPB.Rename(); + const vaultMessage = new vaultsPB.Vault(); + const secretMessage = new secretsPB.Secret(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); secretMessage.setSecretName('Secret1'); @@ -677,15 +684,15 @@ describe('Client service', () => { const vaultName = 'MyFirstVault' as VaultName; const newSecretVault = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.vaultsSecretsNew, ); const vault = await vaultManager.createVault(vaultName); - const secretMessage = new clientPB.SecretMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const secretMessage = new secretsPB.Secret(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); secretMessage.setVault(vaultMessage); secretMessage.setSecretName('Secret1'); @@ -708,7 +715,7 @@ describe('Client service', () => { test('should add a directory of secrets in a vault', async () => { const vaultName = 'MyFirstVault' as VaultName; const newDirSecretVault = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.vaultsSecretsNewDir, ); @@ -729,8 +736,8 @@ describe('Client service', () => { const vault = await vaultManager.createVault(vaultName); - const secretDirectoryMessage = new clientPB.SecretDirectoryMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const secretDirectoryMessage = new secretsPB.Directory(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); secretDirectoryMessage.setVault(vaultMessage); secretDirectoryMessage.setSecretDirectory(tmpDir); @@ -748,7 +755,7 @@ describe('Client service', () => { fail('Functionality not fully implemented'); const vaultName = 'vault1' as VaultName; const vaultsSetPerms = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.vaultsPermissionsSet, ); @@ -759,9 +766,9 @@ describe('Client service', () => { // Creating a gestalts state await createGestaltState(); - const setVaultPermMessage = new clientPB.SetVaultPermMessage(); - const nodeMessage = new clientPB.NodeMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const setVaultPermMessage = new vaultsPB.PermSet(); + const nodeMessage = new nodesPB.Node(); + const vaultMessage = new vaultsPB.Vault(); nodeMessage.setNodeId(node2.id); vaultMessage.setNameOrId(vaultName); setVaultPermMessage.setVault(vaultMessage); @@ -777,7 +784,7 @@ describe('Client service', () => { test.skip('should remove permissions to a vault', async () => { const vaultName = 'vault1' as VaultName; const vaultsUnsetPerms = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.vaultsPermissionsUnset, ); @@ -793,9 +800,9 @@ describe('Client service', () => { // FIXME: not implemented yet // await vaultManager.setVaultPermissions(node2.id, vaultId); - const unsetVaultPermMessage = new clientPB.UnsetVaultPermMessage(); - const nodeMessage = new clientPB.NodeMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const unsetVaultPermMessage = new vaultsPB.PermUnset(); + const nodeMessage = new nodesPB.Node(); + const vaultMessage = new vaultsPB.Vault(); nodeMessage.setNodeId(node2.id); vaultMessage.setNameOrId(vaults[0].name); unsetVaultPermMessage.setVault(vaultMessage); @@ -811,7 +818,7 @@ describe('Client service', () => { test.skip('should get permissions to a vault', async () => { const vaultName = 'vault1' as VaultName; const vaultsPermissions = - grpcUtils.promisifyReadableStreamCall( + grpcUtils.promisifyReadableStreamCall( client, client.vaultsPermissions, ); @@ -828,16 +835,16 @@ describe('Client service', () => { // FIXME: not implemented yet // await vaultManager.setVaultPermissions(node2.id, vaultId); - const getVaultPermMessage = new clientPB.GetVaultPermMessage(); - const vaultMessage = new clientPB.VaultMessage(); - const nodeMessage = new clientPB.NodeMessage(); + const getVaultPermMessage = new vaultsPB.PermGet(); + const vaultMessage = new vaultsPB.Vault(); + const nodeMessage = new nodesPB.Node(); vaultMessage.setNameOrId(vaults[0].name); nodeMessage.setNodeId(node2.id); getVaultPermMessage.setVault(vaultMessage); getVaultPermMessage.setNode(nodeMessage); const resGen = vaultsPermissions(getVaultPermMessage, callCredentials); - const results: Array = []; + const results: Array = []; // FIXME // for await (const res of resGen) { // results.push(res.toObject()); @@ -865,11 +872,10 @@ describe('Client service', () => { // Creating the vault vault = await vaultManager.createVault(vaultName); - vaultsVersion = - grpcUtils.promisifyUnaryCall( - client, - client.vaultsVersion, - ); + vaultsVersion = grpcUtils.promisifyUnaryCall( + client, + client.vaultsVersion, + ); }); afterEach(async () => { @@ -889,10 +895,10 @@ describe('Client service', () => { expect(ver1Oid).not.toEqual(ver2Oid); // Revert the version - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(vaultName); - const vaultVersionMessage = new clientPB.VaultsVersionMessage(); + const vaultVersionMessage = new vaultsPB.Version(); vaultVersionMessage.setVault(vaultMessage); vaultVersionMessage.setVersionId(ver1Oid); @@ -937,10 +943,10 @@ describe('Client service', () => { expect(ver1Oid).not.toEqual(ver2Oid); // Revert the version - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); - const vaultVersionMessage = new clientPB.VaultsVersionMessage(); + const vaultVersionMessage = new vaultsPB.Version(); vaultVersionMessage.setVault(vaultMessage); vaultVersionMessage.setVersionId(ver1Oid); @@ -982,10 +988,10 @@ describe('Client service', () => { }); // Revert the version - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(makeVaultIdPretty(vault.vaultId)); - const vaultVersionMessage = new clientPB.VaultsVersionMessage(); + const vaultVersionMessage = new vaultsPB.Version(); vaultVersionMessage.setVault(vaultMessage); vaultVersionMessage.setVersionId('invalidOid'); @@ -1007,10 +1013,10 @@ describe('Client service', () => { expect(ver1Oid).not.toEqual(ver2Oid); // Revert the version - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(vaultName); - const vaultVersionMessage = new clientPB.VaultsVersionMessage(); + const vaultVersionMessage = new vaultsPB.Version(); vaultVersionMessage.setVault(vaultMessage); vaultVersionMessage.setVersionId(ver1Oid); @@ -1064,10 +1070,10 @@ describe('Client service', () => { }); // Revert the version - const vaultMessage = new clientPB.VaultMessage(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(vaultName); - const vaultVersionMessage = new clientPB.VaultsVersionMessage(); + const vaultVersionMessage = new vaultsPB.Version(); vaultVersionMessage.setVault(vaultMessage); vaultVersionMessage.setVersionId(ver1Oid); @@ -1116,11 +1122,10 @@ describe('Client service', () => { let commit3Oid: string; beforeEach(async () => { - vaultLog = - grpcUtils.promisifyReadableStreamCall( - client, - client.vaultsLog, - ); + vaultLog = grpcUtils.promisifyReadableStreamCall( + client, + client.vaultsLog, + ); // Creating the vault vault = await vaultManager.createVault(vaultName); @@ -1146,15 +1151,20 @@ describe('Client service', () => { }); test('should get the full log', async () => { + const vaultLog = + grpcUtils.promisifyReadableStreamCall( + client, + client.vaultsLog, + ); // Lovingly crafting the message - const vaultsLogMessage = new clientPB.VaultsLogMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const vaultsLogMessage = new vaultsPB.Log(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(vaultName); vaultsLogMessage.setVault(vaultMessage); const responseGen = await vaultLog(vaultsLogMessage, callCredentials); - const logMessages: clientPB.VaultsLogEntryMessage[] = []; + const logMessages: vaultsPB.LogEntry[] = []; for await (const entry of responseGen) { logMessages.push(entry); } @@ -1166,15 +1176,15 @@ describe('Client service', () => { }); test('should get a part of the log', async () => { // Lovingly crafting the message - const vaultsLogMessage = new clientPB.VaultsLogMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const vaultsLogMessage = new vaultsPB.Log(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(vaultName); vaultsLogMessage.setVault(vaultMessage); vaultsLogMessage.setLogDepth(2); const responseGen = await vaultLog(vaultsLogMessage, callCredentials); - const logMessages: clientPB.VaultsLogEntryMessage[] = []; + const logMessages: vaultsPB.LogEntry[] = []; for await (const entry of responseGen) { logMessages.push(entry); } @@ -1185,15 +1195,15 @@ describe('Client service', () => { }); test('should get a specific commit', async () => { // Lovingly crafting the message - const vaultsLogMessage = new clientPB.VaultsLogMessage(); - const vaultMessage = new clientPB.VaultMessage(); + const vaultsLogMessage = new vaultsPB.Log(); + const vaultMessage = new vaultsPB.Vault(); vaultMessage.setNameOrId(vaultName); vaultsLogMessage.setVault(vaultMessage); vaultsLogMessage.setCommitId(commit2Oid); const responseGen = await vaultLog(vaultsLogMessage, callCredentials); - const logMessages: clientPB.VaultsLogEntryMessage[] = []; + const logMessages: vaultsPB.LogEntry[] = []; for await (const entry of responseGen) { logMessages.push(entry); } @@ -1205,15 +1215,14 @@ describe('Client service', () => { }); describe('keys', () => { test('should get root keypair', async () => { - const getRootKeyPair = - grpcUtils.promisifyUnaryCall( - client, - client.keysKeyPairRoot, - ); + const getRootKeyPair = grpcUtils.promisifyUnaryCall( + client, + client.keysKeyPairRoot, + ); const keyPair = keyManager.getRootKeyPairPem(); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); const key = await getRootKeyPair(emptyMessage, callCredentials); @@ -1221,13 +1230,12 @@ describe('Client service', () => { expect(key.getPublic()).toBe(keyPair.publicKey); }); test('should reset root keypair', async () => { - const getRootKeyPair = - grpcUtils.promisifyUnaryCall( - client, - client.keysKeyPairRoot, - ); + const getRootKeyPair = grpcUtils.promisifyUnaryCall( + client, + client.keysKeyPairRoot, + ); - const resetKeyPair = grpcUtils.promisifyUnaryCall( + const resetKeyPair = grpcUtils.promisifyUnaryCall( client, client.keysKeyPairReset, ); @@ -1248,12 +1256,12 @@ describe('Client service', () => { expect(revTLSConfig1).toEqual(expectedTLSConfig1); expect(serverTLSConfig1).toEqual(expectedTLSConfig1); - const keyMessage = new clientPB.KeyMessage(); + const keyMessage = new keysPB.Key(); keyMessage.setName('somepassphrase'); await resetKeyPair(keyMessage, callCredentials); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); await fs.promises.writeFile(passwordFile, 'somepassphrase'); @@ -1284,7 +1292,7 @@ describe('Client service', () => { }; }); test('should renew root keypair', async () => { - const renewKeyPair = grpcUtils.promisifyUnaryCall( + const renewKeyPair = grpcUtils.promisifyUnaryCall( client, client.keysKeyPairRenew, ); @@ -1305,7 +1313,7 @@ describe('Client service', () => { expect(revTLSConfig1).toEqual(expectedTLSConfig1); expect(serverTLSConfig1).toEqual(expectedTLSConfig1); - const keyMessage = new clientPB.KeyMessage(); + const keyMessage = new keysPB.Key(); keyMessage.setName('somepassphrase'); await renewKeyPair(keyMessage, callCredentials); @@ -1337,20 +1345,18 @@ describe('Client service', () => { }; }); test('should encrypt and decrypt with root keypair', async () => { - const encryptWithKeyPair = - grpcUtils.promisifyUnaryCall( - client, - client.keysEncrypt, - ); + const encryptWithKeyPair = grpcUtils.promisifyUnaryCall( + client, + client.keysEncrypt, + ); - const decryptWithKeyPair = - grpcUtils.promisifyUnaryCall( - client, - client.keysDecrypt, - ); + const decryptWithKeyPair = grpcUtils.promisifyUnaryCall( + client, + client.keysDecrypt, + ); const plainText = Buffer.from('abc'); - const cryptoMessage = new clientPB.CryptoMessage(); + const cryptoMessage = new keysPB.Crypto(); cryptoMessage.setData(plainText.toString('binary')); const cipherText = await encryptWithKeyPair( @@ -1367,20 +1373,19 @@ describe('Client service', () => { expect(plainText_.getData()).toBe(plainText.toString()); }); test('should encrypt and decrypt with root keypair', async () => { - const signWithKeyPair = - grpcUtils.promisifyUnaryCall( - client, - client.keysSign, - ); + const signWithKeyPair = grpcUtils.promisifyUnaryCall( + client, + client.keysSign, + ); const verifyWithKeyPair = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.keysVerify, ); const data = Buffer.from('abc'); - const cryptoMessage = new clientPB.CryptoMessage(); + const cryptoMessage = new keysPB.Crypto(); cryptoMessage.setData(data.toString('binary')); const signature = await signWithKeyPair(cryptoMessage, callCredentials); @@ -1394,12 +1399,12 @@ describe('Client service', () => { test.skip('should change password', async () => { // FIXME: this and any change password, reset keys needs to be changed to use the new process. const changePasswordKeys = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.keysPasswordChange, ); - const passwordMessage = new clientPB.PasswordMessage(); + const passwordMessage = new sessionsPB.Password(); passwordMessage.setPassword('newpassword'); await changePasswordKeys(passwordMessage, callCredentials); @@ -1425,19 +1430,18 @@ describe('Client service', () => { // Await vaultManager.start({}); }); test('should get the root certificate and chains', async () => { - const getCerts = - grpcUtils.promisifyUnaryCall( - client, - client.keysCertsGet, - ); + const getCerts = grpcUtils.promisifyUnaryCall( + client, + client.keysCertsGet, + ); const getChainCerts = - grpcUtils.promisifyReadableStreamCall( + grpcUtils.promisifyReadableStreamCall( client, client.keysCertsChainGet, ); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); const res = getChainCerts(emptyMessage, callCredentials); const certs: Array = []; @@ -1457,12 +1461,12 @@ describe('Client service', () => { describe('identities', () => { test('should Authenticate an identity.', async () => { const identitiesAuthenticate = - grpcUtils.promisifyReadableStreamCall( + grpcUtils.promisifyReadableStreamCall( client, client.identitiesAuthenticate, ); - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(testToken.providerId); providerMessage.setMessage(testToken.identityId); @@ -1483,17 +1487,17 @@ describe('Client service', () => { expect((await gen.next()).done).toBeTruthy(); }); test('should manipulate tokens for providers', async () => { - const putToken = grpcUtils.promisifyUnaryCall( + const putToken = grpcUtils.promisifyUnaryCall( client, client.identitiesTokenPut, ); - const getTokens = grpcUtils.promisifyUnaryCall( + const getTokens = grpcUtils.promisifyUnaryCall( client, client.identitiesTokenGet, ); - const delToken = grpcUtils.promisifyUnaryCall( + const delToken = grpcUtils.promisifyUnaryCall( client, client.identitiesTokenDelete, ); @@ -1503,8 +1507,8 @@ describe('Client service', () => { accessToken: 'abc', }; - const mp = new clientPB.ProviderMessage(); - const m = new clientPB.TokenSpecificMessage(); + const mp = new identitiesPB.Provider(); + const m = new identitiesPB.TokenSpecific(); mp.setProviderId(providerId); mp.setMessage(identityId); @@ -1523,20 +1527,19 @@ describe('Client service', () => { expect(tokenData__.getToken()).toBe(''); }); test('should list providers.', async () => { - const providersGet = - grpcUtils.promisifyUnaryCall( - client, - client.identitiesProvidersList, - ); + const providersGet = grpcUtils.promisifyUnaryCall( + client, + client.identitiesProvidersList, + ); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); const test = await providersGet(emptyMessage, callCredentials); // Expect(test.getId()).toContain('github.com'); expect(test.getProviderId()).toContain('test-provider'); }); test('should list connected Identities.', async () => { const identitiesGetConnectedInfos = - grpcUtils.promisifyReadableStreamCall( + grpcUtils.promisifyReadableStreamCall( client, client.identitiesInfoGetConnected, ); @@ -1548,8 +1551,8 @@ describe('Client service', () => { testToken.tokenData, ); - const providerSearchMessage = new clientPB.ProviderSearchMessage(); - const providerMessage = new clientPB.ProviderMessage(); + const providerSearchMessage = new identitiesPB.ProviderSearch(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(testToken.providerId); providerMessage.setMessage(testToken.identityId); providerSearchMessage.setProvider(providerMessage); @@ -1569,7 +1572,7 @@ describe('Client service', () => { }); test('should get identity info.', async () => { const identitiesGetInfo = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.identitiesInfoGet, ); @@ -1581,7 +1584,7 @@ describe('Client service', () => { ); //Geting the info. - const providerMessage1 = new clientPB.ProviderMessage(); + const providerMessage1 = new identitiesPB.Provider(); providerMessage1.setProviderId(testToken.providerId); const providerMessage = await identitiesGetInfo( providerMessage1, @@ -1592,7 +1595,7 @@ describe('Client service', () => { }); test('should augment a keynode.', async () => { const identitiesAugmentKeynode = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.identitiesClaim, ); @@ -1604,7 +1607,7 @@ describe('Client service', () => { ); //Making the call. - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(testToken.providerId); providerMessage.setMessage(testToken.identityId); await identitiesAugmentKeynode(providerMessage, callCredentials); @@ -1618,7 +1621,7 @@ describe('Client service', () => { describe('gestalts', () => { test('should get all gestalts', async () => { const listGestalts = - grpcUtils.promisifyReadableStreamCall( + grpcUtils.promisifyReadableStreamCall( client, client.gestaltsGestaltList, ); @@ -1626,7 +1629,7 @@ describe('Client service', () => { await gestaltGraph.setNode(node2); await gestaltGraph.setIdentity(identity1); - const m = new clientPB.EmptyMessage(); + const m = new utilsPB.EmptyMessage(); const res = listGestalts(m, callCredentials); @@ -1676,14 +1679,13 @@ describe('Client service', () => { }); }); test('should get gestalt from Node.', async () => { - const gestaltsGetNode = - grpcUtils.promisifyUnaryCall( - client, - client.gestaltsGestaltGetByNode, - ); + const gestaltsGetNode = grpcUtils.promisifyUnaryCall( + client, + client.gestaltsGestaltGetByNode, + ); await createGestaltState(); - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(node2.id); //Making the call @@ -1696,13 +1698,13 @@ describe('Client service', () => { }); test('should get gestalt from identity.', async () => { const gestaltsGetIdentity = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.gestaltsGestaltGetByIdentity, ); await createGestaltState(); //Testing the call - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(identity1.providerId); providerMessage.setMessage(identity1.identityId); const res = await gestaltsGetIdentity(providerMessage, callCredentials); @@ -1714,12 +1716,12 @@ describe('Client service', () => { }); test('should discover gestalt via Node.', async () => { const gestaltsDiscoverNode = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.gestaltsDiscoveryByNode, ); - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(node2.id); //I have no idea how to test this. so we just check for expected error for now. await expect(() => @@ -1728,7 +1730,7 @@ describe('Client service', () => { }); test('should discover gestalt via Identity.', async () => { const gestaltsDiscoverIdentity = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.gestaltsDiscoveryByIdentity, ); @@ -1739,17 +1741,17 @@ describe('Client service', () => { testToken.tokenData, ); - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(testToken.providerId); providerMessage.setMessage(testToken.identityId); //Technically contains a node, but no other thing, will succeed with no results. expect( await gestaltsDiscoverIdentity(providerMessage, callCredentials), - ).toBeInstanceOf(clientPB.EmptyMessage); + ).toBeInstanceOf(utilsPB.EmptyMessage); }); test('should get gestalt permissions by node.', async () => { const gestaltsGetActionsByNode = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.gestaltsActionsGetByNode, ); @@ -1758,7 +1760,7 @@ describe('Client service', () => { await gestaltGraph.setGestaltActionByNode(node2.id, 'scan'); await gestaltGraph.setGestaltActionByNode(node2.id, 'notify'); - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(node2.id); // Should have permissions scan and notify as above. @@ -1780,7 +1782,7 @@ describe('Client service', () => { }); test('should get gestalt permissions by Identity.', async () => { const gestaltsGetActionsByIdentity = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.gestaltsActionsGetByIdentity, ); @@ -1799,7 +1801,7 @@ describe('Client service', () => { 'notify', ); - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(identity1.providerId); providerMessage.setMessage(identity1.identityId); // Should have permissions scan and notify as above. @@ -1822,15 +1824,15 @@ describe('Client service', () => { }); test('should set gestalt permissions by node.', async () => { const gestaltsSetActionByNode = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.gestaltsActionsSetByNode, ); await gestaltGraph.setNode(node1); await gestaltGraph.setNode(node2); - const setActionsMessage = new clientPB.SetActionsMessage(); - const nodeMessage = new clientPB.NodeMessage(); + const setActionsMessage = new permissionsPB.ActionSet(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(node2.id); setActionsMessage.setNode(nodeMessage); setActionsMessage.setAction('scan'); @@ -1847,7 +1849,7 @@ describe('Client service', () => { }); test('should set gestalt permissions by Identity.', async () => { const gestaltsSetActionByIdentity = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.gestaltsActionsSetByIdentity, ); @@ -1856,11 +1858,11 @@ describe('Client service', () => { await gestaltGraph.setIdentity(identity1); await gestaltGraph.linkNodeAndIdentity(node2, identity1); - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(identity1.providerId); providerMessage.setMessage(identity1.identityId); - const setActionsMessage = new clientPB.SetActionsMessage(); + const setActionsMessage = new permissionsPB.ActionSet(); setActionsMessage.setIdentity(providerMessage); setActionsMessage.setAction('scan'); // Should have permissions scan and notify as above. @@ -1882,7 +1884,7 @@ describe('Client service', () => { }); test('should unset gestalt permissions by node.', async () => { const gestaltsUnsetActionByNode = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.gestaltsActionsUnsetByNode, ); @@ -1891,10 +1893,10 @@ describe('Client service', () => { await gestaltGraph.setGestaltActionByNode(node2.id, 'scan'); await gestaltGraph.setGestaltActionByNode(node2.id, 'notify'); - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(node2.id); - const setActionsMessage = new clientPB.SetActionsMessage(); + const setActionsMessage = new permissionsPB.ActionSet(); setActionsMessage.setNode(nodeMessage); setActionsMessage.setAction('scan'); @@ -1914,7 +1916,7 @@ describe('Client service', () => { }); test('should unset gestalt permissions by Identity.', async () => { const gestaltsUnsetActionByIdentity = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.gestaltsActionsUnsetByIdentity, ); @@ -1933,11 +1935,11 @@ describe('Client service', () => { 'notify', ); - const providerMessage = new clientPB.ProviderMessage(); + const providerMessage = new identitiesPB.Provider(); providerMessage.setProviderId(identity1.providerId); providerMessage.setMessage(identity1.identityId); - const setActionsMessage = new clientPB.SetActionsMessage(); + const setActionsMessage = new permissionsPB.ActionSet(); setActionsMessage.setIdentity(providerMessage); setActionsMessage.setAction('scan'); @@ -1974,17 +1976,20 @@ describe('Client service', () => { await testKeynodeUtils.cleanupRemoteKeynode(server2); }); test('should add a node', async () => { - const nodesAdd = grpcUtils.promisifyUnaryCall( + const nodesAdd = grpcUtils.promisifyUnaryCall( client, client.nodesAdd, ); const nodeId = nodeId2; const host = '127.0.0.1'; const port = 11111; - const nodeAddressMessage = new clientPB.NodeAddressMessage(); + const nodeAddressMessage = new nodesPB.NodeAddress(); nodeAddressMessage.setNodeId(nodeId); - nodeAddressMessage.setHost(host); - nodeAddressMessage.setPort(port); + const addressMessage = new nodesPB.Address(); + addressMessage.setHost(host); + addressMessage.setPort(port); + nodeAddressMessage.setAddress(addressMessage); + await nodesAdd(nodeAddressMessage, callCredentials); const nodeAddress = await nodeManager.getNode(nodeId); if (!nodeAddress) { @@ -2000,11 +2005,11 @@ describe('Client service', () => { await server2.stop(); // Case 1: cannot establish new connection, so offline - const nodesPing = grpcUtils.promisifyUnaryCall( + const nodesPing = grpcUtils.promisifyUnaryCall( client, client.nodesPing, ); - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(serverNodeId); const res1 = await nodesPing(nodeMessage, callCredentials); expect(res1.getSuccess()).toEqual(false); @@ -2025,11 +2030,10 @@ describe('Client service', () => { global.failedConnectionTimeout * 2, ); // Ping needs to timeout, so longer test timeout required test('should find a node (local)', async () => { - const nodesFind = - grpcUtils.promisifyUnaryCall( - client, - client.nodesFind, - ); + const nodesFind = grpcUtils.promisifyUnaryCall( + client, + client.nodesFind, + ); // Case 1: node already exists in the local node graph (no contact required) const nodeId = nodeId3; const nodeAddress: NodeAddress = { @@ -2038,12 +2042,12 @@ describe('Client service', () => { }; await nodeManager.setNode(nodeId, nodeAddress); - const nodeMessage = new clientPB.NodeMessage(); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); const res = await nodesFind(nodeMessage, callCredentials); expect(res.getNodeId()).toEqual(nodeId); - expect(res.getHost()).toEqual(nodeAddress.ip); - expect(res.getPort()).toEqual(nodeAddress.port); + expect(res.getAddress()?.getHost()).toEqual(nodeAddress.ip); + expect(res.getAddress()?.getPort()).toEqual(nodeAddress.port); }); // FIXME: this operation seems to be pretty slow. test.skip( @@ -2058,17 +2062,16 @@ describe('Client service', () => { }; // Setting the information on a remote node. await server.nodes.setNode(nodeId, nodeAddress); - const nodesFind = - grpcUtils.promisifyUnaryCall( - client, - client.nodesFind, - ); - const nodeMessage = new clientPB.NodeMessage(); + const nodesFind = grpcUtils.promisifyUnaryCall( + client, + client.nodesFind, + ); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); const res = await nodesFind(nodeMessage, callCredentials); expect(res.getNodeId()).toEqual(nodeId); - expect(res.getHost()).toEqual(nodeAddress.ip); - expect(res.getPort()).toEqual(nodeAddress.port); + expect(res.getAddress()?.getHost()).toEqual(nodeAddress.ip); + expect(res.getAddress()?.getPort()).toEqual(nodeAddress.port); }, global.failedConnectionTimeout * 2, ); @@ -2084,12 +2087,11 @@ describe('Client service', () => { ip: '127.0.0.2' as Host, port: 22222 as Port, } as NodeAddress); - const nodesFind = - grpcUtils.promisifyUnaryCall( - client, - client.nodesFind, - ); - const nodeMessage = new clientPB.NodeMessage(); + const nodesFind = grpcUtils.promisifyUnaryCall( + client, + client.nodesFind, + ); + const nodeMessage = new nodesPB.Node(); nodeMessage.setNodeId(nodeId); // So unfindableNode cannot be found await expect(() => @@ -2142,11 +2144,11 @@ describe('Client service', () => { }); test('should send a gestalt invite (no existing invitation)', async () => { // Node Claim Case 1: No invitations have been received - const nodesClaim = grpcUtils.promisifyUnaryCall( + const nodesClaim = grpcUtils.promisifyUnaryCall( client, client.nodesClaim, ); - const nodeClaimMessage = new clientPB.NodeClaimMessage(); + const nodeClaimMessage = new nodesPB.Claim(); nodeClaimMessage.setNodeId(remoteGestalt.nodes.getNodeId()); nodeClaimMessage.setForceInvite(false); const res = await nodesClaim(nodeClaimMessage, callCredentials); @@ -2161,11 +2163,11 @@ describe('Client service', () => { type: 'GestaltInvite', }, ); - const nodesClaim = grpcUtils.promisifyUnaryCall( + const nodesClaim = grpcUtils.promisifyUnaryCall( client, client.nodesClaim, ); - const nodeClaimMessage = new clientPB.NodeClaimMessage(); + const nodeClaimMessage = new nodesPB.Claim(); nodeClaimMessage.setNodeId(remoteGestalt.nodes.getNodeId()); nodeClaimMessage.setForceInvite(true); const res = await nodesClaim(nodeClaimMessage, callCredentials); @@ -2180,11 +2182,11 @@ describe('Client service', () => { type: 'GestaltInvite', }, ); - const nodesClaim = grpcUtils.promisifyUnaryCall( + const nodesClaim = grpcUtils.promisifyUnaryCall( client, client.nodesClaim, ); - const nodeClaimMessage = new clientPB.NodeClaimMessage(); + const nodeClaimMessage = new nodesPB.Claim(); nodeClaimMessage.setNodeId(remoteGestalt.nodes.getNodeId()); nodeClaimMessage.setForceInvite(false); const res = await nodesClaim(nodeClaimMessage, callCredentials); @@ -2230,18 +2232,18 @@ describe('Client service', () => { await testKeynodeUtils.addRemoteDetails(polykeyAgent, receiver); const notificationsSend = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.notificationsSend, ); - const notificationsSendMessage = new clientPB.NotificationsSendMessage(); - const generalMessage = new clientPB.GeneralTypeMessage(); + const notificationsSendMessage = new notificationsPB.Send(); + const generalMessage = new notificationsPB.General(); generalMessage.setMessage('msg'); notificationsSendMessage.setReceiverId(receiver.nodes.getNodeId()); notificationsSendMessage.setData(generalMessage); - // Send notification returns nothing - check remote node received messages + // Send notification returns nothing - check remote node received clientPB await notificationsSend(notificationsSendMessage, callCredentials); const notifs = await receiver.notifications.readNotifications(); expect(notifs[0].data).toEqual({ @@ -2274,12 +2276,12 @@ describe('Client service', () => { await sender.notifications.sendNotification(node1.id, vaultShareData); const notificationsRead = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.notificationsRead, ); - const notificationsReadMessage = new clientPB.NotificationsReadMessage(); + const notificationsReadMessage = new notificationsPB.Read(); notificationsReadMessage.setUnread(false); notificationsReadMessage.setNumber('all'); notificationsReadMessage.setOrder('newest'); @@ -2319,12 +2321,12 @@ describe('Client service', () => { await sender.notifications.sendNotification(node1.id, msgData3); const notificationsRead = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.notificationsRead, ); - const notificationsReadMessage = new clientPB.NotificationsReadMessage(); + const notificationsReadMessage = new notificationsPB.Read(); notificationsReadMessage.setUnread(false); notificationsReadMessage.setNumber('1'); notificationsReadMessage.setOrder('newest'); @@ -2352,12 +2354,12 @@ describe('Client service', () => { await sender.notifications.sendNotification(node1.id, msgData2); const notificationsClear = - grpcUtils.promisifyUnaryCall( + grpcUtils.promisifyUnaryCall( client, client.notificationsClear, ); - const emptyMessage = new clientPB.EmptyMessage(); + const emptyMessage = new utilsPB.EmptyMessage(); await notificationsClear(emptyMessage, callCredentials); // Call read notifications to check there are none @@ -2366,3 +2368,40 @@ describe('Client service', () => { }); }); }); + +describe('google/protobuf message examples', () => { + test('testing Any message type', async () => { + const anyMessage = new Any(); + const echoMessage = new utilsPB.EchoMessage(); + anyMessage.pack(echoMessage.serializeBinary(), 'common.EchoMessage'); + const test2 = anyMessage.unpack( + utilsPB.EchoMessage.deserializeBinary, + 'common.EchoMessage', + ); + expect(test2).toBeInstanceOf(utilsPB.EchoMessage); // Is a EchoMessage + const test3 = anyMessage.unpack( + utilsPB.StatusMessage.deserializeBinary, + 'common.StatusMessage', + ); + expect(test3).toBe(null); // Is null + }); + test('testing TimeStamp message', async () => { + const timeStampMessage = new Timestamp(); + const date = new Date(1000000); + timeStampMessage.fromDate(date); + + expect(timeStampMessage.getNanos()).toEqual(0); + expect(timeStampMessage.getSeconds()).toEqual(date.getTime() / 1000); + expect(timeStampMessage.toDate()).toEqual(date); + }); + test('testing structs usage', async () => { + const testObject = { + 1: 1, + two: 2, + three: 'Three', + }; + const structMessage = Struct.fromJavaScript(testObject); + + expect(structMessage.toJavaScript()).toStrictEqual(testObject); + }); +}); diff --git a/tests/client/utils.ts b/tests/client/utils.ts index 78ff1b6a5..941bb8b46 100644 --- a/tests/client/utils.ts +++ b/tests/client/utils.ts @@ -1,8 +1,11 @@ import * as grpc from '@grpc/grpc-js'; -import { ClientService, IClientServer } from '@/proto/js/Client_grpc_pb'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; -import { ClientClient } from '@/proto/js/Client_grpc_pb'; +import { + ClientServiceService, + IClientServiceServer, + ClientServiceClient, +} from '@/proto/js/polykey/v1/client_service_grpc_pb'; import { createClientService } from '@/client'; import PolykeyClient from '@/PolykeyClient'; import { promisify } from '@/utils'; @@ -18,7 +21,7 @@ async function openTestClientServer({ secure?: boolean; }) { const _secure = secure ?? true; - const clientService: IClientServer = createClientService({ + const clientService: IClientServiceServer = createClientService({ polykeyAgent, keyManager: polykeyAgent.keys, vaultManager: polykeyAgent.vaults, @@ -41,7 +44,7 @@ async function openTestClientServer({ : grpcUtils.serverInsecureCredentials(); const server = new grpc.Server(); - server.addService(ClientService, clientService); + server.addService(ClientServiceService, clientService); const bindAsync = promisify(server.bindAsync).bind(server); const port = await bindAsync(`127.0.0.1:0`, callCredentials); server.start(); @@ -75,8 +78,10 @@ async function closeTestClientClient(client: PolykeyClient) { await client.stop(); } -async function openSimpleClientClient(port: number): Promise { - const client = new ClientClient( +async function openSimpleClientClient( + port: number, +): Promise { + const client = new ClientServiceClient( `127.0.0.1:${port}`, grpc.ChannelCredentials.createInsecure(), ); @@ -85,7 +90,7 @@ async function openSimpleClientClient(port: number): Promise { return client; } -function closeSimpleClientClient(client: ClientClient): void { +function closeSimpleClientClient(client: ClientServiceClient): void { client.close(); } diff --git a/tests/grpc/GRPCClient.test.ts b/tests/grpc/GRPCClient.test.ts index 991be5c5b..d25ade474 100644 --- a/tests/grpc/GRPCClient.test.ts +++ b/tests/grpc/GRPCClient.test.ts @@ -3,7 +3,7 @@ import type { Host, Port } from '@/network/types'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import { utils as keysUtils } from '@/keys'; import { utils as networkUtils } from '@/network'; -import * as testPB from '@/proto/js/Test_pb'; +import * as utilsPB from '@/proto/js/polykey/v1/utils/utils_pb'; import * as utils from './utils'; describe('GRPCClient', () => { @@ -79,7 +79,7 @@ describe('GRPCClient', () => { }, timeout: 1000, }); - const m = new testPB.EchoMessage(); + const m = new utilsPB.EchoMessage(); m.setChallenge('a98u3e4d'); const pCall = client.unary(m); expect(pCall.call.getPeer()).toBe(`dns:127.0.0.1:${port}`); diff --git a/tests/grpc/GRPCServer.test.ts b/tests/grpc/GRPCServer.test.ts index ff6c7253b..94260cb08 100644 --- a/tests/grpc/GRPCServer.test.ts +++ b/tests/grpc/GRPCServer.test.ts @@ -4,7 +4,7 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import { GRPCServer, utils as grpcUtils } from '@/grpc'; import { utils as keysUtils } from '@/keys'; import { utils as networkUtils } from '@/network'; -import * as testPB from '@/proto/js/Test_pb'; +import * as utilsPB from '@/proto/js/polykey/v1/utils/utils_pb'; import * as utils from './utils'; describe('GRPCServer', () => { @@ -23,7 +23,7 @@ describe('GRPCServer', () => { 31536000, ); await server.start({ - services: [[utils.TestService, utils.testService]], + services: [[utils.TestServiceService, utils.testService]], host: '127.0.0.1' as Host, port: 0 as Port, tlsConfig: { @@ -47,7 +47,7 @@ describe('GRPCServer', () => { 31536000, ); await server.start({ - services: [[utils.TestService, utils.testService]], + services: [[utils.TestServiceService, utils.testService]], host: '127.0.0.1' as Host, port: 0 as Port, tlsConfig: { @@ -69,11 +69,11 @@ describe('GRPCServer', () => { keysUtils.privateKeyToPem(clientKeyPair.privateKey), keysUtils.certToPem(clientCert), ); - const unary = grpcUtils.promisifyUnaryCall( + const unary = grpcUtils.promisifyUnaryCall( client, client.unary, ); - const m = new testPB.EchoMessage(); + const m = new utilsPB.EchoMessage(); m.setChallenge('a98u3e4d'); const pCall = unary(m); expect(pCall.call.getPeer()).toBe(`dns:127.0.0.1:${server.getPort()}`); @@ -94,7 +94,7 @@ describe('GRPCServer', () => { 31536000, ); await server.start({ - services: [[utils.TestService, utils.testService]], + services: [[utils.TestServiceService, utils.testService]], host: '127.0.0.1' as Host, port: 0 as Port, tlsConfig: { @@ -117,11 +117,11 @@ describe('GRPCServer', () => { keysUtils.privateKeyToPem(clientKeyPair.privateKey), keysUtils.certToPem(clientCert), ); - const unary1 = grpcUtils.promisifyUnaryCall( + const unary1 = grpcUtils.promisifyUnaryCall( client1, client1.unary, ); - const m1 = new testPB.EchoMessage(); + const m1 = new utilsPB.EchoMessage(); m1.setChallenge('98f7g98dfg71'); const pCall1 = unary1(m1); expect(pCall1.call.getPeer()).toBe(`dns:127.0.0.1:${server.getPort()}`); @@ -140,7 +140,7 @@ describe('GRPCServer', () => { certChainPem: keysUtils.certToPem(serverCert2), }); // Still using first connection - const m2 = new testPB.EchoMessage(); + const m2 = new utilsPB.EchoMessage(); m2.setChallenge('12308947239847'); const pCall2 = unary1(m2); expect(pCall2.call.getPeer()).toBe(`dns:127.0.0.1:${server.getPort()}`); @@ -154,11 +154,11 @@ describe('GRPCServer', () => { keysUtils.privateKeyToPem(clientKeyPair.privateKey), keysUtils.certToPem(clientCert), ); - const unary2 = grpcUtils.promisifyUnaryCall( + const unary2 = grpcUtils.promisifyUnaryCall( client2, client2.unary, ); - const m3 = new testPB.EchoMessage(); + const m3 = new utilsPB.EchoMessage(); m3.setChallenge('aa89fusd98f'); const pCall3 = unary2(m3); expect(pCall3.call.getPeer()).toBe(`dns:127.0.0.1:${server.getPort()}`); diff --git a/tests/grpc/utils.test.ts b/tests/grpc/utils.test.ts index 328b3a717..d9e06b3d2 100644 --- a/tests/grpc/utils.test.ts +++ b/tests/grpc/utils.test.ts @@ -1,14 +1,14 @@ import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import * as grpc from '@grpc/grpc-js'; import { utils as grpcUtils, errors as grpcErrors } from '@/grpc'; -import { TestClient } from '@/proto/js/Test_grpc_pb'; -import * as testPB from '@/proto/js/Test_pb'; +import { TestServiceClient } from '@/proto/js/polykey/v1/test_service_grpc_pb'; +import * as utilsPB from '@/proto/js/polykey/v1/utils/utils_pb'; import * as utils from './utils'; const logger = new Logger('utils test', LogLevel.INFO, [new StreamHandler()]); describe('GRPC utils', () => { - let client: TestClient, server: grpc.Server, port: number; + let client: TestServiceClient, server: grpc.Server, port: number; beforeAll(async () => { [server, port] = await utils.openTestServer(); client = await utils.openTestClient(port); @@ -24,11 +24,11 @@ describe('GRPC utils', () => { await utils.closeTestServer(server); }); test('promisified client unary call', async () => { - const unary = grpcUtils.promisifyUnaryCall( + const unary = grpcUtils.promisifyUnaryCall( client, client.unary, ); - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); messageTo.setChallenge('some random string'); const pCall = unary(messageTo); expect(pCall.call.getPeer()).toBe(`dns:127.0.0.1:${port}`); @@ -36,11 +36,11 @@ describe('GRPC utils', () => { expect(messageFrom.getChallenge()).toBe(messageTo.getChallenge()); }); test('promisified client unary call error', async () => { - const unary = grpcUtils.promisifyUnaryCall( + const unary = grpcUtils.promisifyUnaryCall( client, client.unary, ); - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); messageTo.setChallenge('error'); const pCall = unary(messageTo); await expect(pCall).rejects.toThrow(grpcErrors.ErrorGRPC); @@ -56,12 +56,12 @@ describe('GRPC utils', () => { }); test('promisified reading server stream', async () => { const serverStream = - grpcUtils.promisifyReadableStreamCall( + grpcUtils.promisifyReadableStreamCall( client, client.serverStream, ); const challenge = '4444'; - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); messageTo.setChallenge(challenge); const stream = serverStream(messageTo); const received: Array = []; @@ -81,12 +81,12 @@ describe('GRPC utils', () => { }); test('promisified reading server stream - error', async () => { const serverStream = - grpcUtils.promisifyReadableStreamCall( + grpcUtils.promisifyReadableStreamCall( client, client.serverStream, ); const challenge = 'error'; - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); messageTo.setChallenge(challenge); const stream = serverStream(messageTo); await expect(() => stream.next()).rejects.toThrow(grpcErrors.ErrorGRPC); @@ -103,12 +103,12 @@ describe('GRPC utils', () => { }); test('promisified reading server stream - destroy first', async () => { const serverStream = - grpcUtils.promisifyReadableStreamCall( + grpcUtils.promisifyReadableStreamCall( client, client.serverStream, ); const challenge = '4444'; - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); messageTo.setChallenge(challenge); const stream = serverStream(messageTo); // Destroy the stream at the beginning @@ -127,17 +127,17 @@ describe('GRPC utils', () => { }); test('promisified reading server stream - destroy second', async () => { const serverStream = - grpcUtils.promisifyReadableStreamCall( + grpcUtils.promisifyReadableStreamCall( client, client.serverStream, ); const challenge = '4444'; - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); messageTo.setChallenge(challenge); const stream = serverStream(messageTo); const result1 = await stream.next(); expect(result1.done).toBe(false); - expect(result1.value).toBeInstanceOf(testPB.EchoMessage); + expect(result1.value).toBeInstanceOf(utilsPB.EchoMessage); const result2 = await stream.next(null); expect(result2).toMatchObject({ value: undefined, @@ -154,11 +154,11 @@ describe('GRPC utils', () => { }); test('promisified writing client stream', async () => { const clientStream = grpcUtils.promisifyWritableStreamCall< - testPB.EchoMessage, - testPB.EchoMessage + utilsPB.EchoMessage, + utilsPB.EchoMessage >(client, client.clientStream); const [genStream, response] = clientStream(); - const m = new testPB.EchoMessage(); + const m = new utilsPB.EchoMessage(); m.setChallenge('d89f7u983e4d'); for (let i = 0; i < 5; i++) { await genStream.next(m); @@ -171,8 +171,8 @@ describe('GRPC utils', () => { }); test('promisified writing client stream - end first', async () => { const clientStream = grpcUtils.promisifyWritableStreamCall< - testPB.EchoMessage, - testPB.EchoMessage + utilsPB.EchoMessage, + utilsPB.EchoMessage >(client, client.clientStream); const [genStream, response] = clientStream(); const result1 = await genStream.next(null); // Closed stream @@ -192,26 +192,26 @@ describe('GRPC utils', () => { }); test('promisify reading and writing duplex stream', async () => { const duplexStream = grpcUtils.promisifyDuplexStreamCall< - testPB.EchoMessage, - testPB.EchoMessage + utilsPB.EchoMessage, + utilsPB.EchoMessage >(client, client.duplexStream); const genDuplex = duplexStream(); - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); messageTo.setChallenge('d89f7u983e4d'); await genDuplex.write(messageTo); const response1 = await genDuplex.read(); expect(response1.done).toBe(false); - expect(response1.value).toBeInstanceOf(testPB.EchoMessage); + expect(response1.value).toBeInstanceOf(utilsPB.EchoMessage); const response2 = await genDuplex.read(); expect(response2.done).toBe(false); - expect(response2.value).toBeInstanceOf(testPB.EchoMessage); + expect(response2.value).toBeInstanceOf(utilsPB.EchoMessage); await genDuplex.next(null); expect(genDuplex.stream.getPeer()).toBe(`127.0.0.1:${port}`); }); test('promisify reading and writing duplex stream - end and destroy with next', async () => { const duplexStream = grpcUtils.promisifyDuplexStreamCall< - testPB.EchoMessage, - testPB.EchoMessage + utilsPB.EchoMessage, + utilsPB.EchoMessage >(client, client.duplexStream); const genDuplex = duplexStream(); await genDuplex.next(null); @@ -220,8 +220,8 @@ describe('GRPC utils', () => { }); test('promisify reading and writing duplex stream - end and destroy with write and read', async () => { const duplexStream = grpcUtils.promisifyDuplexStreamCall< - testPB.EchoMessage, - testPB.EchoMessage + utilsPB.EchoMessage, + utilsPB.EchoMessage >(client, client.duplexStream); const genDuplex = duplexStream(); // When duplex streams are ended, reading will hang @@ -233,12 +233,12 @@ describe('GRPC utils', () => { }); test('promisify reading and writing duplex stream - cannot write after destroy', async () => { const duplexStream = grpcUtils.promisifyDuplexStreamCall< - testPB.EchoMessage, - testPB.EchoMessage + utilsPB.EchoMessage, + utilsPB.EchoMessage >(client, client.duplexStream); const genDuplex = duplexStream(); await genDuplex.read(null); - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); messageTo.setChallenge('d89f7u983e4d'); await expect(() => genDuplex.write(messageTo)).rejects.toThrow( /Cannot call write after a stream was destroyed/, @@ -253,11 +253,11 @@ describe('GRPC utils', () => { }); test('promisify reading and writing duplex stream - error with read', async () => { const duplexStream = grpcUtils.promisifyDuplexStreamCall< - testPB.EchoMessage, - testPB.EchoMessage + utilsPB.EchoMessage, + utilsPB.EchoMessage >(client, client.duplexStream); const genDuplex = duplexStream(); - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); messageTo.setChallenge('error'); await genDuplex.write(messageTo); await expect(() => genDuplex.read()).rejects.toThrow(grpcErrors.ErrorGRPC); @@ -266,11 +266,11 @@ describe('GRPC utils', () => { }); test('promisify reading and writing duplex stream - error with next', async () => { const duplexStream = grpcUtils.promisifyDuplexStreamCall< - testPB.EchoMessage, - testPB.EchoMessage + utilsPB.EchoMessage, + utilsPB.EchoMessage >(client, client.duplexStream); const genDuplex = duplexStream(); - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); messageTo.setChallenge('error'); await expect(() => genDuplex.next(messageTo)).rejects.toThrow( grpcErrors.ErrorGRPC, diff --git a/tests/grpc/utils.ts b/tests/grpc/utils.ts index fc6604448..f6bf2c382 100644 --- a/tests/grpc/utils.ts +++ b/tests/grpc/utils.ts @@ -1,21 +1,25 @@ import type { NodeId } from '@/nodes/types'; import type { TLSConfig } from '@/network/types'; +import type { Host, Port, ProxyConfig } from '@/network/types'; +import Logger from '@matrixai/logger'; import * as grpc from '@grpc/grpc-js'; import { GRPCClient, utils as grpcUtils, errors as grpcErrors } from '@/grpc'; -import * as testPB from '@/proto/js/Test_pb'; -import { TestService, ITestServer, TestClient } from '@/proto/js/Test_grpc_pb'; import { promisify } from '@/utils'; -import { Host, Port, ProxyConfig } from '@/network/types'; -import Logger from '@matrixai/logger'; +import { + TestServiceService, + ITestServiceServer, + TestServiceClient, +} from '@/proto/js/polykey/v1/test_service_grpc_pb'; +import * as utilsPB from '@/proto/js/polykey/v1/utils/utils_pb'; /** * Test GRPC service */ -const testService: ITestServer = { +const testService: ITestServiceServer = { unary: async ( - call: grpc.ServerUnaryCall, - callback: grpc.sendUnaryData, + call: grpc.ServerUnaryCall, + callback: grpc.sendUnaryData, ): Promise => { const challenge = call.request.getChallenge(); if (challenge === 'error') { @@ -28,17 +32,17 @@ const testService: ITestServer = { ); } else { // Otherwise we will echo the challenge - const message = new testPB.EchoMessage(); + const message = new utilsPB.EchoMessage(); message.setChallenge(challenge); callback(null, message); } }, serverStream: async ( - call: grpc.ServerWritableStream, + call: grpc.ServerWritableStream, ): Promise => { const genWritable = grpcUtils.generatorWritable(call); const messageFrom = call.request; - const messageTo = new testPB.EchoMessage(); + const messageTo = new utilsPB.EchoMessage(); const challenge = messageFrom.getChallenge(); if (challenge === 'error') { await genWritable.throw( @@ -56,10 +60,10 @@ const testService: ITestServer = { } }, clientStream: async ( - call: grpc.ServerReadableStream, - callback: grpc.sendUnaryData, + call: grpc.ServerReadableStream, + callback: grpc.sendUnaryData, ): Promise => { - const genReadable = grpcUtils.generatorReadable(call); + const genReadable = grpcUtils.generatorReadable(call); let data = ''; try { for await (const m of genReadable) { @@ -70,12 +74,12 @@ const testService: ITestServer = { // Reflect the error back callback(e, null); } - const response = new testPB.EchoMessage(); + const response = new utilsPB.EchoMessage(); response.setChallenge(data); callback(null, response); }, duplexStream: async ( - call: grpc.ServerDuplexStream, + call: grpc.ServerDuplexStream, ) => { const genDuplex = grpcUtils.generatorDuplex(call); const readStatus = await genDuplex.read(); @@ -92,7 +96,7 @@ const testService: ITestServer = { new grpcErrors.ErrorGRPC('test error', { grpc: true }), ); } else { - const outgoingMessage = new testPB.EchoMessage(); + const outgoingMessage = new utilsPB.EchoMessage(); outgoingMessage.setChallenge(incomingMessage.getChallenge()); // Write 2 messages await genDuplex.write(outgoingMessage); @@ -103,7 +107,7 @@ const testService: ITestServer = { }, }; -class GRPCClientTest extends GRPCClient { +class GRPCClientTest extends GRPCClient { constructor({ nodeId, host, @@ -134,21 +138,21 @@ class GRPCClientTest extends GRPCClient { timeout?: number; } = {}): Promise { await super.start({ - clientConstructor: TestClient, + clientConstructor: TestServiceClient, tlsConfig, timeout, }); } public unary(...args) { - return grpcUtils.promisifyUnaryCall( + return grpcUtils.promisifyUnaryCall( this.client, this.client.unary, )(...args); } public serverStream(...args) { - return grpcUtils.promisifyReadableStreamCall( + return grpcUtils.promisifyReadableStreamCall( this.client, this.client.serverStream, )(...args); @@ -156,8 +160,8 @@ class GRPCClientTest extends GRPCClient { public clientStream(...args) { return grpcUtils.promisifyWritableStreamCall< - testPB.EchoMessage, - testPB.EchoMessage + utilsPB.EchoMessage, + utilsPB.EchoMessage >( this.client, this.client.clientStream, @@ -166,8 +170,8 @@ class GRPCClientTest extends GRPCClient { public duplexStream(...args) { return grpcUtils.promisifyDuplexStreamCall< - testPB.EchoMessage, - testPB.EchoMessage + utilsPB.EchoMessage, + utilsPB.EchoMessage >( this.client, this.client.duplexStream, @@ -177,7 +181,7 @@ class GRPCClientTest extends GRPCClient { async function openTestServer(): Promise<[grpc.Server, number]> { const server = new grpc.Server(); - server.addService(TestService, testService); + server.addService(TestServiceService, testService); const bindAsync = promisify(server.bindAsync).bind(server); const port = await bindAsync( `127.0.0.1:0`, @@ -196,8 +200,8 @@ function closeTestServerForce(server: grpc.Server): void { server.forceShutdown(); } -async function openTestClient(port: number): Promise { - const client = new TestClient( +async function openTestClient(port: number): Promise { + const client = new TestServiceClient( `127.0.0.1:${port}`, grpcUtils.clientInsecureCredentials(), ); @@ -206,7 +210,7 @@ async function openTestClient(port: number): Promise { return client; } -function closeTestClient(client: TestClient): void { +function closeTestClient(client: TestServiceClient): void { client.close(); } @@ -215,7 +219,7 @@ async function openTestClientSecure( port: number, keyPrivatePem, certChainPem, -): Promise { +): Promise { const clientOptions = { // Prevents complaints with having an ip address as the server name 'grpc.ssl_target_name_override': nodeId, @@ -224,7 +228,7 @@ async function openTestClientSecure( keyPrivatePem, certChainPem, ); - const client = new TestClient( + const client = new TestServiceClient( `127.0.0.1:${port}`, clientCredentials, clientOptions, @@ -234,7 +238,7 @@ async function openTestClientSecure( return client; } -function closeTestClientSecure(client: TestClient) { +function closeTestClientSecure(client: TestServiceClient) { client.close(); } @@ -243,7 +247,7 @@ async function openTestServerSecure( certChainPem, ): Promise<[grpc.Server, number]> { const server = new grpc.Server(); - server.addService(TestService, testService); + server.addService(TestServiceService, testService); const bindAsync = promisify(server.bindAsync).bind(server); const serverCredentials = grpcUtils.serverSecureCredentials( keyPrivatePem, @@ -264,7 +268,7 @@ function closeTestServerSecureForce(server: grpc.Server): void { } export { - TestService, + TestServiceService, testService, GRPCClientTest, openTestServer, diff --git a/tests/network/index.test.ts b/tests/network/index.test.ts index 016a07ec9..489dea173 100644 --- a/tests/network/index.test.ts +++ b/tests/network/index.test.ts @@ -3,7 +3,7 @@ import type { Host, Port } from '@/network/types'; import Logger, { LogLevel, StreamHandler } from '@matrixai/logger'; import { utils as keysUtils } from '@/keys'; import { ForwardProxy, ReverseProxy, utils as networkUtils } from '@/network'; -import * as testPB from '@/proto/js/Test_pb'; +import * as utilsPB from '@/proto/js/polykey/v1/utils/utils_pb'; import { openTestServer, closeTestServer, GRPCClientTest } from '../grpc/utils'; describe('network index', () => { @@ -71,7 +71,7 @@ describe('network index', () => { logger, }); await client.start(); - const m = new testPB.EchoMessage(); + const m = new utilsPB.EchoMessage(); const challenge = 'Hello!'; m.setChallenge(challenge); // Unary call diff --git a/tests/nodes/NodeConnection.test.ts b/tests/nodes/NodeConnection.test.ts index ba4450206..04b1e5ad6 100644 --- a/tests/nodes/NodeConnection.test.ts +++ b/tests/nodes/NodeConnection.test.ts @@ -11,7 +11,7 @@ import { VaultManager } from '@/vaults'; import { KeyManager } from '@/keys'; import { utils as networkUtils } from '@/network'; import GRPCServer from '@/grpc/GRPCServer'; -import { AgentService, createAgentService } from '@/agent'; +import { AgentServiceService, createAgentService } from '@/agent'; import { ACL } from '@/acl'; import { GestaltGraph } from '@/gestalts'; import { DB } from '@matrixai/db'; @@ -196,7 +196,7 @@ describe('NodeConnection', () => { logger: logger, }); await server.start({ - services: [[AgentService, agentService]], + services: [[AgentServiceService, agentService]], host: targetHost, }); revTLSConfig = { diff --git a/tests/notifications/NotificationsManager.test.ts b/tests/notifications/NotificationsManager.test.ts index b3c0e1cdb..273954a3d 100644 --- a/tests/notifications/NotificationsManager.test.ts +++ b/tests/notifications/NotificationsManager.test.ts @@ -19,7 +19,7 @@ import { GestaltGraph } from '@/gestalts'; import { NodeManager } from '@/nodes'; import { NotificationsManager } from '@/notifications'; import { ForwardProxy, ReverseProxy } from '@/network'; -import { AgentService, createAgentService } from '@/agent'; +import { AgentServiceService, createAgentService } from '@/agent'; import * as networkUtils from '@/network/utils'; import { makeCrypto } from '../utils'; @@ -169,7 +169,7 @@ describe('NotificationsManager', () => { logger: logger, }); await server.start({ - services: [[AgentService, agentService]], + services: [[AgentServiceService, agentService]], host: receiverHost, }); diff --git a/tests/vaults/VaultManager.test.ts b/tests/vaults/VaultManager.test.ts index d50d04d56..69c5d6b0a 100644 --- a/tests/vaults/VaultManager.test.ts +++ b/tests/vaults/VaultManager.test.ts @@ -17,9 +17,9 @@ import { GestaltGraph } from '@/gestalts'; import { DB } from '@matrixai/db'; import { ForwardProxy, ReverseProxy } from '@/network'; import GRPCServer from '@/grpc/GRPCServer'; -import { AgentService, createAgentService } from '@/agent'; +import { AgentServiceService, createAgentService } from '@/agent'; import { NotificationsManager } from '@/notifications'; -import { IAgentServer } from '@/proto/js/Agent_grpc_pb'; +import { IAgentServiceServer } from '@/proto/js/polykey/v1/agent_service_grpc_pb'; import { errors as vaultErrors } from '@/vaults'; import { utils as vaultUtils } from '@/vaults'; @@ -530,7 +530,8 @@ describe('VaultManager', () => { let targetNodeId: NodeId, altNodeId: NodeId; let revTLSConfig: TLSConfig, altRevTLSConfig: TLSConfig; - let targetAgentService: IAgentServer, altAgentService: IAgentServer; + let targetAgentService: IAgentServiceServer, + altAgentService: IAgentServiceServer; let targetServer: GRPCServer, altServer: GRPCServer; let node: NodeInfo; @@ -630,7 +631,7 @@ describe('VaultManager', () => { logger: logger, }); await targetServer.start({ - services: [[AgentService, targetAgentService]], + services: [[AgentServiceService, targetAgentService]], host: targetHost, }); @@ -722,7 +723,7 @@ describe('VaultManager', () => { logger: logger, }); await altServer.start({ - services: [[AgentService, altAgentService]], + services: [[AgentServiceService, altAgentService]], host: altHostIn, });