From bc171d9b8bb759fafcb5642f3e2371e5724235d0 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Mon, 18 Oct 2021 00:20:58 +0800 Subject: [PATCH] add Node.js SDK Client https://github.com/mosn/layotto/issues/258 --- .gitignore | 2 + sdk/js-sdk/README.md | 27 + sdk/js-sdk/jest.config.js | 5 + sdk/js-sdk/package.json | 40 + sdk/js-sdk/proto/appcallback_grpc_pb.d.ts | 59 + sdk/js-sdk/proto/appcallback_grpc_pb.js | 85 + sdk/js-sdk/proto/appcallback_pb.d.ts | 128 + sdk/js-sdk/proto/appcallback_pb.js | 965 ++ sdk/js-sdk/proto/runtime_grpc_pb.d.ts | 382 + sdk/js-sdk/proto/runtime_grpc_pb.js | 644 ++ sdk/js-sdk/proto/runtime_pb.d.ts | 1283 +++ sdk/js-sdk/proto/runtime_pb.js | 10020 ++++++++++++++++++++ sdk/js-sdk/scripts/build-grpc.sh | 64 + sdk/js-sdk/src/Client.ts | 29 + sdk/js-sdk/src/demo/state.ts | 5 + sdk/js-sdk/src/index.ts | 5 + sdk/js-sdk/test/unit/Client.test.ts | 8 + sdk/js-sdk/tsconfig.json | 73 + 18 files changed, 13824 insertions(+) create mode 100644 sdk/js-sdk/README.md create mode 100644 sdk/js-sdk/jest.config.js create mode 100644 sdk/js-sdk/package.json create mode 100644 sdk/js-sdk/proto/appcallback_grpc_pb.d.ts create mode 100644 sdk/js-sdk/proto/appcallback_grpc_pb.js create mode 100644 sdk/js-sdk/proto/appcallback_pb.d.ts create mode 100644 sdk/js-sdk/proto/appcallback_pb.js create mode 100644 sdk/js-sdk/proto/runtime_grpc_pb.d.ts create mode 100644 sdk/js-sdk/proto/runtime_grpc_pb.js create mode 100644 sdk/js-sdk/proto/runtime_pb.d.ts create mode 100644 sdk/js-sdk/proto/runtime_pb.js create mode 100755 sdk/js-sdk/scripts/build-grpc.sh create mode 100644 sdk/js-sdk/src/Client.ts create mode 100644 sdk/js-sdk/src/demo/state.ts create mode 100644 sdk/js-sdk/src/index.ts create mode 100644 sdk/js-sdk/test/unit/Client.test.ts create mode 100644 sdk/js-sdk/tsconfig.json diff --git a/.gitignore b/.gitignore index 3a9c3f9bec..e71b0c8753 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ logs/ /cover.out vendor/ demo/state/redis/client +sdk/js-sdk/node_modules +sdk/js-sdk/dist diff --git a/sdk/js-sdk/README.md b/sdk/js-sdk/README.md new file mode 100644 index 0000000000..da1f6fd76a --- /dev/null +++ b/sdk/js-sdk/README.md @@ -0,0 +1,27 @@ +# Layotto Node.js SDK + +The Layotto Node.js SDK to build your application. + +## Usage + +### State + +#### component.yaml + +```yaml +``` + +#### example.ts + +```ts +import { Client, Server } from 'layotto'; + +const client = new Client(); +const res = await client.invoker.invoke(appId, 'hello-world', HttpMethod.GET); +``` + +## Generate gRPC files + +```bash +npm run build:grpc +``` diff --git a/sdk/js-sdk/jest.config.js b/sdk/js-sdk/jest.config.js new file mode 100644 index 0000000000..8cbf8940cc --- /dev/null +++ b/sdk/js-sdk/jest.config.js @@ -0,0 +1,5 @@ +/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', +}; \ No newline at end of file diff --git a/sdk/js-sdk/package.json b/sdk/js-sdk/package.json new file mode 100644 index 0000000000..657ebd25fe --- /dev/null +++ b/sdk/js-sdk/package.json @@ -0,0 +1,40 @@ +{ + "name": "layotto", + "version": "0.0.0", + "description": "Layotto Node.js SDK", + "main": "index.js", + "scripts": { + "test": "jest --runInBand --detectOpenHandles", + "test:unit": "NODE_ENV=test npm run test 'test/unit/.*\\.test\\.ts'", + "lint": "tslint -p tsconfig.json", + "build:grpc": "scripts/build-grpc.sh", + "build": "tsc" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/mosn/layotto.git" + }, + "keywords": [ + "layotto", + "mosn" + ], + "author": "fengmk2", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/mosn/layotto/issues" + }, + "homepage": "https://github.com/mosn/layotto#readme", + "devDependencies": { + "@types/jest": "^27.0.2", + "grpc-tools": "^1.11.2", + "grpc_tools_node_protoc_ts": "^5.3.2", + "jest": "^27.2.5", + "ts-jest": "^27.0.7", + "tslint": "^6.1.3", + "typescript": "^4.4.4" + }, + "dependencies": { + "@grpc/grpc-js": "^1.4.1", + "google-protobuf": "^3.19.0-rc.1" + } +} diff --git a/sdk/js-sdk/proto/appcallback_grpc_pb.d.ts b/sdk/js-sdk/proto/appcallback_grpc_pb.d.ts new file mode 100644 index 0000000000..5cb6357b5b --- /dev/null +++ b/sdk/js-sdk/proto/appcallback_grpc_pb.d.ts @@ -0,0 +1,59 @@ +// package: spec.proto.runtime.v1 +// file: appcallback.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import * as appcallback_pb from "./appcallback_pb"; +import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; + +interface IAppCallbackService extends grpc.ServiceDefinition { + listTopicSubscriptions: IAppCallbackService_IListTopicSubscriptions; + onTopicEvent: IAppCallbackService_IOnTopicEvent; +} + +interface IAppCallbackService_IListTopicSubscriptions extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.AppCallback/ListTopicSubscriptions"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAppCallbackService_IOnTopicEvent extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.AppCallback/OnTopicEvent"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const AppCallbackService: IAppCallbackService; + +export interface IAppCallbackServer extends grpc.UntypedServiceImplementation { + listTopicSubscriptions: grpc.handleUnaryCall; + onTopicEvent: grpc.handleUnaryCall; +} + +export interface IAppCallbackClient { + listTopicSubscriptions(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: appcallback_pb.ListTopicSubscriptionsResponse) => void): grpc.ClientUnaryCall; + listTopicSubscriptions(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: appcallback_pb.ListTopicSubscriptionsResponse) => void): grpc.ClientUnaryCall; + listTopicSubscriptions(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: appcallback_pb.ListTopicSubscriptionsResponse) => void): grpc.ClientUnaryCall; + onTopicEvent(request: appcallback_pb.TopicEventRequest, callback: (error: grpc.ServiceError | null, response: appcallback_pb.TopicEventResponse) => void): grpc.ClientUnaryCall; + onTopicEvent(request: appcallback_pb.TopicEventRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: appcallback_pb.TopicEventResponse) => void): grpc.ClientUnaryCall; + onTopicEvent(request: appcallback_pb.TopicEventRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: appcallback_pb.TopicEventResponse) => void): grpc.ClientUnaryCall; +} + +export class AppCallbackClient extends grpc.Client implements IAppCallbackClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public listTopicSubscriptions(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: appcallback_pb.ListTopicSubscriptionsResponse) => void): grpc.ClientUnaryCall; + public listTopicSubscriptions(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: appcallback_pb.ListTopicSubscriptionsResponse) => void): grpc.ClientUnaryCall; + public listTopicSubscriptions(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: appcallback_pb.ListTopicSubscriptionsResponse) => void): grpc.ClientUnaryCall; + public onTopicEvent(request: appcallback_pb.TopicEventRequest, callback: (error: grpc.ServiceError | null, response: appcallback_pb.TopicEventResponse) => void): grpc.ClientUnaryCall; + public onTopicEvent(request: appcallback_pb.TopicEventRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: appcallback_pb.TopicEventResponse) => void): grpc.ClientUnaryCall; + public onTopicEvent(request: appcallback_pb.TopicEventRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: appcallback_pb.TopicEventResponse) => void): grpc.ClientUnaryCall; +} diff --git a/sdk/js-sdk/proto/appcallback_grpc_pb.js b/sdk/js-sdk/proto/appcallback_grpc_pb.js new file mode 100644 index 0000000000..044a4b54fb --- /dev/null +++ b/sdk/js-sdk/proto/appcallback_grpc_pb.js @@ -0,0 +1,85 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var appcallback_pb = require('./appcallback_pb.js'); +var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); + +function serialize_google_protobuf_Empty(arg) { + if (!(arg instanceof google_protobuf_empty_pb.Empty)) { + throw new Error('Expected argument of type google.protobuf.Empty'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_google_protobuf_Empty(buffer_arg) { + return google_protobuf_empty_pb.Empty.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_ListTopicSubscriptionsResponse(arg) { + if (!(arg instanceof appcallback_pb.ListTopicSubscriptionsResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.ListTopicSubscriptionsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_ListTopicSubscriptionsResponse(buffer_arg) { + return appcallback_pb.ListTopicSubscriptionsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_TopicEventRequest(arg) { + if (!(arg instanceof appcallback_pb.TopicEventRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.TopicEventRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_TopicEventRequest(buffer_arg) { + return appcallback_pb.TopicEventRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_TopicEventResponse(arg) { + if (!(arg instanceof appcallback_pb.TopicEventResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.TopicEventResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_TopicEventResponse(buffer_arg) { + return appcallback_pb.TopicEventResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// AppCallback V1 allows user application to interact with runtime. +// User application needs to implement AppCallback service if it needs to +// receive message from runtime. +var AppCallbackService = exports.AppCallbackService = { + // Lists all topics subscribed by this app. +listTopicSubscriptions: { + path: '/spec.proto.runtime.v1.AppCallback/ListTopicSubscriptions', + requestStream: false, + responseStream: false, + requestType: google_protobuf_empty_pb.Empty, + responseType: appcallback_pb.ListTopicSubscriptionsResponse, + requestSerialize: serialize_google_protobuf_Empty, + requestDeserialize: deserialize_google_protobuf_Empty, + responseSerialize: serialize_spec_proto_runtime_v1_ListTopicSubscriptionsResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_ListTopicSubscriptionsResponse, + }, + // Subscribes events from Pubsub +onTopicEvent: { + path: '/spec.proto.runtime.v1.AppCallback/OnTopicEvent', + requestStream: false, + responseStream: false, + requestType: appcallback_pb.TopicEventRequest, + responseType: appcallback_pb.TopicEventResponse, + requestSerialize: serialize_spec_proto_runtime_v1_TopicEventRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_TopicEventRequest, + responseSerialize: serialize_spec_proto_runtime_v1_TopicEventResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_TopicEventResponse, + }, +}; + +exports.AppCallbackClient = grpc.makeGenericClientConstructor(AppCallbackService); +// // Invokes service method with InvokeRequest. +// rpc OnInvoke (InvokeRequest) returns (InvokeResponse) {} diff --git a/sdk/js-sdk/proto/appcallback_pb.d.ts b/sdk/js-sdk/proto/appcallback_pb.d.ts new file mode 100644 index 0000000000..5807b6e124 --- /dev/null +++ b/sdk/js-sdk/proto/appcallback_pb.d.ts @@ -0,0 +1,128 @@ +// package: spec.proto.runtime.v1 +// file: appcallback.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; + +export class TopicEventRequest extends jspb.Message { + getId(): string; + setId(value: string): TopicEventRequest; + getSource(): string; + setSource(value: string): TopicEventRequest; + getType(): string; + setType(value: string): TopicEventRequest; + getSpecVersion(): string; + setSpecVersion(value: string): TopicEventRequest; + getDataContentType(): string; + setDataContentType(value: string): TopicEventRequest; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): TopicEventRequest; + getTopic(): string; + setTopic(value: string): TopicEventRequest; + getPubsubName(): string; + setPubsubName(value: string): TopicEventRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TopicEventRequest.AsObject; + static toObject(includeInstance: boolean, msg: TopicEventRequest): TopicEventRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TopicEventRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TopicEventRequest; + static deserializeBinaryFromReader(message: TopicEventRequest, reader: jspb.BinaryReader): TopicEventRequest; +} + +export namespace TopicEventRequest { + export type AsObject = { + id: string, + source: string, + type: string, + specVersion: string, + dataContentType: string, + data: Uint8Array | string, + topic: string, + pubsubName: string, + } +} + +export class TopicEventResponse extends jspb.Message { + getStatus(): TopicEventResponse.TopicEventResponseStatus; + setStatus(value: TopicEventResponse.TopicEventResponseStatus): TopicEventResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TopicEventResponse.AsObject; + static toObject(includeInstance: boolean, msg: TopicEventResponse): TopicEventResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TopicEventResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TopicEventResponse; + static deserializeBinaryFromReader(message: TopicEventResponse, reader: jspb.BinaryReader): TopicEventResponse; +} + +export namespace TopicEventResponse { + export type AsObject = { + status: TopicEventResponse.TopicEventResponseStatus, + } + + export enum TopicEventResponseStatus { + SUCCESS = 0, + RETRY = 1, + DROP = 2, + } + +} + +export class ListTopicSubscriptionsResponse extends jspb.Message { + clearSubscriptionsList(): void; + getSubscriptionsList(): Array; + setSubscriptionsList(value: Array): ListTopicSubscriptionsResponse; + addSubscriptions(value?: TopicSubscription, index?: number): TopicSubscription; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTopicSubscriptionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListTopicSubscriptionsResponse): ListTopicSubscriptionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListTopicSubscriptionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTopicSubscriptionsResponse; + static deserializeBinaryFromReader(message: ListTopicSubscriptionsResponse, reader: jspb.BinaryReader): ListTopicSubscriptionsResponse; +} + +export namespace ListTopicSubscriptionsResponse { + export type AsObject = { + subscriptionsList: Array, + } +} + +export class TopicSubscription extends jspb.Message { + getPubsubName(): string; + setPubsubName(value: string): TopicSubscription; + getTopic(): string; + setTopic(value: string): TopicSubscription; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TopicSubscription.AsObject; + static toObject(includeInstance: boolean, msg: TopicSubscription): TopicSubscription.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TopicSubscription, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TopicSubscription; + static deserializeBinaryFromReader(message: TopicSubscription, reader: jspb.BinaryReader): TopicSubscription; +} + +export namespace TopicSubscription { + export type AsObject = { + pubsubName: string, + topic: string, + + metadataMap: Array<[string, string]>, + } +} diff --git a/sdk/js-sdk/proto/appcallback_pb.js b/sdk/js-sdk/proto/appcallback_pb.js new file mode 100644 index 0000000000..021406fecc --- /dev/null +++ b/sdk/js-sdk/proto/appcallback_pb.js @@ -0,0 +1,965 @@ +// source: appcallback.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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 google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); +goog.object.extend(proto, google_protobuf_empty_pb); +goog.exportSymbol('proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.TopicEventRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.TopicEventResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.TopicSubscription', 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.spec.proto.runtime.v1.TopicEventRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.TopicEventRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.TopicEventRequest.displayName = 'proto.spec.proto.runtime.v1.TopicEventRequest'; +} +/** + * 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.spec.proto.runtime.v1.TopicEventResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.TopicEventResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.TopicEventResponse.displayName = 'proto.spec.proto.runtime.v1.TopicEventResponse'; +} +/** + * 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.spec.proto.runtime.v1.ListTopicSubscriptionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.displayName = 'proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse'; +} +/** + * 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.spec.proto.runtime.v1.TopicSubscription = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.TopicSubscription, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.TopicSubscription.displayName = 'proto.spec.proto.runtime.v1.TopicSubscription'; +} + + + +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.spec.proto.runtime.v1.TopicEventRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.TopicEventRequest.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.spec.proto.runtime.v1.TopicEventRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TopicEventRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + type: jspb.Message.getFieldWithDefault(msg, 3, ""), + specVersion: jspb.Message.getFieldWithDefault(msg, 4, ""), + dataContentType: jspb.Message.getFieldWithDefault(msg, 5, ""), + data: msg.getData_asB64(), + topic: jspb.Message.getFieldWithDefault(msg, 6, ""), + pubsubName: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.TopicEventRequest} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.TopicEventRequest; + return proto.spec.proto.runtime.v1.TopicEventRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.TopicEventRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.TopicEventRequest} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSource(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSpecVersion(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDataContentType(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setTopic(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setPubsubName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.TopicEventRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.TopicEventRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TopicEventRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSpecVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getDataContentType(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getTopic(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getPubsubName(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TopicEventRequest} returns this + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string source = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TopicEventRequest} returns this + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string type = 3; + * @return {string} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TopicEventRequest} returns this + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string spec_version = 4; + * @return {string} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.getSpecVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TopicEventRequest} returns this + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.setSpecVersion = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string data_content_type = 5; + * @return {string} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.getDataContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TopicEventRequest} returns this + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.setDataContentType = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bytes data = 7; + * @return {!(string|Uint8Array)} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes data = 7; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.proto.runtime.v1.TopicEventRequest} returns this + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional string topic = 6; + * @return {string} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.getTopic = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TopicEventRequest} returns this + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.setTopic = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string pubsub_name = 8; + * @return {string} + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.getPubsubName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TopicEventRequest} returns this + */ +proto.spec.proto.runtime.v1.TopicEventRequest.prototype.setPubsubName = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.spec.proto.runtime.v1.TopicEventResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.TopicEventResponse.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.spec.proto.runtime.v1.TopicEventResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TopicEventResponse.toObject = function(includeInstance, msg) { + var f, obj = { + status: 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.spec.proto.runtime.v1.TopicEventResponse} + */ +proto.spec.proto.runtime.v1.TopicEventResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.TopicEventResponse; + return proto.spec.proto.runtime.v1.TopicEventResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.TopicEventResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.TopicEventResponse} + */ +proto.spec.proto.runtime.v1.TopicEventResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.spec.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.TopicEventResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.TopicEventResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.TopicEventResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TopicEventResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.spec.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus = { + SUCCESS: 0, + RETRY: 1, + DROP: 2 +}; + +/** + * optional TopicEventResponseStatus status = 1; + * @return {!proto.spec.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus} + */ +proto.spec.proto.runtime.v1.TopicEventResponse.prototype.getStatus = function() { + return /** @type {!proto.spec.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus} value + * @return {!proto.spec.proto.runtime.v1.TopicEventResponse} returns this + */ +proto.spec.proto.runtime.v1.TopicEventResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.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.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.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.spec.proto.runtime.v1.ListTopicSubscriptionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + subscriptionsList: jspb.Message.toObjectList(msg.getSubscriptionsList(), + proto.spec.proto.runtime.v1.TopicSubscription.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.spec.proto.runtime.v1.ListTopicSubscriptionsResponse} + */ +proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse; + return proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse} + */ +proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spec.proto.runtime.v1.TopicSubscription; + reader.readMessage(value,proto.spec.proto.runtime.v1.TopicSubscription.deserializeBinaryFromReader); + msg.addSubscriptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubscriptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.spec.proto.runtime.v1.TopicSubscription.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TopicSubscription subscriptions = 1; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.prototype.getSubscriptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spec.proto.runtime.v1.TopicSubscription, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse} returns this +*/ +proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.prototype.setSubscriptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.TopicSubscription=} opt_value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.TopicSubscription} + */ +proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.prototype.addSubscriptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spec.proto.runtime.v1.TopicSubscription, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse} returns this + */ +proto.spec.proto.runtime.v1.ListTopicSubscriptionsResponse.prototype.clearSubscriptionsList = function() { + return this.setSubscriptionsList([]); +}; + + + + + +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.spec.proto.runtime.v1.TopicSubscription.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.TopicSubscription.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.spec.proto.runtime.v1.TopicSubscription} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TopicSubscription.toObject = function(includeInstance, msg) { + var f, obj = { + pubsubName: jspb.Message.getFieldWithDefault(msg, 1, ""), + topic: jspb.Message.getFieldWithDefault(msg, 2, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.TopicSubscription} + */ +proto.spec.proto.runtime.v1.TopicSubscription.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.TopicSubscription; + return proto.spec.proto.runtime.v1.TopicSubscription.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.TopicSubscription} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.TopicSubscription} + */ +proto.spec.proto.runtime.v1.TopicSubscription.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.setPubsubName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTopic(value); + break; + case 3: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.TopicSubscription.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.TopicSubscription.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.TopicSubscription} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TopicSubscription.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubsubName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTopic(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string pubsub_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.TopicSubscription.prototype.getPubsubName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TopicSubscription} returns this + */ +proto.spec.proto.runtime.v1.TopicSubscription.prototype.setPubsubName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string topic = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.TopicSubscription.prototype.getTopic = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TopicSubscription} returns this + */ +proto.spec.proto.runtime.v1.TopicSubscription.prototype.setTopic = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * map metadata = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.TopicSubscription.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.TopicSubscription} returns this + */ +proto.spec.proto.runtime.v1.TopicSubscription.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + +goog.object.extend(exports, proto.spec.proto.runtime.v1); diff --git a/sdk/js-sdk/proto/runtime_grpc_pb.d.ts b/sdk/js-sdk/proto/runtime_grpc_pb.d.ts new file mode 100644 index 0000000000..52ea7d87db --- /dev/null +++ b/sdk/js-sdk/proto/runtime_grpc_pb.d.ts @@ -0,0 +1,382 @@ +// package: spec.proto.runtime.v1 +// file: runtime.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import * as runtime_pb from "./runtime_pb"; +import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; + +interface IRuntimeService extends grpc.ServiceDefinition { + sayHello: IRuntimeService_ISayHello; + invokeService: IRuntimeService_IInvokeService; + getConfiguration: IRuntimeService_IGetConfiguration; + saveConfiguration: IRuntimeService_ISaveConfiguration; + deleteConfiguration: IRuntimeService_IDeleteConfiguration; + subscribeConfiguration: IRuntimeService_ISubscribeConfiguration; + tryLock: IRuntimeService_ITryLock; + unlock: IRuntimeService_IUnlock; + getNextId: IRuntimeService_IGetNextId; + getState: IRuntimeService_IGetState; + getBulkState: IRuntimeService_IGetBulkState; + saveState: IRuntimeService_ISaveState; + deleteState: IRuntimeService_IDeleteState; + deleteBulkState: IRuntimeService_IDeleteBulkState; + executeStateTransaction: IRuntimeService_IExecuteStateTransaction; + publishEvent: IRuntimeService_IPublishEvent; + getFile: IRuntimeService_IGetFile; + putFile: IRuntimeService_IPutFile; + listFile: IRuntimeService_IListFile; + delFile: IRuntimeService_IDelFile; + invokeBinding: IRuntimeService_IInvokeBinding; +} + +interface IRuntimeService_ISayHello extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/SayHello"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IInvokeService extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/InvokeService"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IGetConfiguration extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/GetConfiguration"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_ISaveConfiguration extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/SaveConfiguration"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IDeleteConfiguration extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/DeleteConfiguration"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_ISubscribeConfiguration extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/SubscribeConfiguration"; + requestStream: true; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_ITryLock extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/TryLock"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IUnlock extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/Unlock"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IGetNextId extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/GetNextId"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IGetState extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/GetState"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IGetBulkState extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/GetBulkState"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_ISaveState extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/SaveState"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IDeleteState extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/DeleteState"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IDeleteBulkState extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/DeleteBulkState"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IExecuteStateTransaction extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/ExecuteStateTransaction"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IPublishEvent extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/PublishEvent"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IGetFile extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/GetFile"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IPutFile extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/PutFile"; + requestStream: true; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IListFile extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/ListFile"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IDelFile extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/DelFile"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRuntimeService_IInvokeBinding extends grpc.MethodDefinition { + path: "/spec.proto.runtime.v1.Runtime/InvokeBinding"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const RuntimeService: IRuntimeService; + +export interface IRuntimeServer extends grpc.UntypedServiceImplementation { + sayHello: grpc.handleUnaryCall; + invokeService: grpc.handleUnaryCall; + getConfiguration: grpc.handleUnaryCall; + saveConfiguration: grpc.handleUnaryCall; + deleteConfiguration: grpc.handleUnaryCall; + subscribeConfiguration: grpc.handleBidiStreamingCall; + tryLock: grpc.handleUnaryCall; + unlock: grpc.handleUnaryCall; + getNextId: grpc.handleUnaryCall; + getState: grpc.handleUnaryCall; + getBulkState: grpc.handleUnaryCall; + saveState: grpc.handleUnaryCall; + deleteState: grpc.handleUnaryCall; + deleteBulkState: grpc.handleUnaryCall; + executeStateTransaction: grpc.handleUnaryCall; + publishEvent: grpc.handleUnaryCall; + getFile: grpc.handleServerStreamingCall; + putFile: grpc.handleClientStreamingCall; + listFile: grpc.handleUnaryCall; + delFile: grpc.handleUnaryCall; + invokeBinding: grpc.handleUnaryCall; +} + +export interface IRuntimeClient { + sayHello(request: runtime_pb.SayHelloRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.SayHelloResponse) => void): grpc.ClientUnaryCall; + sayHello(request: runtime_pb.SayHelloRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.SayHelloResponse) => void): grpc.ClientUnaryCall; + sayHello(request: runtime_pb.SayHelloRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.SayHelloResponse) => void): grpc.ClientUnaryCall; + invokeService(request: runtime_pb.InvokeServiceRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeResponse) => void): grpc.ClientUnaryCall; + invokeService(request: runtime_pb.InvokeServiceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeResponse) => void): grpc.ClientUnaryCall; + invokeService(request: runtime_pb.InvokeServiceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeResponse) => void): grpc.ClientUnaryCall; + getConfiguration(request: runtime_pb.GetConfigurationRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetConfigurationResponse) => void): grpc.ClientUnaryCall; + getConfiguration(request: runtime_pb.GetConfigurationRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetConfigurationResponse) => void): grpc.ClientUnaryCall; + getConfiguration(request: runtime_pb.GetConfigurationRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetConfigurationResponse) => void): grpc.ClientUnaryCall; + saveConfiguration(request: runtime_pb.SaveConfigurationRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + saveConfiguration(request: runtime_pb.SaveConfigurationRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + saveConfiguration(request: runtime_pb.SaveConfigurationRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + deleteConfiguration(request: runtime_pb.DeleteConfigurationRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + deleteConfiguration(request: runtime_pb.DeleteConfigurationRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + deleteConfiguration(request: runtime_pb.DeleteConfigurationRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + subscribeConfiguration(): grpc.ClientDuplexStream; + subscribeConfiguration(options: Partial): grpc.ClientDuplexStream; + subscribeConfiguration(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + tryLock(request: runtime_pb.TryLockRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.TryLockResponse) => void): grpc.ClientUnaryCall; + tryLock(request: runtime_pb.TryLockRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.TryLockResponse) => void): grpc.ClientUnaryCall; + tryLock(request: runtime_pb.TryLockRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.TryLockResponse) => void): grpc.ClientUnaryCall; + unlock(request: runtime_pb.UnlockRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.UnlockResponse) => void): grpc.ClientUnaryCall; + unlock(request: runtime_pb.UnlockRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.UnlockResponse) => void): grpc.ClientUnaryCall; + unlock(request: runtime_pb.UnlockRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.UnlockResponse) => void): grpc.ClientUnaryCall; + getNextId(request: runtime_pb.GetNextIdRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetNextIdResponse) => void): grpc.ClientUnaryCall; + getNextId(request: runtime_pb.GetNextIdRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetNextIdResponse) => void): grpc.ClientUnaryCall; + getNextId(request: runtime_pb.GetNextIdRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetNextIdResponse) => void): grpc.ClientUnaryCall; + getState(request: runtime_pb.GetStateRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetStateResponse) => void): grpc.ClientUnaryCall; + getState(request: runtime_pb.GetStateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetStateResponse) => void): grpc.ClientUnaryCall; + getState(request: runtime_pb.GetStateRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetStateResponse) => void): grpc.ClientUnaryCall; + getBulkState(request: runtime_pb.GetBulkStateRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetBulkStateResponse) => void): grpc.ClientUnaryCall; + getBulkState(request: runtime_pb.GetBulkStateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetBulkStateResponse) => void): grpc.ClientUnaryCall; + getBulkState(request: runtime_pb.GetBulkStateRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetBulkStateResponse) => void): grpc.ClientUnaryCall; + saveState(request: runtime_pb.SaveStateRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + saveState(request: runtime_pb.SaveStateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + saveState(request: runtime_pb.SaveStateRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + deleteState(request: runtime_pb.DeleteStateRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + deleteState(request: runtime_pb.DeleteStateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + deleteState(request: runtime_pb.DeleteStateRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + deleteBulkState(request: runtime_pb.DeleteBulkStateRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + deleteBulkState(request: runtime_pb.DeleteBulkStateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + deleteBulkState(request: runtime_pb.DeleteBulkStateRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + executeStateTransaction(request: runtime_pb.ExecuteStateTransactionRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + executeStateTransaction(request: runtime_pb.ExecuteStateTransactionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + executeStateTransaction(request: runtime_pb.ExecuteStateTransactionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + publishEvent(request: runtime_pb.PublishEventRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + publishEvent(request: runtime_pb.PublishEventRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + publishEvent(request: runtime_pb.PublishEventRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + getFile(request: runtime_pb.GetFileRequest, options?: Partial): grpc.ClientReadableStream; + getFile(request: runtime_pb.GetFileRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + putFile(callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientWritableStream; + putFile(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientWritableStream; + putFile(options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientWritableStream; + putFile(metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientWritableStream; + listFile(request: runtime_pb.ListFileRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.ListFileResp) => void): grpc.ClientUnaryCall; + listFile(request: runtime_pb.ListFileRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.ListFileResp) => void): grpc.ClientUnaryCall; + listFile(request: runtime_pb.ListFileRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.ListFileResp) => void): grpc.ClientUnaryCall; + delFile(request: runtime_pb.DelFileRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + delFile(request: runtime_pb.DelFileRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + delFile(request: runtime_pb.DelFileRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + invokeBinding(request: runtime_pb.InvokeBindingRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeBindingResponse) => void): grpc.ClientUnaryCall; + invokeBinding(request: runtime_pb.InvokeBindingRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeBindingResponse) => void): grpc.ClientUnaryCall; + invokeBinding(request: runtime_pb.InvokeBindingRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeBindingResponse) => void): grpc.ClientUnaryCall; +} + +export class RuntimeClient extends grpc.Client implements IRuntimeClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public sayHello(request: runtime_pb.SayHelloRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.SayHelloResponse) => void): grpc.ClientUnaryCall; + public sayHello(request: runtime_pb.SayHelloRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.SayHelloResponse) => void): grpc.ClientUnaryCall; + public sayHello(request: runtime_pb.SayHelloRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.SayHelloResponse) => void): grpc.ClientUnaryCall; + public invokeService(request: runtime_pb.InvokeServiceRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeResponse) => void): grpc.ClientUnaryCall; + public invokeService(request: runtime_pb.InvokeServiceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeResponse) => void): grpc.ClientUnaryCall; + public invokeService(request: runtime_pb.InvokeServiceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeResponse) => void): grpc.ClientUnaryCall; + public getConfiguration(request: runtime_pb.GetConfigurationRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetConfigurationResponse) => void): grpc.ClientUnaryCall; + public getConfiguration(request: runtime_pb.GetConfigurationRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetConfigurationResponse) => void): grpc.ClientUnaryCall; + public getConfiguration(request: runtime_pb.GetConfigurationRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetConfigurationResponse) => void): grpc.ClientUnaryCall; + public saveConfiguration(request: runtime_pb.SaveConfigurationRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public saveConfiguration(request: runtime_pb.SaveConfigurationRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public saveConfiguration(request: runtime_pb.SaveConfigurationRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public deleteConfiguration(request: runtime_pb.DeleteConfigurationRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public deleteConfiguration(request: runtime_pb.DeleteConfigurationRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public deleteConfiguration(request: runtime_pb.DeleteConfigurationRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public subscribeConfiguration(options?: Partial): grpc.ClientDuplexStream; + public subscribeConfiguration(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + public tryLock(request: runtime_pb.TryLockRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.TryLockResponse) => void): grpc.ClientUnaryCall; + public tryLock(request: runtime_pb.TryLockRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.TryLockResponse) => void): grpc.ClientUnaryCall; + public tryLock(request: runtime_pb.TryLockRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.TryLockResponse) => void): grpc.ClientUnaryCall; + public unlock(request: runtime_pb.UnlockRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.UnlockResponse) => void): grpc.ClientUnaryCall; + public unlock(request: runtime_pb.UnlockRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.UnlockResponse) => void): grpc.ClientUnaryCall; + public unlock(request: runtime_pb.UnlockRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.UnlockResponse) => void): grpc.ClientUnaryCall; + public getNextId(request: runtime_pb.GetNextIdRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetNextIdResponse) => void): grpc.ClientUnaryCall; + public getNextId(request: runtime_pb.GetNextIdRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetNextIdResponse) => void): grpc.ClientUnaryCall; + public getNextId(request: runtime_pb.GetNextIdRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetNextIdResponse) => void): grpc.ClientUnaryCall; + public getState(request: runtime_pb.GetStateRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetStateResponse) => void): grpc.ClientUnaryCall; + public getState(request: runtime_pb.GetStateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetStateResponse) => void): grpc.ClientUnaryCall; + public getState(request: runtime_pb.GetStateRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetStateResponse) => void): grpc.ClientUnaryCall; + public getBulkState(request: runtime_pb.GetBulkStateRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetBulkStateResponse) => void): grpc.ClientUnaryCall; + public getBulkState(request: runtime_pb.GetBulkStateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetBulkStateResponse) => void): grpc.ClientUnaryCall; + public getBulkState(request: runtime_pb.GetBulkStateRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.GetBulkStateResponse) => void): grpc.ClientUnaryCall; + public saveState(request: runtime_pb.SaveStateRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public saveState(request: runtime_pb.SaveStateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public saveState(request: runtime_pb.SaveStateRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public deleteState(request: runtime_pb.DeleteStateRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public deleteState(request: runtime_pb.DeleteStateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public deleteState(request: runtime_pb.DeleteStateRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public deleteBulkState(request: runtime_pb.DeleteBulkStateRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public deleteBulkState(request: runtime_pb.DeleteBulkStateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public deleteBulkState(request: runtime_pb.DeleteBulkStateRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public executeStateTransaction(request: runtime_pb.ExecuteStateTransactionRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public executeStateTransaction(request: runtime_pb.ExecuteStateTransactionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public executeStateTransaction(request: runtime_pb.ExecuteStateTransactionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public publishEvent(request: runtime_pb.PublishEventRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public publishEvent(request: runtime_pb.PublishEventRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public publishEvent(request: runtime_pb.PublishEventRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public getFile(request: runtime_pb.GetFileRequest, options?: Partial): grpc.ClientReadableStream; + public getFile(request: runtime_pb.GetFileRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public putFile(callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientWritableStream; + public putFile(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientWritableStream; + public putFile(options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientWritableStream; + public putFile(metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientWritableStream; + public listFile(request: runtime_pb.ListFileRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.ListFileResp) => void): grpc.ClientUnaryCall; + public listFile(request: runtime_pb.ListFileRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.ListFileResp) => void): grpc.ClientUnaryCall; + public listFile(request: runtime_pb.ListFileRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.ListFileResp) => void): grpc.ClientUnaryCall; + public delFile(request: runtime_pb.DelFileRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public delFile(request: runtime_pb.DelFileRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public delFile(request: runtime_pb.DelFileRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall; + public invokeBinding(request: runtime_pb.InvokeBindingRequest, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeBindingResponse) => void): grpc.ClientUnaryCall; + public invokeBinding(request: runtime_pb.InvokeBindingRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeBindingResponse) => void): grpc.ClientUnaryCall; + public invokeBinding(request: runtime_pb.InvokeBindingRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: runtime_pb.InvokeBindingResponse) => void): grpc.ClientUnaryCall; +} diff --git a/sdk/js-sdk/proto/runtime_grpc_pb.js b/sdk/js-sdk/proto/runtime_grpc_pb.js new file mode 100644 index 0000000000..157074bac8 --- /dev/null +++ b/sdk/js-sdk/proto/runtime_grpc_pb.js @@ -0,0 +1,644 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var runtime_pb = require('./runtime_pb.js'); +var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); + +function serialize_google_protobuf_Empty(arg) { + if (!(arg instanceof google_protobuf_empty_pb.Empty)) { + throw new Error('Expected argument of type google.protobuf.Empty'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_google_protobuf_Empty(buffer_arg) { + return google_protobuf_empty_pb.Empty.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_DelFileRequest(arg) { + if (!(arg instanceof runtime_pb.DelFileRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.DelFileRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_DelFileRequest(buffer_arg) { + return runtime_pb.DelFileRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_DeleteBulkStateRequest(arg) { + if (!(arg instanceof runtime_pb.DeleteBulkStateRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.DeleteBulkStateRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_DeleteBulkStateRequest(buffer_arg) { + return runtime_pb.DeleteBulkStateRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_DeleteConfigurationRequest(arg) { + if (!(arg instanceof runtime_pb.DeleteConfigurationRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.DeleteConfigurationRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_DeleteConfigurationRequest(buffer_arg) { + return runtime_pb.DeleteConfigurationRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_DeleteStateRequest(arg) { + if (!(arg instanceof runtime_pb.DeleteStateRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.DeleteStateRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_DeleteStateRequest(buffer_arg) { + return runtime_pb.DeleteStateRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_ExecuteStateTransactionRequest(arg) { + if (!(arg instanceof runtime_pb.ExecuteStateTransactionRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.ExecuteStateTransactionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_ExecuteStateTransactionRequest(buffer_arg) { + return runtime_pb.ExecuteStateTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_GetBulkStateRequest(arg) { + if (!(arg instanceof runtime_pb.GetBulkStateRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.GetBulkStateRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_GetBulkStateRequest(buffer_arg) { + return runtime_pb.GetBulkStateRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_GetBulkStateResponse(arg) { + if (!(arg instanceof runtime_pb.GetBulkStateResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.GetBulkStateResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_GetBulkStateResponse(buffer_arg) { + return runtime_pb.GetBulkStateResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_GetConfigurationRequest(arg) { + if (!(arg instanceof runtime_pb.GetConfigurationRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.GetConfigurationRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_GetConfigurationRequest(buffer_arg) { + return runtime_pb.GetConfigurationRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_GetConfigurationResponse(arg) { + if (!(arg instanceof runtime_pb.GetConfigurationResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.GetConfigurationResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_GetConfigurationResponse(buffer_arg) { + return runtime_pb.GetConfigurationResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_GetFileRequest(arg) { + if (!(arg instanceof runtime_pb.GetFileRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.GetFileRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_GetFileRequest(buffer_arg) { + return runtime_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_GetFileResponse(arg) { + if (!(arg instanceof runtime_pb.GetFileResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.GetFileResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_GetFileResponse(buffer_arg) { + return runtime_pb.GetFileResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_GetNextIdRequest(arg) { + if (!(arg instanceof runtime_pb.GetNextIdRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.GetNextIdRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_GetNextIdRequest(buffer_arg) { + return runtime_pb.GetNextIdRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_GetNextIdResponse(arg) { + if (!(arg instanceof runtime_pb.GetNextIdResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.GetNextIdResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_GetNextIdResponse(buffer_arg) { + return runtime_pb.GetNextIdResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_GetStateRequest(arg) { + if (!(arg instanceof runtime_pb.GetStateRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.GetStateRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_GetStateRequest(buffer_arg) { + return runtime_pb.GetStateRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_GetStateResponse(arg) { + if (!(arg instanceof runtime_pb.GetStateResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.GetStateResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_GetStateResponse(buffer_arg) { + return runtime_pb.GetStateResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_InvokeBindingRequest(arg) { + if (!(arg instanceof runtime_pb.InvokeBindingRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.InvokeBindingRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_InvokeBindingRequest(buffer_arg) { + return runtime_pb.InvokeBindingRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_InvokeBindingResponse(arg) { + if (!(arg instanceof runtime_pb.InvokeBindingResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.InvokeBindingResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_InvokeBindingResponse(buffer_arg) { + return runtime_pb.InvokeBindingResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_InvokeResponse(arg) { + if (!(arg instanceof runtime_pb.InvokeResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.InvokeResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_InvokeResponse(buffer_arg) { + return runtime_pb.InvokeResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_InvokeServiceRequest(arg) { + if (!(arg instanceof runtime_pb.InvokeServiceRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.InvokeServiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_InvokeServiceRequest(buffer_arg) { + return runtime_pb.InvokeServiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_ListFileRequest(arg) { + if (!(arg instanceof runtime_pb.ListFileRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.ListFileRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_ListFileRequest(buffer_arg) { + return runtime_pb.ListFileRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_ListFileResp(arg) { + if (!(arg instanceof runtime_pb.ListFileResp)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.ListFileResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_ListFileResp(buffer_arg) { + return runtime_pb.ListFileResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_PublishEventRequest(arg) { + if (!(arg instanceof runtime_pb.PublishEventRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.PublishEventRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_PublishEventRequest(buffer_arg) { + return runtime_pb.PublishEventRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_PutFileRequest(arg) { + if (!(arg instanceof runtime_pb.PutFileRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.PutFileRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_PutFileRequest(buffer_arg) { + return runtime_pb.PutFileRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_SaveConfigurationRequest(arg) { + if (!(arg instanceof runtime_pb.SaveConfigurationRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.SaveConfigurationRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_SaveConfigurationRequest(buffer_arg) { + return runtime_pb.SaveConfigurationRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_SaveStateRequest(arg) { + if (!(arg instanceof runtime_pb.SaveStateRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.SaveStateRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_SaveStateRequest(buffer_arg) { + return runtime_pb.SaveStateRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_SayHelloRequest(arg) { + if (!(arg instanceof runtime_pb.SayHelloRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.SayHelloRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_SayHelloRequest(buffer_arg) { + return runtime_pb.SayHelloRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_SayHelloResponse(arg) { + if (!(arg instanceof runtime_pb.SayHelloResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.SayHelloResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_SayHelloResponse(buffer_arg) { + return runtime_pb.SayHelloResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_SubscribeConfigurationRequest(arg) { + if (!(arg instanceof runtime_pb.SubscribeConfigurationRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.SubscribeConfigurationRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_SubscribeConfigurationRequest(buffer_arg) { + return runtime_pb.SubscribeConfigurationRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_SubscribeConfigurationResponse(arg) { + if (!(arg instanceof runtime_pb.SubscribeConfigurationResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.SubscribeConfigurationResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_SubscribeConfigurationResponse(buffer_arg) { + return runtime_pb.SubscribeConfigurationResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_TryLockRequest(arg) { + if (!(arg instanceof runtime_pb.TryLockRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.TryLockRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_TryLockRequest(buffer_arg) { + return runtime_pb.TryLockRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_TryLockResponse(arg) { + if (!(arg instanceof runtime_pb.TryLockResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.TryLockResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_TryLockResponse(buffer_arg) { + return runtime_pb.TryLockResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_UnlockRequest(arg) { + if (!(arg instanceof runtime_pb.UnlockRequest)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.UnlockRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_UnlockRequest(buffer_arg) { + return runtime_pb.UnlockRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_spec_proto_runtime_v1_UnlockResponse(arg) { + if (!(arg instanceof runtime_pb.UnlockResponse)) { + throw new Error('Expected argument of type spec.proto.runtime.v1.UnlockResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_spec_proto_runtime_v1_UnlockResponse(buffer_arg) { + return runtime_pb.UnlockResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var RuntimeService = exports.RuntimeService = { + // SayHello used for test +sayHello: { + path: '/spec.proto.runtime.v1.Runtime/SayHello', + requestStream: false, + responseStream: false, + requestType: runtime_pb.SayHelloRequest, + responseType: runtime_pb.SayHelloResponse, + requestSerialize: serialize_spec_proto_runtime_v1_SayHelloRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_SayHelloRequest, + responseSerialize: serialize_spec_proto_runtime_v1_SayHelloResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_SayHelloResponse, + }, + // InvokeService do rpc calls +invokeService: { + path: '/spec.proto.runtime.v1.Runtime/InvokeService', + requestStream: false, + responseStream: false, + requestType: runtime_pb.InvokeServiceRequest, + responseType: runtime_pb.InvokeResponse, + requestSerialize: serialize_spec_proto_runtime_v1_InvokeServiceRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_InvokeServiceRequest, + responseSerialize: serialize_spec_proto_runtime_v1_InvokeResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_InvokeResponse, + }, + // GetConfiguration gets configuration from configuration store. +getConfiguration: { + path: '/spec.proto.runtime.v1.Runtime/GetConfiguration', + requestStream: false, + responseStream: false, + requestType: runtime_pb.GetConfigurationRequest, + responseType: runtime_pb.GetConfigurationResponse, + requestSerialize: serialize_spec_proto_runtime_v1_GetConfigurationRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_GetConfigurationRequest, + responseSerialize: serialize_spec_proto_runtime_v1_GetConfigurationResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_GetConfigurationResponse, + }, + // SaveConfiguration saves configuration into configuration store. +saveConfiguration: { + path: '/spec.proto.runtime.v1.Runtime/SaveConfiguration', + requestStream: false, + responseStream: false, + requestType: runtime_pb.SaveConfigurationRequest, + responseType: google_protobuf_empty_pb.Empty, + requestSerialize: serialize_spec_proto_runtime_v1_SaveConfigurationRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_SaveConfigurationRequest, + responseSerialize: serialize_google_protobuf_Empty, + responseDeserialize: deserialize_google_protobuf_Empty, + }, + // DeleteConfiguration deletes configuration from configuration store. +deleteConfiguration: { + path: '/spec.proto.runtime.v1.Runtime/DeleteConfiguration', + requestStream: false, + responseStream: false, + requestType: runtime_pb.DeleteConfigurationRequest, + responseType: google_protobuf_empty_pb.Empty, + requestSerialize: serialize_spec_proto_runtime_v1_DeleteConfigurationRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_DeleteConfigurationRequest, + responseSerialize: serialize_google_protobuf_Empty, + responseDeserialize: deserialize_google_protobuf_Empty, + }, + // SubscribeConfiguration gets configuration from configuration store and subscribe the updates. +subscribeConfiguration: { + path: '/spec.proto.runtime.v1.Runtime/SubscribeConfiguration', + requestStream: true, + responseStream: true, + requestType: runtime_pb.SubscribeConfigurationRequest, + responseType: runtime_pb.SubscribeConfigurationResponse, + requestSerialize: serialize_spec_proto_runtime_v1_SubscribeConfigurationRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_SubscribeConfigurationRequest, + responseSerialize: serialize_spec_proto_runtime_v1_SubscribeConfigurationResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_SubscribeConfigurationResponse, + }, + // Distributed Lock API +// A non-blocking method trying to get a lock with ttl. +tryLock: { + path: '/spec.proto.runtime.v1.Runtime/TryLock', + requestStream: false, + responseStream: false, + requestType: runtime_pb.TryLockRequest, + responseType: runtime_pb.TryLockResponse, + requestSerialize: serialize_spec_proto_runtime_v1_TryLockRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_TryLockRequest, + responseSerialize: serialize_spec_proto_runtime_v1_TryLockResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_TryLockResponse, + }, + unlock: { + path: '/spec.proto.runtime.v1.Runtime/Unlock', + requestStream: false, + responseStream: false, + requestType: runtime_pb.UnlockRequest, + responseType: runtime_pb.UnlockResponse, + requestSerialize: serialize_spec_proto_runtime_v1_UnlockRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_UnlockRequest, + responseSerialize: serialize_spec_proto_runtime_v1_UnlockResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_UnlockResponse, + }, + // Sequencer API +// Get next unique id with some auto-increment guarantee +getNextId: { + path: '/spec.proto.runtime.v1.Runtime/GetNextId', + requestStream: false, + responseStream: false, + requestType: runtime_pb.GetNextIdRequest, + responseType: runtime_pb.GetNextIdResponse, + requestSerialize: serialize_spec_proto_runtime_v1_GetNextIdRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_GetNextIdRequest, + responseSerialize: serialize_spec_proto_runtime_v1_GetNextIdResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_GetNextIdResponse, + }, + // Below are the APIs compatible with Dapr. +// We try to keep them same as Dapr's because we want to work with Dapr to build an API spec for cloud native runtime +// ,like CloudEvent for event data. +// +// Gets the state for a specific key. +getState: { + path: '/spec.proto.runtime.v1.Runtime/GetState', + requestStream: false, + responseStream: false, + requestType: runtime_pb.GetStateRequest, + responseType: runtime_pb.GetStateResponse, + requestSerialize: serialize_spec_proto_runtime_v1_GetStateRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_GetStateRequest, + responseSerialize: serialize_spec_proto_runtime_v1_GetStateResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_GetStateResponse, + }, + // Gets a bulk of state items for a list of keys +getBulkState: { + path: '/spec.proto.runtime.v1.Runtime/GetBulkState', + requestStream: false, + responseStream: false, + requestType: runtime_pb.GetBulkStateRequest, + responseType: runtime_pb.GetBulkStateResponse, + requestSerialize: serialize_spec_proto_runtime_v1_GetBulkStateRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_GetBulkStateRequest, + responseSerialize: serialize_spec_proto_runtime_v1_GetBulkStateResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_GetBulkStateResponse, + }, + // Saves an array of state objects +saveState: { + path: '/spec.proto.runtime.v1.Runtime/SaveState', + requestStream: false, + responseStream: false, + requestType: runtime_pb.SaveStateRequest, + responseType: google_protobuf_empty_pb.Empty, + requestSerialize: serialize_spec_proto_runtime_v1_SaveStateRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_SaveStateRequest, + responseSerialize: serialize_google_protobuf_Empty, + responseDeserialize: deserialize_google_protobuf_Empty, + }, + // Deletes the state for a specific key. +deleteState: { + path: '/spec.proto.runtime.v1.Runtime/DeleteState', + requestStream: false, + responseStream: false, + requestType: runtime_pb.DeleteStateRequest, + responseType: google_protobuf_empty_pb.Empty, + requestSerialize: serialize_spec_proto_runtime_v1_DeleteStateRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_DeleteStateRequest, + responseSerialize: serialize_google_protobuf_Empty, + responseDeserialize: deserialize_google_protobuf_Empty, + }, + // Deletes a bulk of state items for a list of keys +deleteBulkState: { + path: '/spec.proto.runtime.v1.Runtime/DeleteBulkState', + requestStream: false, + responseStream: false, + requestType: runtime_pb.DeleteBulkStateRequest, + responseType: google_protobuf_empty_pb.Empty, + requestSerialize: serialize_spec_proto_runtime_v1_DeleteBulkStateRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_DeleteBulkStateRequest, + responseSerialize: serialize_google_protobuf_Empty, + responseDeserialize: deserialize_google_protobuf_Empty, + }, + // Executes transactions for a specified store +executeStateTransaction: { + path: '/spec.proto.runtime.v1.Runtime/ExecuteStateTransaction', + requestStream: false, + responseStream: false, + requestType: runtime_pb.ExecuteStateTransactionRequest, + responseType: google_protobuf_empty_pb.Empty, + requestSerialize: serialize_spec_proto_runtime_v1_ExecuteStateTransactionRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_ExecuteStateTransactionRequest, + responseSerialize: serialize_google_protobuf_Empty, + responseDeserialize: deserialize_google_protobuf_Empty, + }, + // Publishes events to the specific topic +publishEvent: { + path: '/spec.proto.runtime.v1.Runtime/PublishEvent', + requestStream: false, + responseStream: false, + requestType: runtime_pb.PublishEventRequest, + responseType: google_protobuf_empty_pb.Empty, + requestSerialize: serialize_spec_proto_runtime_v1_PublishEventRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_PublishEventRequest, + responseSerialize: serialize_google_protobuf_Empty, + responseDeserialize: deserialize_google_protobuf_Empty, + }, + // Get file with stream +getFile: { + path: '/spec.proto.runtime.v1.Runtime/GetFile', + requestStream: false, + responseStream: true, + requestType: runtime_pb.GetFileRequest, + responseType: runtime_pb.GetFileResponse, + requestSerialize: serialize_spec_proto_runtime_v1_GetFileRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_GetFileRequest, + responseSerialize: serialize_spec_proto_runtime_v1_GetFileResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_GetFileResponse, + }, + // Put file with stream +putFile: { + path: '/spec.proto.runtime.v1.Runtime/PutFile', + requestStream: true, + responseStream: false, + requestType: runtime_pb.PutFileRequest, + responseType: google_protobuf_empty_pb.Empty, + requestSerialize: serialize_spec_proto_runtime_v1_PutFileRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_PutFileRequest, + responseSerialize: serialize_google_protobuf_Empty, + responseDeserialize: deserialize_google_protobuf_Empty, + }, + // List all files +listFile: { + path: '/spec.proto.runtime.v1.Runtime/ListFile', + requestStream: false, + responseStream: false, + requestType: runtime_pb.ListFileRequest, + responseType: runtime_pb.ListFileResp, + requestSerialize: serialize_spec_proto_runtime_v1_ListFileRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_ListFileRequest, + responseSerialize: serialize_spec_proto_runtime_v1_ListFileResp, + responseDeserialize: deserialize_spec_proto_runtime_v1_ListFileResp, + }, + // Delete specific file +delFile: { + path: '/spec.proto.runtime.v1.Runtime/DelFile', + requestStream: false, + responseStream: false, + requestType: runtime_pb.DelFileRequest, + responseType: google_protobuf_empty_pb.Empty, + requestSerialize: serialize_spec_proto_runtime_v1_DelFileRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_DelFileRequest, + responseSerialize: serialize_google_protobuf_Empty, + responseDeserialize: deserialize_google_protobuf_Empty, + }, + // Invokes binding data to specific output bindings +invokeBinding: { + path: '/spec.proto.runtime.v1.Runtime/InvokeBinding', + requestStream: false, + responseStream: false, + requestType: runtime_pb.InvokeBindingRequest, + responseType: runtime_pb.InvokeBindingResponse, + requestSerialize: serialize_spec_proto_runtime_v1_InvokeBindingRequest, + requestDeserialize: deserialize_spec_proto_runtime_v1_InvokeBindingRequest, + responseSerialize: serialize_spec_proto_runtime_v1_InvokeBindingResponse, + responseDeserialize: deserialize_spec_proto_runtime_v1_InvokeBindingResponse, + }, +}; + +exports.RuntimeClient = grpc.makeGenericClientConstructor(RuntimeService); diff --git a/sdk/js-sdk/proto/runtime_pb.d.ts b/sdk/js-sdk/proto/runtime_pb.d.ts new file mode 100644 index 0000000000..744019fd54 --- /dev/null +++ b/sdk/js-sdk/proto/runtime_pb.d.ts @@ -0,0 +1,1283 @@ +// package: spec.proto.runtime.v1 +// file: runtime.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; + +export class GetFileRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): GetFileRequest; + getName(): string; + setName(value: string): GetFileRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetFileRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetFileRequest): GetFileRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetFileRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetFileRequest; + static deserializeBinaryFromReader(message: GetFileRequest, reader: jspb.BinaryReader): GetFileRequest; +} + +export namespace GetFileRequest { + export type AsObject = { + storeName: string, + name: string, + + metadataMap: Array<[string, string]>, + } +} + +export class GetFileResponse extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): GetFileResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetFileResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetFileResponse): GetFileResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetFileResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetFileResponse; + static deserializeBinaryFromReader(message: GetFileResponse, reader: jspb.BinaryReader): GetFileResponse; +} + +export namespace GetFileResponse { + export type AsObject = { + data: Uint8Array | string, + } +} + +export class PutFileRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): PutFileRequest; + getName(): string; + setName(value: string): PutFileRequest; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): PutFileRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PutFileRequest.AsObject; + static toObject(includeInstance: boolean, msg: PutFileRequest): PutFileRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PutFileRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PutFileRequest; + static deserializeBinaryFromReader(message: PutFileRequest, reader: jspb.BinaryReader): PutFileRequest; +} + +export namespace PutFileRequest { + export type AsObject = { + storeName: string, + name: string, + data: Uint8Array | string, + + metadataMap: Array<[string, string]>, + } +} + +export class FileRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): FileRequest; + getName(): string; + setName(value: string): FileRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileRequest.AsObject; + static toObject(includeInstance: boolean, msg: FileRequest): FileRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileRequest; + static deserializeBinaryFromReader(message: FileRequest, reader: jspb.BinaryReader): FileRequest; +} + +export namespace FileRequest { + export type AsObject = { + storeName: string, + name: string, + + metadataMap: Array<[string, string]>, + } +} + +export class ListFileRequest extends jspb.Message { + + hasRequest(): boolean; + clearRequest(): void; + getRequest(): FileRequest | undefined; + setRequest(value?: FileRequest): ListFileRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListFileRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListFileRequest): ListFileRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListFileRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListFileRequest; + static deserializeBinaryFromReader(message: ListFileRequest, reader: jspb.BinaryReader): ListFileRequest; +} + +export namespace ListFileRequest { + export type AsObject = { + request?: FileRequest.AsObject, + } +} + +export class ListFileResp extends jspb.Message { + clearFileNameList(): void; + getFileNameList(): Array; + setFileNameList(value: Array): ListFileResp; + addFileName(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListFileResp.AsObject; + static toObject(includeInstance: boolean, msg: ListFileResp): ListFileResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListFileResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListFileResp; + static deserializeBinaryFromReader(message: ListFileResp, reader: jspb.BinaryReader): ListFileResp; +} + +export namespace ListFileResp { + export type AsObject = { + fileNameList: Array, + } +} + +export class DelFileRequest extends jspb.Message { + + hasRequest(): boolean; + clearRequest(): void; + getRequest(): FileRequest | undefined; + setRequest(value?: FileRequest): DelFileRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DelFileRequest.AsObject; + static toObject(includeInstance: boolean, msg: DelFileRequest): DelFileRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DelFileRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DelFileRequest; + static deserializeBinaryFromReader(message: DelFileRequest, reader: jspb.BinaryReader): DelFileRequest; +} + +export namespace DelFileRequest { + export type AsObject = { + request?: FileRequest.AsObject, + } +} + +export class GetNextIdRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): GetNextIdRequest; + getKey(): string; + setKey(value: string): GetNextIdRequest; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): SequencerOptions | undefined; + setOptions(value?: SequencerOptions): GetNextIdRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetNextIdRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetNextIdRequest): GetNextIdRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetNextIdRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetNextIdRequest; + static deserializeBinaryFromReader(message: GetNextIdRequest, reader: jspb.BinaryReader): GetNextIdRequest; +} + +export namespace GetNextIdRequest { + export type AsObject = { + storeName: string, + key: string, + options?: SequencerOptions.AsObject, + + metadataMap: Array<[string, string]>, + } +} + +export class SequencerOptions extends jspb.Message { + getIncrement(): SequencerOptions.AutoIncrement; + setIncrement(value: SequencerOptions.AutoIncrement): SequencerOptions; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SequencerOptions.AsObject; + static toObject(includeInstance: boolean, msg: SequencerOptions): SequencerOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SequencerOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SequencerOptions; + static deserializeBinaryFromReader(message: SequencerOptions, reader: jspb.BinaryReader): SequencerOptions; +} + +export namespace SequencerOptions { + export type AsObject = { + increment: SequencerOptions.AutoIncrement, + } + + export enum AutoIncrement { + WEAK = 0, + STRONG = 1, + } + +} + +export class GetNextIdResponse extends jspb.Message { + getNextId(): number; + setNextId(value: number): GetNextIdResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetNextIdResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetNextIdResponse): GetNextIdResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetNextIdResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetNextIdResponse; + static deserializeBinaryFromReader(message: GetNextIdResponse, reader: jspb.BinaryReader): GetNextIdResponse; +} + +export namespace GetNextIdResponse { + export type AsObject = { + nextId: number, + } +} + +export class TryLockRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): TryLockRequest; + getResourceId(): string; + setResourceId(value: string): TryLockRequest; + getLockOwner(): string; + setLockOwner(value: string): TryLockRequest; + getExpire(): number; + setExpire(value: number): TryLockRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TryLockRequest.AsObject; + static toObject(includeInstance: boolean, msg: TryLockRequest): TryLockRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TryLockRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TryLockRequest; + static deserializeBinaryFromReader(message: TryLockRequest, reader: jspb.BinaryReader): TryLockRequest; +} + +export namespace TryLockRequest { + export type AsObject = { + storeName: string, + resourceId: string, + lockOwner: string, + expire: number, + } +} + +export class TryLockResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): TryLockResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TryLockResponse.AsObject; + static toObject(includeInstance: boolean, msg: TryLockResponse): TryLockResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TryLockResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TryLockResponse; + static deserializeBinaryFromReader(message: TryLockResponse, reader: jspb.BinaryReader): TryLockResponse; +} + +export namespace TryLockResponse { + export type AsObject = { + success: boolean, + } +} + +export class UnlockRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): UnlockRequest; + getResourceId(): string; + setResourceId(value: string): UnlockRequest; + getLockOwner(): string; + setLockOwner(value: string): UnlockRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UnlockRequest.AsObject; + static toObject(includeInstance: boolean, msg: UnlockRequest): UnlockRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UnlockRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UnlockRequest; + static deserializeBinaryFromReader(message: UnlockRequest, reader: jspb.BinaryReader): UnlockRequest; +} + +export namespace UnlockRequest { + export type AsObject = { + storeName: string, + resourceId: string, + lockOwner: string, + } +} + +export class UnlockResponse extends jspb.Message { + getStatus(): UnlockResponse.Status; + setStatus(value: UnlockResponse.Status): UnlockResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UnlockResponse.AsObject; + static toObject(includeInstance: boolean, msg: UnlockResponse): UnlockResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UnlockResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UnlockResponse; + static deserializeBinaryFromReader(message: UnlockResponse, reader: jspb.BinaryReader): UnlockResponse; +} + +export namespace UnlockResponse { + export type AsObject = { + status: UnlockResponse.Status, + } + + export enum Status { + SUCCESS = 0, + LOCK_UNEXIST = 1, + LOCK_BELONG_TO_OTHERS = 2, + INTERNAL_ERROR = 3, + } + +} + +export class SayHelloRequest extends jspb.Message { + getServiceName(): string; + setServiceName(value: string): SayHelloRequest; + getName(): string; + setName(value: string): SayHelloRequest; + + hasData(): boolean; + clearData(): void; + getData(): google_protobuf_any_pb.Any | undefined; + setData(value?: google_protobuf_any_pb.Any): SayHelloRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SayHelloRequest.AsObject; + static toObject(includeInstance: boolean, msg: SayHelloRequest): SayHelloRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SayHelloRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SayHelloRequest; + static deserializeBinaryFromReader(message: SayHelloRequest, reader: jspb.BinaryReader): SayHelloRequest; +} + +export namespace SayHelloRequest { + export type AsObject = { + serviceName: string, + name: string, + data?: google_protobuf_any_pb.Any.AsObject, + } +} + +export class SayHelloResponse extends jspb.Message { + getHello(): string; + setHello(value: string): SayHelloResponse; + + hasData(): boolean; + clearData(): void; + getData(): google_protobuf_any_pb.Any | undefined; + setData(value?: google_protobuf_any_pb.Any): SayHelloResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SayHelloResponse.AsObject; + static toObject(includeInstance: boolean, msg: SayHelloResponse): SayHelloResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SayHelloResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SayHelloResponse; + static deserializeBinaryFromReader(message: SayHelloResponse, reader: jspb.BinaryReader): SayHelloResponse; +} + +export namespace SayHelloResponse { + export type AsObject = { + hello: string, + data?: google_protobuf_any_pb.Any.AsObject, + } +} + +export class InvokeServiceRequest extends jspb.Message { + getId(): string; + setId(value: string): InvokeServiceRequest; + + hasMessage(): boolean; + clearMessage(): void; + getMessage(): CommonInvokeRequest | undefined; + setMessage(value?: CommonInvokeRequest): InvokeServiceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InvokeServiceRequest.AsObject; + static toObject(includeInstance: boolean, msg: InvokeServiceRequest): InvokeServiceRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InvokeServiceRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InvokeServiceRequest; + static deserializeBinaryFromReader(message: InvokeServiceRequest, reader: jspb.BinaryReader): InvokeServiceRequest; +} + +export namespace InvokeServiceRequest { + export type AsObject = { + id: string, + message?: CommonInvokeRequest.AsObject, + } +} + +export class CommonInvokeRequest extends jspb.Message { + getMethod(): string; + setMethod(value: string): CommonInvokeRequest; + + hasData(): boolean; + clearData(): void; + getData(): google_protobuf_any_pb.Any | undefined; + setData(value?: google_protobuf_any_pb.Any): CommonInvokeRequest; + getContentType(): string; + setContentType(value: string): CommonInvokeRequest; + + hasHttpExtension(): boolean; + clearHttpExtension(): void; + getHttpExtension(): HTTPExtension | undefined; + setHttpExtension(value?: HTTPExtension): CommonInvokeRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CommonInvokeRequest.AsObject; + static toObject(includeInstance: boolean, msg: CommonInvokeRequest): CommonInvokeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CommonInvokeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CommonInvokeRequest; + static deserializeBinaryFromReader(message: CommonInvokeRequest, reader: jspb.BinaryReader): CommonInvokeRequest; +} + +export namespace CommonInvokeRequest { + export type AsObject = { + method: string, + data?: google_protobuf_any_pb.Any.AsObject, + contentType: string, + httpExtension?: HTTPExtension.AsObject, + } +} + +export class HTTPExtension extends jspb.Message { + getVerb(): HTTPExtension.Verb; + setVerb(value: HTTPExtension.Verb): HTTPExtension; + getQuerystring(): string; + setQuerystring(value: string): HTTPExtension; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HTTPExtension.AsObject; + static toObject(includeInstance: boolean, msg: HTTPExtension): HTTPExtension.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HTTPExtension, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HTTPExtension; + static deserializeBinaryFromReader(message: HTTPExtension, reader: jspb.BinaryReader): HTTPExtension; +} + +export namespace HTTPExtension { + export type AsObject = { + verb: HTTPExtension.Verb, + querystring: string, + } + + export enum Verb { + NONE = 0, + GET = 1, + HEAD = 2, + POST = 3, + PUT = 4, + DELETE = 5, + CONNECT = 6, + OPTIONS = 7, + TRACE = 8, + } + +} + +export class InvokeResponse extends jspb.Message { + + hasData(): boolean; + clearData(): void; + getData(): google_protobuf_any_pb.Any | undefined; + setData(value?: google_protobuf_any_pb.Any): InvokeResponse; + getContentType(): string; + setContentType(value: string): InvokeResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InvokeResponse.AsObject; + static toObject(includeInstance: boolean, msg: InvokeResponse): InvokeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InvokeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InvokeResponse; + static deserializeBinaryFromReader(message: InvokeResponse, reader: jspb.BinaryReader): InvokeResponse; +} + +export namespace InvokeResponse { + export type AsObject = { + data?: google_protobuf_any_pb.Any.AsObject, + contentType: string, + } +} + +export class ConfigurationItem extends jspb.Message { + getKey(): string; + setKey(value: string): ConfigurationItem; + getContent(): string; + setContent(value: string): ConfigurationItem; + getGroup(): string; + setGroup(value: string): ConfigurationItem; + getLabel(): string; + setLabel(value: string): ConfigurationItem; + + getTagsMap(): jspb.Map; + clearTagsMap(): void; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConfigurationItem.AsObject; + static toObject(includeInstance: boolean, msg: ConfigurationItem): ConfigurationItem.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConfigurationItem, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConfigurationItem; + static deserializeBinaryFromReader(message: ConfigurationItem, reader: jspb.BinaryReader): ConfigurationItem; +} + +export namespace ConfigurationItem { + export type AsObject = { + key: string, + content: string, + group: string, + label: string, + + tagsMap: Array<[string, string]>, + + metadataMap: Array<[string, string]>, + } +} + +export class GetConfigurationRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): GetConfigurationRequest; + getAppId(): string; + setAppId(value: string): GetConfigurationRequest; + getGroup(): string; + setGroup(value: string): GetConfigurationRequest; + getLabel(): string; + setLabel(value: string): GetConfigurationRequest; + clearKeysList(): void; + getKeysList(): Array; + setKeysList(value: Array): GetConfigurationRequest; + addKeys(value: string, index?: number): string; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + getSubscribeUpdate(): boolean; + setSubscribeUpdate(value: boolean): GetConfigurationRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetConfigurationRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetConfigurationRequest): GetConfigurationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetConfigurationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetConfigurationRequest; + static deserializeBinaryFromReader(message: GetConfigurationRequest, reader: jspb.BinaryReader): GetConfigurationRequest; +} + +export namespace GetConfigurationRequest { + export type AsObject = { + storeName: string, + appId: string, + group: string, + label: string, + keysList: Array, + + metadataMap: Array<[string, string]>, + subscribeUpdate: boolean, + } +} + +export class GetConfigurationResponse extends jspb.Message { + clearItemsList(): void; + getItemsList(): Array; + setItemsList(value: Array): GetConfigurationResponse; + addItems(value?: ConfigurationItem, index?: number): ConfigurationItem; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetConfigurationResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetConfigurationResponse): GetConfigurationResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetConfigurationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetConfigurationResponse; + static deserializeBinaryFromReader(message: GetConfigurationResponse, reader: jspb.BinaryReader): GetConfigurationResponse; +} + +export namespace GetConfigurationResponse { + export type AsObject = { + itemsList: Array, + } +} + +export class SubscribeConfigurationRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): SubscribeConfigurationRequest; + getAppId(): string; + setAppId(value: string): SubscribeConfigurationRequest; + getGroup(): string; + setGroup(value: string): SubscribeConfigurationRequest; + getLabel(): string; + setLabel(value: string): SubscribeConfigurationRequest; + clearKeysList(): void; + getKeysList(): Array; + setKeysList(value: Array): SubscribeConfigurationRequest; + addKeys(value: string, index?: number): string; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubscribeConfigurationRequest.AsObject; + static toObject(includeInstance: boolean, msg: SubscribeConfigurationRequest): SubscribeConfigurationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubscribeConfigurationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubscribeConfigurationRequest; + static deserializeBinaryFromReader(message: SubscribeConfigurationRequest, reader: jspb.BinaryReader): SubscribeConfigurationRequest; +} + +export namespace SubscribeConfigurationRequest { + export type AsObject = { + storeName: string, + appId: string, + group: string, + label: string, + keysList: Array, + + metadataMap: Array<[string, string]>, + } +} + +export class SubscribeConfigurationResponse extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): SubscribeConfigurationResponse; + getAppId(): string; + setAppId(value: string): SubscribeConfigurationResponse; + clearItemsList(): void; + getItemsList(): Array; + setItemsList(value: Array): SubscribeConfigurationResponse; + addItems(value?: ConfigurationItem, index?: number): ConfigurationItem; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubscribeConfigurationResponse.AsObject; + static toObject(includeInstance: boolean, msg: SubscribeConfigurationResponse): SubscribeConfigurationResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubscribeConfigurationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubscribeConfigurationResponse; + static deserializeBinaryFromReader(message: SubscribeConfigurationResponse, reader: jspb.BinaryReader): SubscribeConfigurationResponse; +} + +export namespace SubscribeConfigurationResponse { + export type AsObject = { + storeName: string, + appId: string, + itemsList: Array, + } +} + +export class SaveConfigurationRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): SaveConfigurationRequest; + getAppId(): string; + setAppId(value: string): SaveConfigurationRequest; + clearItemsList(): void; + getItemsList(): Array; + setItemsList(value: Array): SaveConfigurationRequest; + addItems(value?: ConfigurationItem, index?: number): ConfigurationItem; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SaveConfigurationRequest.AsObject; + static toObject(includeInstance: boolean, msg: SaveConfigurationRequest): SaveConfigurationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SaveConfigurationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SaveConfigurationRequest; + static deserializeBinaryFromReader(message: SaveConfigurationRequest, reader: jspb.BinaryReader): SaveConfigurationRequest; +} + +export namespace SaveConfigurationRequest { + export type AsObject = { + storeName: string, + appId: string, + itemsList: Array, + + metadataMap: Array<[string, string]>, + } +} + +export class DeleteConfigurationRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): DeleteConfigurationRequest; + getAppId(): string; + setAppId(value: string): DeleteConfigurationRequest; + getGroup(): string; + setGroup(value: string): DeleteConfigurationRequest; + getLabel(): string; + setLabel(value: string): DeleteConfigurationRequest; + clearKeysList(): void; + getKeysList(): Array; + setKeysList(value: Array): DeleteConfigurationRequest; + addKeys(value: string, index?: number): string; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteConfigurationRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteConfigurationRequest): DeleteConfigurationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteConfigurationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteConfigurationRequest; + static deserializeBinaryFromReader(message: DeleteConfigurationRequest, reader: jspb.BinaryReader): DeleteConfigurationRequest; +} + +export namespace DeleteConfigurationRequest { + export type AsObject = { + storeName: string, + appId: string, + group: string, + label: string, + keysList: Array, + + metadataMap: Array<[string, string]>, + } +} + +export class GetStateRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): GetStateRequest; + getKey(): string; + setKey(value: string): GetStateRequest; + getConsistency(): StateOptions.StateConsistency; + setConsistency(value: StateOptions.StateConsistency): GetStateRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStateRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetStateRequest): GetStateRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStateRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStateRequest; + static deserializeBinaryFromReader(message: GetStateRequest, reader: jspb.BinaryReader): GetStateRequest; +} + +export namespace GetStateRequest { + export type AsObject = { + storeName: string, + key: string, + consistency: StateOptions.StateConsistency, + + metadataMap: Array<[string, string]>, + } +} + +export class GetBulkStateRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): GetBulkStateRequest; + clearKeysList(): void; + getKeysList(): Array; + setKeysList(value: Array): GetBulkStateRequest; + addKeys(value: string, index?: number): string; + getParallelism(): number; + setParallelism(value: number): GetBulkStateRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBulkStateRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetBulkStateRequest): GetBulkStateRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetBulkStateRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBulkStateRequest; + static deserializeBinaryFromReader(message: GetBulkStateRequest, reader: jspb.BinaryReader): GetBulkStateRequest; +} + +export namespace GetBulkStateRequest { + export type AsObject = { + storeName: string, + keysList: Array, + parallelism: number, + + metadataMap: Array<[string, string]>, + } +} + +export class GetBulkStateResponse extends jspb.Message { + clearItemsList(): void; + getItemsList(): Array; + setItemsList(value: Array): GetBulkStateResponse; + addItems(value?: BulkStateItem, index?: number): BulkStateItem; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBulkStateResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetBulkStateResponse): GetBulkStateResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetBulkStateResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBulkStateResponse; + static deserializeBinaryFromReader(message: GetBulkStateResponse, reader: jspb.BinaryReader): GetBulkStateResponse; +} + +export namespace GetBulkStateResponse { + export type AsObject = { + itemsList: Array, + } +} + +export class BulkStateItem extends jspb.Message { + getKey(): string; + setKey(value: string): BulkStateItem; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): BulkStateItem; + getEtag(): string; + setEtag(value: string): BulkStateItem; + getError(): string; + setError(value: string): BulkStateItem; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BulkStateItem.AsObject; + static toObject(includeInstance: boolean, msg: BulkStateItem): BulkStateItem.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BulkStateItem, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BulkStateItem; + static deserializeBinaryFromReader(message: BulkStateItem, reader: jspb.BinaryReader): BulkStateItem; +} + +export namespace BulkStateItem { + export type AsObject = { + key: string, + data: Uint8Array | string, + etag: string, + error: string, + + metadataMap: Array<[string, string]>, + } +} + +export class GetStateResponse extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): GetStateResponse; + getEtag(): string; + setEtag(value: string): GetStateResponse; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStateResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetStateResponse): GetStateResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStateResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStateResponse; + static deserializeBinaryFromReader(message: GetStateResponse, reader: jspb.BinaryReader): GetStateResponse; +} + +export namespace GetStateResponse { + export type AsObject = { + data: Uint8Array | string, + etag: string, + + metadataMap: Array<[string, string]>, + } +} + +export class DeleteStateRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): DeleteStateRequest; + getKey(): string; + setKey(value: string): DeleteStateRequest; + + hasEtag(): boolean; + clearEtag(): void; + getEtag(): Etag | undefined; + setEtag(value?: Etag): DeleteStateRequest; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): StateOptions | undefined; + setOptions(value?: StateOptions): DeleteStateRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteStateRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteStateRequest): DeleteStateRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteStateRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteStateRequest; + static deserializeBinaryFromReader(message: DeleteStateRequest, reader: jspb.BinaryReader): DeleteStateRequest; +} + +export namespace DeleteStateRequest { + export type AsObject = { + storeName: string, + key: string, + etag?: Etag.AsObject, + options?: StateOptions.AsObject, + + metadataMap: Array<[string, string]>, + } +} + +export class DeleteBulkStateRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): DeleteBulkStateRequest; + clearStatesList(): void; + getStatesList(): Array; + setStatesList(value: Array): DeleteBulkStateRequest; + addStates(value?: StateItem, index?: number): StateItem; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteBulkStateRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteBulkStateRequest): DeleteBulkStateRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteBulkStateRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteBulkStateRequest; + static deserializeBinaryFromReader(message: DeleteBulkStateRequest, reader: jspb.BinaryReader): DeleteBulkStateRequest; +} + +export namespace DeleteBulkStateRequest { + export type AsObject = { + storeName: string, + statesList: Array, + } +} + +export class SaveStateRequest extends jspb.Message { + getStoreName(): string; + setStoreName(value: string): SaveStateRequest; + clearStatesList(): void; + getStatesList(): Array; + setStatesList(value: Array): SaveStateRequest; + addStates(value?: StateItem, index?: number): StateItem; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SaveStateRequest.AsObject; + static toObject(includeInstance: boolean, msg: SaveStateRequest): SaveStateRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SaveStateRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SaveStateRequest; + static deserializeBinaryFromReader(message: SaveStateRequest, reader: jspb.BinaryReader): SaveStateRequest; +} + +export namespace SaveStateRequest { + export type AsObject = { + storeName: string, + statesList: Array, + } +} + +export class StateItem extends jspb.Message { + getKey(): string; + setKey(value: string): StateItem; + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): StateItem; + + hasEtag(): boolean; + clearEtag(): void; + getEtag(): Etag | undefined; + setEtag(value?: Etag): StateItem; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): StateOptions | undefined; + setOptions(value?: StateOptions): StateItem; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StateItem.AsObject; + static toObject(includeInstance: boolean, msg: StateItem): StateItem.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StateItem, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StateItem; + static deserializeBinaryFromReader(message: StateItem, reader: jspb.BinaryReader): StateItem; +} + +export namespace StateItem { + export type AsObject = { + key: string, + value: Uint8Array | string, + etag?: Etag.AsObject, + + metadataMap: Array<[string, string]>, + options?: StateOptions.AsObject, + } +} + +export class Etag extends jspb.Message { + getValue(): string; + setValue(value: string): Etag; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Etag.AsObject; + static toObject(includeInstance: boolean, msg: Etag): Etag.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Etag, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Etag; + static deserializeBinaryFromReader(message: Etag, reader: jspb.BinaryReader): Etag; +} + +export namespace Etag { + export type AsObject = { + value: string, + } +} + +export class StateOptions extends jspb.Message { + getConcurrency(): StateOptions.StateConcurrency; + setConcurrency(value: StateOptions.StateConcurrency): StateOptions; + getConsistency(): StateOptions.StateConsistency; + setConsistency(value: StateOptions.StateConsistency): StateOptions; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StateOptions.AsObject; + static toObject(includeInstance: boolean, msg: StateOptions): StateOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StateOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StateOptions; + static deserializeBinaryFromReader(message: StateOptions, reader: jspb.BinaryReader): StateOptions; +} + +export namespace StateOptions { + export type AsObject = { + concurrency: StateOptions.StateConcurrency, + consistency: StateOptions.StateConsistency, + } + + export enum StateConcurrency { + CONCURRENCY_UNSPECIFIED = 0, + CONCURRENCY_FIRST_WRITE = 1, + CONCURRENCY_LAST_WRITE = 2, + } + + export enum StateConsistency { + CONSISTENCY_UNSPECIFIED = 0, + CONSISTENCY_EVENTUAL = 1, + CONSISTENCY_STRONG = 2, + } + +} + +export class TransactionalStateOperation extends jspb.Message { + getOperationtype(): string; + setOperationtype(value: string): TransactionalStateOperation; + + hasRequest(): boolean; + clearRequest(): void; + getRequest(): StateItem | undefined; + setRequest(value?: StateItem): TransactionalStateOperation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransactionalStateOperation.AsObject; + static toObject(includeInstance: boolean, msg: TransactionalStateOperation): TransactionalStateOperation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TransactionalStateOperation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransactionalStateOperation; + static deserializeBinaryFromReader(message: TransactionalStateOperation, reader: jspb.BinaryReader): TransactionalStateOperation; +} + +export namespace TransactionalStateOperation { + export type AsObject = { + operationtype: string, + request?: StateItem.AsObject, + } +} + +export class ExecuteStateTransactionRequest extends jspb.Message { + getStorename(): string; + setStorename(value: string): ExecuteStateTransactionRequest; + clearOperationsList(): void; + getOperationsList(): Array; + setOperationsList(value: Array): ExecuteStateTransactionRequest; + addOperations(value?: TransactionalStateOperation, index?: number): TransactionalStateOperation; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExecuteStateTransactionRequest.AsObject; + static toObject(includeInstance: boolean, msg: ExecuteStateTransactionRequest): ExecuteStateTransactionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExecuteStateTransactionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExecuteStateTransactionRequest; + static deserializeBinaryFromReader(message: ExecuteStateTransactionRequest, reader: jspb.BinaryReader): ExecuteStateTransactionRequest; +} + +export namespace ExecuteStateTransactionRequest { + export type AsObject = { + storename: string, + operationsList: Array, + + metadataMap: Array<[string, string]>, + } +} + +export class PublishEventRequest extends jspb.Message { + getPubsubName(): string; + setPubsubName(value: string): PublishEventRequest; + getTopic(): string; + setTopic(value: string): PublishEventRequest; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): PublishEventRequest; + getDataContentType(): string; + setDataContentType(value: string): PublishEventRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PublishEventRequest.AsObject; + static toObject(includeInstance: boolean, msg: PublishEventRequest): PublishEventRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PublishEventRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PublishEventRequest; + static deserializeBinaryFromReader(message: PublishEventRequest, reader: jspb.BinaryReader): PublishEventRequest; +} + +export namespace PublishEventRequest { + export type AsObject = { + pubsubName: string, + topic: string, + data: Uint8Array | string, + dataContentType: string, + + metadataMap: Array<[string, string]>, + } +} + +export class InvokeBindingRequest extends jspb.Message { + getName(): string; + setName(value: string): InvokeBindingRequest; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): InvokeBindingRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + getOperation(): string; + setOperation(value: string): InvokeBindingRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InvokeBindingRequest.AsObject; + static toObject(includeInstance: boolean, msg: InvokeBindingRequest): InvokeBindingRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InvokeBindingRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InvokeBindingRequest; + static deserializeBinaryFromReader(message: InvokeBindingRequest, reader: jspb.BinaryReader): InvokeBindingRequest; +} + +export namespace InvokeBindingRequest { + export type AsObject = { + name: string, + data: Uint8Array | string, + + metadataMap: Array<[string, string]>, + operation: string, + } +} + +export class InvokeBindingResponse extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): InvokeBindingResponse; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InvokeBindingResponse.AsObject; + static toObject(includeInstance: boolean, msg: InvokeBindingResponse): InvokeBindingResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InvokeBindingResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InvokeBindingResponse; + static deserializeBinaryFromReader(message: InvokeBindingResponse, reader: jspb.BinaryReader): InvokeBindingResponse; +} + +export namespace InvokeBindingResponse { + export type AsObject = { + data: Uint8Array | string, + + metadataMap: Array<[string, string]>, + } +} diff --git a/sdk/js-sdk/proto/runtime_pb.js b/sdk/js-sdk/proto/runtime_pb.js new file mode 100644 index 0000000000..db7edb7018 --- /dev/null +++ b/sdk/js-sdk/proto/runtime_pb.js @@ -0,0 +1,10020 @@ +// source: runtime.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @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 google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); +goog.object.extend(proto, google_protobuf_empty_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.spec.proto.runtime.v1.BulkStateItem', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.CommonInvokeRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.ConfigurationItem', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.DelFileRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.DeleteBulkStateRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.DeleteConfigurationRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.DeleteStateRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.Etag', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.FileRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.GetBulkStateRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.GetBulkStateResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.GetConfigurationRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.GetConfigurationResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.GetFileRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.GetFileResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.GetNextIdRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.GetNextIdResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.GetStateRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.GetStateResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.HTTPExtension', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.HTTPExtension.Verb', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.InvokeBindingRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.InvokeBindingResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.InvokeResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.InvokeServiceRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.ListFileRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.ListFileResp', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.PublishEventRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.PutFileRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.SaveConfigurationRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.SaveStateRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.SayHelloRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.SayHelloResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.SequencerOptions', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.SequencerOptions.AutoIncrement', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.StateItem', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.StateOptions', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.StateOptions.StateConcurrency', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.StateOptions.StateConsistency', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.SubscribeConfigurationRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.SubscribeConfigurationResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.TransactionalStateOperation', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.TryLockRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.TryLockResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.UnlockRequest', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.UnlockResponse', null, global); +goog.exportSymbol('proto.spec.proto.runtime.v1.UnlockResponse.Status', 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.spec.proto.runtime.v1.GetFileRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.GetFileRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.GetFileRequest.displayName = 'proto.spec.proto.runtime.v1.GetFileRequest'; +} +/** + * 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.spec.proto.runtime.v1.GetFileResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.GetFileResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.GetFileResponse.displayName = 'proto.spec.proto.runtime.v1.GetFileResponse'; +} +/** + * 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.spec.proto.runtime.v1.PutFileRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.PutFileRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.PutFileRequest.displayName = 'proto.spec.proto.runtime.v1.PutFileRequest'; +} +/** + * 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.spec.proto.runtime.v1.FileRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.FileRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.FileRequest.displayName = 'proto.spec.proto.runtime.v1.FileRequest'; +} +/** + * 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.spec.proto.runtime.v1.ListFileRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.ListFileRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.ListFileRequest.displayName = 'proto.spec.proto.runtime.v1.ListFileRequest'; +} +/** + * 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.spec.proto.runtime.v1.ListFileResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.ListFileResp.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.ListFileResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.ListFileResp.displayName = 'proto.spec.proto.runtime.v1.ListFileResp'; +} +/** + * 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.spec.proto.runtime.v1.DelFileRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.DelFileRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.DelFileRequest.displayName = 'proto.spec.proto.runtime.v1.DelFileRequest'; +} +/** + * 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.spec.proto.runtime.v1.GetNextIdRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.GetNextIdRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.GetNextIdRequest.displayName = 'proto.spec.proto.runtime.v1.GetNextIdRequest'; +} +/** + * 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.spec.proto.runtime.v1.SequencerOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.SequencerOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.SequencerOptions.displayName = 'proto.spec.proto.runtime.v1.SequencerOptions'; +} +/** + * 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.spec.proto.runtime.v1.GetNextIdResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.GetNextIdResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.GetNextIdResponse.displayName = 'proto.spec.proto.runtime.v1.GetNextIdResponse'; +} +/** + * 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.spec.proto.runtime.v1.TryLockRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.TryLockRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.TryLockRequest.displayName = 'proto.spec.proto.runtime.v1.TryLockRequest'; +} +/** + * 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.spec.proto.runtime.v1.TryLockResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.TryLockResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.TryLockResponse.displayName = 'proto.spec.proto.runtime.v1.TryLockResponse'; +} +/** + * 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.spec.proto.runtime.v1.UnlockRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.UnlockRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.UnlockRequest.displayName = 'proto.spec.proto.runtime.v1.UnlockRequest'; +} +/** + * 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.spec.proto.runtime.v1.UnlockResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.UnlockResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.UnlockResponse.displayName = 'proto.spec.proto.runtime.v1.UnlockResponse'; +} +/** + * 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.spec.proto.runtime.v1.SayHelloRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.SayHelloRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.SayHelloRequest.displayName = 'proto.spec.proto.runtime.v1.SayHelloRequest'; +} +/** + * 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.spec.proto.runtime.v1.SayHelloResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.SayHelloResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.SayHelloResponse.displayName = 'proto.spec.proto.runtime.v1.SayHelloResponse'; +} +/** + * 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.spec.proto.runtime.v1.InvokeServiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.InvokeServiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.InvokeServiceRequest.displayName = 'proto.spec.proto.runtime.v1.InvokeServiceRequest'; +} +/** + * 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.spec.proto.runtime.v1.CommonInvokeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.CommonInvokeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.CommonInvokeRequest.displayName = 'proto.spec.proto.runtime.v1.CommonInvokeRequest'; +} +/** + * 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.spec.proto.runtime.v1.HTTPExtension = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.HTTPExtension, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.HTTPExtension.displayName = 'proto.spec.proto.runtime.v1.HTTPExtension'; +} +/** + * 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.spec.proto.runtime.v1.InvokeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.InvokeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.InvokeResponse.displayName = 'proto.spec.proto.runtime.v1.InvokeResponse'; +} +/** + * 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.spec.proto.runtime.v1.ConfigurationItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.ConfigurationItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.ConfigurationItem.displayName = 'proto.spec.proto.runtime.v1.ConfigurationItem'; +} +/** + * 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.spec.proto.runtime.v1.GetConfigurationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.GetConfigurationRequest.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.GetConfigurationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.GetConfigurationRequest.displayName = 'proto.spec.proto.runtime.v1.GetConfigurationRequest'; +} +/** + * 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.spec.proto.runtime.v1.GetConfigurationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.GetConfigurationResponse.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.GetConfigurationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.GetConfigurationResponse.displayName = 'proto.spec.proto.runtime.v1.GetConfigurationResponse'; +} +/** + * 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.spec.proto.runtime.v1.SubscribeConfigurationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.SubscribeConfigurationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.displayName = 'proto.spec.proto.runtime.v1.SubscribeConfigurationRequest'; +} +/** + * 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.spec.proto.runtime.v1.SubscribeConfigurationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.SubscribeConfigurationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.displayName = 'proto.spec.proto.runtime.v1.SubscribeConfigurationResponse'; +} +/** + * 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.spec.proto.runtime.v1.SaveConfigurationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.SaveConfigurationRequest.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.SaveConfigurationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.SaveConfigurationRequest.displayName = 'proto.spec.proto.runtime.v1.SaveConfigurationRequest'; +} +/** + * 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.spec.proto.runtime.v1.DeleteConfigurationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.DeleteConfigurationRequest.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.DeleteConfigurationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.DeleteConfigurationRequest.displayName = 'proto.spec.proto.runtime.v1.DeleteConfigurationRequest'; +} +/** + * 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.spec.proto.runtime.v1.GetStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.GetStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.GetStateRequest.displayName = 'proto.spec.proto.runtime.v1.GetStateRequest'; +} +/** + * 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.spec.proto.runtime.v1.GetBulkStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.GetBulkStateRequest.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.GetBulkStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.GetBulkStateRequest.displayName = 'proto.spec.proto.runtime.v1.GetBulkStateRequest'; +} +/** + * 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.spec.proto.runtime.v1.GetBulkStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.GetBulkStateResponse.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.GetBulkStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.GetBulkStateResponse.displayName = 'proto.spec.proto.runtime.v1.GetBulkStateResponse'; +} +/** + * 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.spec.proto.runtime.v1.BulkStateItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.BulkStateItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.BulkStateItem.displayName = 'proto.spec.proto.runtime.v1.BulkStateItem'; +} +/** + * 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.spec.proto.runtime.v1.GetStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.GetStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.GetStateResponse.displayName = 'proto.spec.proto.runtime.v1.GetStateResponse'; +} +/** + * 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.spec.proto.runtime.v1.DeleteStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.DeleteStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.DeleteStateRequest.displayName = 'proto.spec.proto.runtime.v1.DeleteStateRequest'; +} +/** + * 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.spec.proto.runtime.v1.DeleteBulkStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.DeleteBulkStateRequest.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.DeleteBulkStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.DeleteBulkStateRequest.displayName = 'proto.spec.proto.runtime.v1.DeleteBulkStateRequest'; +} +/** + * 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.spec.proto.runtime.v1.SaveStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.SaveStateRequest.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.SaveStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.SaveStateRequest.displayName = 'proto.spec.proto.runtime.v1.SaveStateRequest'; +} +/** + * 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.spec.proto.runtime.v1.StateItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.StateItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.StateItem.displayName = 'proto.spec.proto.runtime.v1.StateItem'; +} +/** + * 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.spec.proto.runtime.v1.Etag = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.Etag, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.Etag.displayName = 'proto.spec.proto.runtime.v1.Etag'; +} +/** + * 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.spec.proto.runtime.v1.StateOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.StateOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.StateOptions.displayName = 'proto.spec.proto.runtime.v1.StateOptions'; +} +/** + * 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.spec.proto.runtime.v1.TransactionalStateOperation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.TransactionalStateOperation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.TransactionalStateOperation.displayName = 'proto.spec.proto.runtime.v1.TransactionalStateOperation'; +} +/** + * 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.spec.proto.runtime.v1.ExecuteStateTransactionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.repeatedFields_, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.displayName = 'proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest'; +} +/** + * 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.spec.proto.runtime.v1.PublishEventRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.PublishEventRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.PublishEventRequest.displayName = 'proto.spec.proto.runtime.v1.PublishEventRequest'; +} +/** + * 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.spec.proto.runtime.v1.InvokeBindingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.InvokeBindingRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.InvokeBindingRequest.displayName = 'proto.spec.proto.runtime.v1.InvokeBindingRequest'; +} +/** + * 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.spec.proto.runtime.v1.InvokeBindingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.spec.proto.runtime.v1.InvokeBindingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.proto.runtime.v1.InvokeBindingResponse.displayName = 'proto.spec.proto.runtime.v1.InvokeBindingResponse'; +} + + + +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.spec.proto.runtime.v1.GetFileRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.GetFileRequest.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.spec.proto.runtime.v1.GetFileRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetFileRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.GetFileRequest} + */ +proto.spec.proto.runtime.v1.GetFileRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.GetFileRequest; + return proto.spec.proto.runtime.v1.GetFileRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.GetFileRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.GetFileRequest} + */ +proto.spec.proto.runtime.v1.GetFileRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetFileRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.GetFileRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.GetFileRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetFileRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetFileRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetFileRequest} returns this + */ +proto.spec.proto.runtime.v1.GetFileRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetFileRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetFileRequest} returns this + */ +proto.spec.proto.runtime.v1.GetFileRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * map metadata = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.GetFileRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.GetFileRequest} returns this + */ +proto.spec.proto.runtime.v1.GetFileRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().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.spec.proto.runtime.v1.GetFileResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.GetFileResponse.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.spec.proto.runtime.v1.GetFileResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetFileResponse.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_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.spec.proto.runtime.v1.GetFileResponse} + */ +proto.spec.proto.runtime.v1.GetFileResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.GetFileResponse; + return proto.spec.proto.runtime.v1.GetFileResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.GetFileResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.GetFileResponse} + */ +proto.spec.proto.runtime.v1.GetFileResponse.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.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetFileResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.GetFileResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.GetFileResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetFileResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.spec.proto.runtime.v1.GetFileResponse.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.spec.proto.runtime.v1.GetFileResponse.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetFileResponse.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.proto.runtime.v1.GetFileResponse} returns this + */ +proto.spec.proto.runtime.v1.GetFileResponse.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(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.spec.proto.runtime.v1.PutFileRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.PutFileRequest.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.spec.proto.runtime.v1.PutFileRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.PutFileRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: msg.getData_asB64(), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.PutFileRequest} + */ +proto.spec.proto.runtime.v1.PutFileRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.PutFileRequest; + return proto.spec.proto.runtime.v1.PutFileRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.PutFileRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.PutFileRequest} + */ +proto.spec.proto.runtime.v1.PutFileRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.PutFileRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.PutFileRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.PutFileRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.PutFileRequest} returns this + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.PutFileRequest} returns this + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.proto.runtime.v1.PutFileRequest} returns this + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * map metadata = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.PutFileRequest} returns this + */ +proto.spec.proto.runtime.v1.PutFileRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().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.spec.proto.runtime.v1.FileRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.FileRequest.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.spec.proto.runtime.v1.FileRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.FileRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.FileRequest} + */ +proto.spec.proto.runtime.v1.FileRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.FileRequest; + return proto.spec.proto.runtime.v1.FileRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.FileRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.FileRequest} + */ +proto.spec.proto.runtime.v1.FileRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.FileRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.FileRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.FileRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.FileRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.FileRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.FileRequest} returns this + */ +proto.spec.proto.runtime.v1.FileRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.FileRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.FileRequest} returns this + */ +proto.spec.proto.runtime.v1.FileRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * map metadata = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.FileRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.FileRequest} returns this + */ +proto.spec.proto.runtime.v1.FileRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().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.spec.proto.runtime.v1.ListFileRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.ListFileRequest.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.spec.proto.runtime.v1.ListFileRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.ListFileRequest.toObject = function(includeInstance, msg) { + var f, obj = { + request: (f = msg.getRequest()) && proto.spec.proto.runtime.v1.FileRequest.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.spec.proto.runtime.v1.ListFileRequest} + */ +proto.spec.proto.runtime.v1.ListFileRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.ListFileRequest; + return proto.spec.proto.runtime.v1.ListFileRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.ListFileRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.ListFileRequest} + */ +proto.spec.proto.runtime.v1.ListFileRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spec.proto.runtime.v1.FileRequest; + reader.readMessage(value,proto.spec.proto.runtime.v1.FileRequest.deserializeBinaryFromReader); + msg.setRequest(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.ListFileRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.ListFileRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.ListFileRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.ListFileRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.spec.proto.runtime.v1.FileRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional FileRequest request = 1; + * @return {?proto.spec.proto.runtime.v1.FileRequest} + */ +proto.spec.proto.runtime.v1.ListFileRequest.prototype.getRequest = function() { + return /** @type{?proto.spec.proto.runtime.v1.FileRequest} */ ( + jspb.Message.getWrapperField(this, proto.spec.proto.runtime.v1.FileRequest, 1)); +}; + + +/** + * @param {?proto.spec.proto.runtime.v1.FileRequest|undefined} value + * @return {!proto.spec.proto.runtime.v1.ListFileRequest} returns this +*/ +proto.spec.proto.runtime.v1.ListFileRequest.prototype.setRequest = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.ListFileRequest} returns this + */ +proto.spec.proto.runtime.v1.ListFileRequest.prototype.clearRequest = function() { + return this.setRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.ListFileRequest.prototype.hasRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.ListFileResp.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.spec.proto.runtime.v1.ListFileResp.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.ListFileResp.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.spec.proto.runtime.v1.ListFileResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.ListFileResp.toObject = function(includeInstance, msg) { + var f, obj = { + fileNameList: (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.spec.proto.runtime.v1.ListFileResp} + */ +proto.spec.proto.runtime.v1.ListFileResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.ListFileResp; + return proto.spec.proto.runtime.v1.ListFileResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.ListFileResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.ListFileResp} + */ +proto.spec.proto.runtime.v1.ListFileResp.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.addFileName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.ListFileResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.ListFileResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.ListFileResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.ListFileResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFileNameList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string file_name = 1; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.ListFileResp.prototype.getFileNameList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.ListFileResp} returns this + */ +proto.spec.proto.runtime.v1.ListFileResp.prototype.setFileNameList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.ListFileResp} returns this + */ +proto.spec.proto.runtime.v1.ListFileResp.prototype.addFileName = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.ListFileResp} returns this + */ +proto.spec.proto.runtime.v1.ListFileResp.prototype.clearFileNameList = function() { + return this.setFileNameList([]); +}; + + + + + +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.spec.proto.runtime.v1.DelFileRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.DelFileRequest.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.spec.proto.runtime.v1.DelFileRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.DelFileRequest.toObject = function(includeInstance, msg) { + var f, obj = { + request: (f = msg.getRequest()) && proto.spec.proto.runtime.v1.FileRequest.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.spec.proto.runtime.v1.DelFileRequest} + */ +proto.spec.proto.runtime.v1.DelFileRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.DelFileRequest; + return proto.spec.proto.runtime.v1.DelFileRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.DelFileRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.DelFileRequest} + */ +proto.spec.proto.runtime.v1.DelFileRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spec.proto.runtime.v1.FileRequest; + reader.readMessage(value,proto.spec.proto.runtime.v1.FileRequest.deserializeBinaryFromReader); + msg.setRequest(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.DelFileRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.DelFileRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.DelFileRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.DelFileRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.spec.proto.runtime.v1.FileRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional FileRequest request = 1; + * @return {?proto.spec.proto.runtime.v1.FileRequest} + */ +proto.spec.proto.runtime.v1.DelFileRequest.prototype.getRequest = function() { + return /** @type{?proto.spec.proto.runtime.v1.FileRequest} */ ( + jspb.Message.getWrapperField(this, proto.spec.proto.runtime.v1.FileRequest, 1)); +}; + + +/** + * @param {?proto.spec.proto.runtime.v1.FileRequest|undefined} value + * @return {!proto.spec.proto.runtime.v1.DelFileRequest} returns this +*/ +proto.spec.proto.runtime.v1.DelFileRequest.prototype.setRequest = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.DelFileRequest} returns this + */ +proto.spec.proto.runtime.v1.DelFileRequest.prototype.clearRequest = function() { + return this.setRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.DelFileRequest.prototype.hasRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.GetNextIdRequest.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.spec.proto.runtime.v1.GetNextIdRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, ""), + options: (f = msg.getOptions()) && proto.spec.proto.runtime.v1.SequencerOptions.toObject(includeInstance, f), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.GetNextIdRequest} + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.GetNextIdRequest; + return proto.spec.proto.runtime.v1.GetNextIdRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.GetNextIdRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.GetNextIdRequest} + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 3: + var value = new proto.spec.proto.runtime.v1.SequencerOptions; + reader.readMessage(value,proto.spec.proto.runtime.v1.SequencerOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 4: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.GetNextIdRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.GetNextIdRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.spec.proto.runtime.v1.SequencerOptions.serializeBinaryToWriter + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetNextIdRequest} returns this + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetNextIdRequest} returns this + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional SequencerOptions options = 3; + * @return {?proto.spec.proto.runtime.v1.SequencerOptions} + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.getOptions = function() { + return /** @type{?proto.spec.proto.runtime.v1.SequencerOptions} */ ( + jspb.Message.getWrapperField(this, proto.spec.proto.runtime.v1.SequencerOptions, 3)); +}; + + +/** + * @param {?proto.spec.proto.runtime.v1.SequencerOptions|undefined} value + * @return {!proto.spec.proto.runtime.v1.GetNextIdRequest} returns this +*/ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.GetNextIdRequest} returns this + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * map metadata = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.GetNextIdRequest} returns this + */ +proto.spec.proto.runtime.v1.GetNextIdRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().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.spec.proto.runtime.v1.SequencerOptions.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.SequencerOptions.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.spec.proto.runtime.v1.SequencerOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SequencerOptions.toObject = function(includeInstance, msg) { + var f, obj = { + increment: 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.spec.proto.runtime.v1.SequencerOptions} + */ +proto.spec.proto.runtime.v1.SequencerOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.SequencerOptions; + return proto.spec.proto.runtime.v1.SequencerOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.SequencerOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.SequencerOptions} + */ +proto.spec.proto.runtime.v1.SequencerOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.spec.proto.runtime.v1.SequencerOptions.AutoIncrement} */ (reader.readEnum()); + msg.setIncrement(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.SequencerOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.SequencerOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.SequencerOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SequencerOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncrement(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.spec.proto.runtime.v1.SequencerOptions.AutoIncrement = { + WEAK: 0, + STRONG: 1 +}; + +/** + * optional AutoIncrement increment = 1; + * @return {!proto.spec.proto.runtime.v1.SequencerOptions.AutoIncrement} + */ +proto.spec.proto.runtime.v1.SequencerOptions.prototype.getIncrement = function() { + return /** @type {!proto.spec.proto.runtime.v1.SequencerOptions.AutoIncrement} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.SequencerOptions.AutoIncrement} value + * @return {!proto.spec.proto.runtime.v1.SequencerOptions} returns this + */ +proto.spec.proto.runtime.v1.SequencerOptions.prototype.setIncrement = function(value) { + return jspb.Message.setProto3EnumField(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.spec.proto.runtime.v1.GetNextIdResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.GetNextIdResponse.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.spec.proto.runtime.v1.GetNextIdResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetNextIdResponse.toObject = function(includeInstance, msg) { + var f, obj = { + nextId: 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.spec.proto.runtime.v1.GetNextIdResponse} + */ +proto.spec.proto.runtime.v1.GetNextIdResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.GetNextIdResponse; + return proto.spec.proto.runtime.v1.GetNextIdResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.GetNextIdResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.GetNextIdResponse} + */ +proto.spec.proto.runtime.v1.GetNextIdResponse.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.setNextId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetNextIdResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.GetNextIdResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.GetNextIdResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetNextIdResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNextId(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 next_id = 1; + * @return {number} + */ +proto.spec.proto.runtime.v1.GetNextIdResponse.prototype.getNextId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.spec.proto.runtime.v1.GetNextIdResponse} returns this + */ +proto.spec.proto.runtime.v1.GetNextIdResponse.prototype.setNextId = 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.spec.proto.runtime.v1.TryLockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.TryLockRequest.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.spec.proto.runtime.v1.TryLockRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TryLockRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + resourceId: jspb.Message.getFieldWithDefault(msg, 2, ""), + lockOwner: jspb.Message.getFieldWithDefault(msg, 3, ""), + expire: jspb.Message.getFieldWithDefault(msg, 4, 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.spec.proto.runtime.v1.TryLockRequest} + */ +proto.spec.proto.runtime.v1.TryLockRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.TryLockRequest; + return proto.spec.proto.runtime.v1.TryLockRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.TryLockRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.TryLockRequest} + */ +proto.spec.proto.runtime.v1.TryLockRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLockOwner(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setExpire(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.TryLockRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.TryLockRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.TryLockRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TryLockRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getResourceId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLockOwner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getExpire(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.TryLockRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TryLockRequest} returns this + */ +proto.spec.proto.runtime.v1.TryLockRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string resource_id = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.TryLockRequest.prototype.getResourceId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TryLockRequest} returns this + */ +proto.spec.proto.runtime.v1.TryLockRequest.prototype.setResourceId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string lock_owner = 3; + * @return {string} + */ +proto.spec.proto.runtime.v1.TryLockRequest.prototype.getLockOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TryLockRequest} returns this + */ +proto.spec.proto.runtime.v1.TryLockRequest.prototype.setLockOwner = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 expire = 4; + * @return {number} + */ +proto.spec.proto.runtime.v1.TryLockRequest.prototype.getExpire = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.spec.proto.runtime.v1.TryLockRequest} returns this + */ +proto.spec.proto.runtime.v1.TryLockRequest.prototype.setExpire = function(value) { + return jspb.Message.setProto3IntField(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.spec.proto.runtime.v1.TryLockResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.TryLockResponse.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.spec.proto.runtime.v1.TryLockResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TryLockResponse.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.spec.proto.runtime.v1.TryLockResponse} + */ +proto.spec.proto.runtime.v1.TryLockResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.TryLockResponse; + return proto.spec.proto.runtime.v1.TryLockResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.TryLockResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.TryLockResponse} + */ +proto.spec.proto.runtime.v1.TryLockResponse.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.spec.proto.runtime.v1.TryLockResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.TryLockResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.TryLockResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TryLockResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.spec.proto.runtime.v1.TryLockResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.spec.proto.runtime.v1.TryLockResponse} returns this + */ +proto.spec.proto.runtime.v1.TryLockResponse.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.spec.proto.runtime.v1.UnlockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.UnlockRequest.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.spec.proto.runtime.v1.UnlockRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.UnlockRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + resourceId: jspb.Message.getFieldWithDefault(msg, 2, ""), + lockOwner: 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.spec.proto.runtime.v1.UnlockRequest} + */ +proto.spec.proto.runtime.v1.UnlockRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.UnlockRequest; + return proto.spec.proto.runtime.v1.UnlockRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.UnlockRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.UnlockRequest} + */ +proto.spec.proto.runtime.v1.UnlockRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLockOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.UnlockRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.UnlockRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.UnlockRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.UnlockRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getResourceId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLockOwner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.UnlockRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.UnlockRequest} returns this + */ +proto.spec.proto.runtime.v1.UnlockRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string resource_id = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.UnlockRequest.prototype.getResourceId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.UnlockRequest} returns this + */ +proto.spec.proto.runtime.v1.UnlockRequest.prototype.setResourceId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string lock_owner = 3; + * @return {string} + */ +proto.spec.proto.runtime.v1.UnlockRequest.prototype.getLockOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.UnlockRequest} returns this + */ +proto.spec.proto.runtime.v1.UnlockRequest.prototype.setLockOwner = 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.spec.proto.runtime.v1.UnlockResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.UnlockResponse.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.spec.proto.runtime.v1.UnlockResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.UnlockResponse.toObject = function(includeInstance, msg) { + var f, obj = { + status: 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.spec.proto.runtime.v1.UnlockResponse} + */ +proto.spec.proto.runtime.v1.UnlockResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.UnlockResponse; + return proto.spec.proto.runtime.v1.UnlockResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.UnlockResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.UnlockResponse} + */ +proto.spec.proto.runtime.v1.UnlockResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.spec.proto.runtime.v1.UnlockResponse.Status} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.UnlockResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.UnlockResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.UnlockResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.UnlockResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.spec.proto.runtime.v1.UnlockResponse.Status = { + SUCCESS: 0, + LOCK_UNEXIST: 1, + LOCK_BELONG_TO_OTHERS: 2, + INTERNAL_ERROR: 3 +}; + +/** + * optional Status status = 1; + * @return {!proto.spec.proto.runtime.v1.UnlockResponse.Status} + */ +proto.spec.proto.runtime.v1.UnlockResponse.prototype.getStatus = function() { + return /** @type {!proto.spec.proto.runtime.v1.UnlockResponse.Status} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.UnlockResponse.Status} value + * @return {!proto.spec.proto.runtime.v1.UnlockResponse} returns this + */ +proto.spec.proto.runtime.v1.UnlockResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(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.spec.proto.runtime.v1.SayHelloRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.SayHelloRequest.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.spec.proto.runtime.v1.SayHelloRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SayHelloRequest.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: (f = msg.getData()) && google_protobuf_any_pb.Any.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.spec.proto.runtime.v1.SayHelloRequest} + */ +proto.spec.proto.runtime.v1.SayHelloRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.SayHelloRequest; + return proto.spec.proto.runtime.v1.SayHelloRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.SayHelloRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.SayHelloRequest} + */ +proto.spec.proto.runtime.v1.SayHelloRequest.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.SayHelloRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.SayHelloRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.SayHelloRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SayHelloRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.SayHelloRequest.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SayHelloRequest} returns this + */ +proto.spec.proto.runtime.v1.SayHelloRequest.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.SayHelloRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SayHelloRequest} returns this + */ +proto.spec.proto.runtime.v1.SayHelloRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Any data = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.spec.proto.runtime.v1.SayHelloRequest.prototype.getData = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.spec.proto.runtime.v1.SayHelloRequest} returns this +*/ +proto.spec.proto.runtime.v1.SayHelloRequest.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.SayHelloRequest} returns this + */ +proto.spec.proto.runtime.v1.SayHelloRequest.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.SayHelloRequest.prototype.hasData = 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.spec.proto.runtime.v1.SayHelloResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.SayHelloResponse.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.spec.proto.runtime.v1.SayHelloResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SayHelloResponse.toObject = function(includeInstance, msg) { + var f, obj = { + hello: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: (f = msg.getData()) && google_protobuf_any_pb.Any.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.spec.proto.runtime.v1.SayHelloResponse} + */ +proto.spec.proto.runtime.v1.SayHelloResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.SayHelloResponse; + return proto.spec.proto.runtime.v1.SayHelloResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.SayHelloResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.SayHelloResponse} + */ +proto.spec.proto.runtime.v1.SayHelloResponse.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.setHello(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.SayHelloResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.SayHelloResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.SayHelloResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SayHelloResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHello(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string hello = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.SayHelloResponse.prototype.getHello = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SayHelloResponse} returns this + */ +proto.spec.proto.runtime.v1.SayHelloResponse.prototype.setHello = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any data = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.spec.proto.runtime.v1.SayHelloResponse.prototype.getData = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.spec.proto.runtime.v1.SayHelloResponse} returns this +*/ +proto.spec.proto.runtime.v1.SayHelloResponse.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.SayHelloResponse} returns this + */ +proto.spec.proto.runtime.v1.SayHelloResponse.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.SayHelloResponse.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.spec.proto.runtime.v1.InvokeServiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.InvokeServiceRequest.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.spec.proto.runtime.v1.InvokeServiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.InvokeServiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + message: (f = msg.getMessage()) && proto.spec.proto.runtime.v1.CommonInvokeRequest.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.spec.proto.runtime.v1.InvokeServiceRequest} + */ +proto.spec.proto.runtime.v1.InvokeServiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.InvokeServiceRequest; + return proto.spec.proto.runtime.v1.InvokeServiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.InvokeServiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.InvokeServiceRequest} + */ +proto.spec.proto.runtime.v1.InvokeServiceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 3: + var value = new proto.spec.proto.runtime.v1.CommonInvokeRequest; + reader.readMessage(value,proto.spec.proto.runtime.v1.CommonInvokeRequest.deserializeBinaryFromReader); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.InvokeServiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.InvokeServiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.InvokeServiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.InvokeServiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMessage(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.spec.proto.runtime.v1.CommonInvokeRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.InvokeServiceRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.InvokeServiceRequest} returns this + */ +proto.spec.proto.runtime.v1.InvokeServiceRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional CommonInvokeRequest message = 3; + * @return {?proto.spec.proto.runtime.v1.CommonInvokeRequest} + */ +proto.spec.proto.runtime.v1.InvokeServiceRequest.prototype.getMessage = function() { + return /** @type{?proto.spec.proto.runtime.v1.CommonInvokeRequest} */ ( + jspb.Message.getWrapperField(this, proto.spec.proto.runtime.v1.CommonInvokeRequest, 3)); +}; + + +/** + * @param {?proto.spec.proto.runtime.v1.CommonInvokeRequest|undefined} value + * @return {!proto.spec.proto.runtime.v1.InvokeServiceRequest} returns this +*/ +proto.spec.proto.runtime.v1.InvokeServiceRequest.prototype.setMessage = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.InvokeServiceRequest} returns this + */ +proto.spec.proto.runtime.v1.InvokeServiceRequest.prototype.clearMessage = function() { + return this.setMessage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.InvokeServiceRequest.prototype.hasMessage = 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.spec.proto.runtime.v1.CommonInvokeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.CommonInvokeRequest.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.spec.proto.runtime.v1.CommonInvokeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + method: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: (f = msg.getData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + contentType: jspb.Message.getFieldWithDefault(msg, 3, ""), + httpExtension: (f = msg.getHttpExtension()) && proto.spec.proto.runtime.v1.HTTPExtension.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.spec.proto.runtime.v1.CommonInvokeRequest} + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.CommonInvokeRequest; + return proto.spec.proto.runtime.v1.CommonInvokeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.CommonInvokeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.CommonInvokeRequest} + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.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.setMethod(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + case 4: + var value = new proto.spec.proto.runtime.v1.HTTPExtension; + reader.readMessage(value,proto.spec.proto.runtime.v1.HTTPExtension.deserializeBinaryFromReader); + msg.setHttpExtension(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.CommonInvokeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.CommonInvokeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getHttpExtension(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.spec.proto.runtime.v1.HTTPExtension.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string method = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.getMethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.CommonInvokeRequest} returns this + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any data = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.getData = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.spec.proto.runtime.v1.CommonInvokeRequest} returns this +*/ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.CommonInvokeRequest} returns this + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.hasData = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string content_type = 3; + * @return {string} + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.CommonInvokeRequest} returns this + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional HTTPExtension http_extension = 4; + * @return {?proto.spec.proto.runtime.v1.HTTPExtension} + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.getHttpExtension = function() { + return /** @type{?proto.spec.proto.runtime.v1.HTTPExtension} */ ( + jspb.Message.getWrapperField(this, proto.spec.proto.runtime.v1.HTTPExtension, 4)); +}; + + +/** + * @param {?proto.spec.proto.runtime.v1.HTTPExtension|undefined} value + * @return {!proto.spec.proto.runtime.v1.CommonInvokeRequest} returns this +*/ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.setHttpExtension = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.CommonInvokeRequest} returns this + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.clearHttpExtension = function() { + return this.setHttpExtension(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.CommonInvokeRequest.prototype.hasHttpExtension = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.spec.proto.runtime.v1.HTTPExtension.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.HTTPExtension.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.spec.proto.runtime.v1.HTTPExtension} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.HTTPExtension.toObject = function(includeInstance, msg) { + var f, obj = { + verb: jspb.Message.getFieldWithDefault(msg, 1, 0), + querystring: 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.spec.proto.runtime.v1.HTTPExtension} + */ +proto.spec.proto.runtime.v1.HTTPExtension.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.HTTPExtension; + return proto.spec.proto.runtime.v1.HTTPExtension.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.HTTPExtension} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.HTTPExtension} + */ +proto.spec.proto.runtime.v1.HTTPExtension.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.spec.proto.runtime.v1.HTTPExtension.Verb} */ (reader.readEnum()); + msg.setVerb(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setQuerystring(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.HTTPExtension.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.HTTPExtension.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.HTTPExtension} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.HTTPExtension.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVerb(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getQuerystring(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.spec.proto.runtime.v1.HTTPExtension.Verb = { + NONE: 0, + GET: 1, + HEAD: 2, + POST: 3, + PUT: 4, + DELETE: 5, + CONNECT: 6, + OPTIONS: 7, + TRACE: 8 +}; + +/** + * optional Verb verb = 1; + * @return {!proto.spec.proto.runtime.v1.HTTPExtension.Verb} + */ +proto.spec.proto.runtime.v1.HTTPExtension.prototype.getVerb = function() { + return /** @type {!proto.spec.proto.runtime.v1.HTTPExtension.Verb} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.HTTPExtension.Verb} value + * @return {!proto.spec.proto.runtime.v1.HTTPExtension} returns this + */ +proto.spec.proto.runtime.v1.HTTPExtension.prototype.setVerb = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string querystring = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.HTTPExtension.prototype.getQuerystring = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.HTTPExtension} returns this + */ +proto.spec.proto.runtime.v1.HTTPExtension.prototype.setQuerystring = 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.spec.proto.runtime.v1.InvokeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.InvokeResponse.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.spec.proto.runtime.v1.InvokeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.InvokeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + data: (f = msg.getData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + contentType: 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.spec.proto.runtime.v1.InvokeResponse} + */ +proto.spec.proto.runtime.v1.InvokeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.InvokeResponse; + return proto.spec.proto.runtime.v1.InvokeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.InvokeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.InvokeResponse} + */ +proto.spec.proto.runtime.v1.InvokeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.InvokeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.InvokeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.InvokeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.InvokeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional google.protobuf.Any data = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.spec.proto.runtime.v1.InvokeResponse.prototype.getData = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.spec.proto.runtime.v1.InvokeResponse} returns this +*/ +proto.spec.proto.runtime.v1.InvokeResponse.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.InvokeResponse} returns this + */ +proto.spec.proto.runtime.v1.InvokeResponse.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.InvokeResponse.prototype.hasData = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string content_type = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.InvokeResponse.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.InvokeResponse} returns this + */ +proto.spec.proto.runtime.v1.InvokeResponse.prototype.setContentType = 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.spec.proto.runtime.v1.ConfigurationItem.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.ConfigurationItem.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.spec.proto.runtime.v1.ConfigurationItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.ConfigurationItem.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + content: jspb.Message.getFieldWithDefault(msg, 2, ""), + group: jspb.Message.getFieldWithDefault(msg, 3, ""), + label: jspb.Message.getFieldWithDefault(msg, 4, ""), + tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [], + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} + */ +proto.spec.proto.runtime.v1.ConfigurationItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.ConfigurationItem; + return proto.spec.proto.runtime.v1.ConfigurationItem.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.ConfigurationItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} + */ +proto.spec.proto.runtime.v1.ConfigurationItem.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.setKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setContent(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setGroup(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 5: + var value = msg.getTagsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 6: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.ConfigurationItem.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.ConfigurationItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.ConfigurationItem.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getContent(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getGroup(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} returns this + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string content = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.getContent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} returns this + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.setContent = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string group = 3; + * @return {string} + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.getGroup = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} returns this + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.setGroup = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string label = 4; + * @return {string} + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} returns this + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * map tags = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.getTagsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} returns this + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.clearTagsMap = function() { + this.getTagsMap().clear(); + return this;}; + + +/** + * map metadata = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} returns this + */ +proto.spec.proto.runtime.v1.ConfigurationItem.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.repeatedFields_ = [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.spec.proto.runtime.v1.GetConfigurationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.GetConfigurationRequest.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.spec.proto.runtime.v1.GetConfigurationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + appId: jspb.Message.getFieldWithDefault(msg, 2, ""), + group: jspb.Message.getFieldWithDefault(msg, 3, ""), + label: jspb.Message.getFieldWithDefault(msg, 4, ""), + keysList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + subscribeUpdate: jspb.Message.getBooleanFieldWithDefault(msg, 7, 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.spec.proto.runtime.v1.GetConfigurationRequest} + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.GetConfigurationRequest; + return proto.spec.proto.runtime.v1.GetConfigurationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.GetConfigurationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.GetConfigurationRequest} + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAppId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setGroup(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addKeys(value); + break; + case 6: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSubscribeUpdate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.GetConfigurationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.GetConfigurationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAppId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getGroup(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getKeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getSubscribeUpdate(); + if (f) { + writer.writeBool( + 7, + f + ); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string app_id = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.getAppId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.setAppId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string group = 3; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.getGroup = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.setGroup = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string label = 4; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated string keys = 5; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.getKeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.GetConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.setKeysList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.GetConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.addKeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.GetConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.clearKeysList = function() { + return this.setKeysList([]); +}; + + +/** + * map metadata = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.GetConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + +/** + * optional bool subscribe_update = 7; + * @return {boolean} + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.getSubscribeUpdate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.spec.proto.runtime.v1.GetConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.GetConfigurationRequest.prototype.setSubscribeUpdate = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.GetConfigurationResponse.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.spec.proto.runtime.v1.GetConfigurationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.GetConfigurationResponse.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.spec.proto.runtime.v1.GetConfigurationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetConfigurationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + itemsList: jspb.Message.toObjectList(msg.getItemsList(), + proto.spec.proto.runtime.v1.ConfigurationItem.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.spec.proto.runtime.v1.GetConfigurationResponse} + */ +proto.spec.proto.runtime.v1.GetConfigurationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.GetConfigurationResponse; + return proto.spec.proto.runtime.v1.GetConfigurationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.GetConfigurationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.GetConfigurationResponse} + */ +proto.spec.proto.runtime.v1.GetConfigurationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spec.proto.runtime.v1.ConfigurationItem; + reader.readMessage(value,proto.spec.proto.runtime.v1.ConfigurationItem.deserializeBinaryFromReader); + msg.addItems(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetConfigurationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.GetConfigurationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.GetConfigurationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetConfigurationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.spec.proto.runtime.v1.ConfigurationItem.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ConfigurationItem items = 1; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.GetConfigurationResponse.prototype.getItemsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spec.proto.runtime.v1.ConfigurationItem, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.GetConfigurationResponse} returns this +*/ +proto.spec.proto.runtime.v1.GetConfigurationResponse.prototype.setItemsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.ConfigurationItem=} opt_value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} + */ +proto.spec.proto.runtime.v1.GetConfigurationResponse.prototype.addItems = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spec.proto.runtime.v1.ConfigurationItem, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.GetConfigurationResponse} returns this + */ +proto.spec.proto.runtime.v1.GetConfigurationResponse.prototype.clearItemsList = function() { + return this.setItemsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.repeatedFields_ = [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.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.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.spec.proto.runtime.v1.SubscribeConfigurationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + appId: jspb.Message.getFieldWithDefault(msg, 2, ""), + group: jspb.Message.getFieldWithDefault(msg, 3, ""), + label: jspb.Message.getFieldWithDefault(msg, 4, ""), + keysList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.SubscribeConfigurationRequest; + return proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAppId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setGroup(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addKeys(value); + break; + case 6: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAppId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getGroup(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getKeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string app_id = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.getAppId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.setAppId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string group = 3; + * @return {string} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.getGroup = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.setGroup = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string label = 4; + * @return {string} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated string keys = 5; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.getKeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.setKeysList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.addKeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.clearKeysList = function() { + return this.setKeysList([]); +}; + + +/** + * map metadata = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.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.spec.proto.runtime.v1.SubscribeConfigurationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.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.spec.proto.runtime.v1.SubscribeConfigurationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + appId: jspb.Message.getFieldWithDefault(msg, 2, ""), + itemsList: jspb.Message.toObjectList(msg.getItemsList(), + proto.spec.proto.runtime.v1.ConfigurationItem.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.spec.proto.runtime.v1.SubscribeConfigurationResponse} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.SubscribeConfigurationResponse; + return proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.SubscribeConfigurationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationResponse} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAppId(value); + break; + case 3: + var value = new proto.spec.proto.runtime.v1.ConfigurationItem; + reader.readMessage(value,proto.spec.proto.runtime.v1.ConfigurationItem.deserializeBinaryFromReader); + msg.addItems(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.SubscribeConfigurationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAppId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getItemsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.spec.proto.runtime.v1.ConfigurationItem.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationResponse} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string app_id = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.prototype.getAppId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationResponse} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.prototype.setAppId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated ConfigurationItem items = 3; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.prototype.getItemsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spec.proto.runtime.v1.ConfigurationItem, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationResponse} returns this +*/ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.prototype.setItemsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.ConfigurationItem=} opt_value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.prototype.addItems = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.spec.proto.runtime.v1.ConfigurationItem, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.SubscribeConfigurationResponse} returns this + */ +proto.spec.proto.runtime.v1.SubscribeConfigurationResponse.prototype.clearItemsList = function() { + return this.setItemsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.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.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.SaveConfigurationRequest.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.spec.proto.runtime.v1.SaveConfigurationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + appId: jspb.Message.getFieldWithDefault(msg, 2, ""), + itemsList: jspb.Message.toObjectList(msg.getItemsList(), + proto.spec.proto.runtime.v1.ConfigurationItem.toObject, includeInstance), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.SaveConfigurationRequest} + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.SaveConfigurationRequest; + return proto.spec.proto.runtime.v1.SaveConfigurationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.SaveConfigurationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.SaveConfigurationRequest} + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAppId(value); + break; + case 3: + var value = new proto.spec.proto.runtime.v1.ConfigurationItem; + reader.readMessage(value,proto.spec.proto.runtime.v1.ConfigurationItem.deserializeBinaryFromReader); + msg.addItems(value); + break; + case 4: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.SaveConfigurationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.SaveConfigurationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAppId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getItemsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.spec.proto.runtime.v1.ConfigurationItem.serializeBinaryToWriter + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SaveConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string app_id = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.getAppId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SaveConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.setAppId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated ConfigurationItem items = 3; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.getItemsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spec.proto.runtime.v1.ConfigurationItem, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.SaveConfigurationRequest} returns this +*/ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.setItemsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.ConfigurationItem=} opt_value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.ConfigurationItem} + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.addItems = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.spec.proto.runtime.v1.ConfigurationItem, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.SaveConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.clearItemsList = function() { + return this.setItemsList([]); +}; + + +/** + * map metadata = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.SaveConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.SaveConfigurationRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.repeatedFields_ = [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.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.DeleteConfigurationRequest.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.spec.proto.runtime.v1.DeleteConfigurationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + appId: jspb.Message.getFieldWithDefault(msg, 2, ""), + group: jspb.Message.getFieldWithDefault(msg, 3, ""), + label: jspb.Message.getFieldWithDefault(msg, 4, ""), + keysList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.DeleteConfigurationRequest; + return proto.spec.proto.runtime.v1.DeleteConfigurationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAppId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setGroup(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addKeys(value); + break; + case 6: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.DeleteConfigurationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAppId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getGroup(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getKeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string app_id = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.getAppId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.setAppId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string group = 3; + * @return {string} + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.getGroup = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.setGroup = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string label = 4; + * @return {string} + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated string keys = 5; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.getKeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.setKeysList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.addKeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.clearKeysList = function() { + return this.setKeysList([]); +}; + + +/** + * map metadata = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.DeleteConfigurationRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteConfigurationRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().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.spec.proto.runtime.v1.GetStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.GetStateRequest.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.spec.proto.runtime.v1.GetStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, ""), + consistency: jspb.Message.getFieldWithDefault(msg, 3, 0), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.GetStateRequest} + */ +proto.spec.proto.runtime.v1.GetStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.GetStateRequest; + return proto.spec.proto.runtime.v1.GetStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.GetStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.GetStateRequest} + */ +proto.spec.proto.runtime.v1.GetStateRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 3: + var value = /** @type {!proto.spec.proto.runtime.v1.StateOptions.StateConsistency} */ (reader.readEnum()); + msg.setConsistency(value); + break; + case 4: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.GetStateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.GetStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getConsistency(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetStateRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetStateRequest} returns this + */ +proto.spec.proto.runtime.v1.GetStateRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetStateRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetStateRequest} returns this + */ +proto.spec.proto.runtime.v1.GetStateRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional StateOptions.StateConsistency consistency = 3; + * @return {!proto.spec.proto.runtime.v1.StateOptions.StateConsistency} + */ +proto.spec.proto.runtime.v1.GetStateRequest.prototype.getConsistency = function() { + return /** @type {!proto.spec.proto.runtime.v1.StateOptions.StateConsistency} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.StateOptions.StateConsistency} value + * @return {!proto.spec.proto.runtime.v1.GetStateRequest} returns this + */ +proto.spec.proto.runtime.v1.GetStateRequest.prototype.setConsistency = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * map metadata = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.GetStateRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.GetStateRequest} returns this + */ +proto.spec.proto.runtime.v1.GetStateRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.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.spec.proto.runtime.v1.GetBulkStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.GetBulkStateRequest.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.spec.proto.runtime.v1.GetBulkStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + keysList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + parallelism: jspb.Message.getFieldWithDefault(msg, 3, 0), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.GetBulkStateRequest} + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.GetBulkStateRequest; + return proto.spec.proto.runtime.v1.GetBulkStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.GetBulkStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.GetBulkStateRequest} + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addKeys(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setParallelism(value); + break; + case 4: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.GetBulkStateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.GetBulkStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getParallelism(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetBulkStateRequest} returns this + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string keys = 2; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.getKeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.GetBulkStateRequest} returns this + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.setKeysList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.GetBulkStateRequest} returns this + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.addKeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.GetBulkStateRequest} returns this + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.clearKeysList = function() { + return this.setKeysList([]); +}; + + +/** + * optional int32 parallelism = 3; + * @return {number} + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.getParallelism = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.spec.proto.runtime.v1.GetBulkStateRequest} returns this + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.setParallelism = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * map metadata = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.GetBulkStateRequest} returns this + */ +proto.spec.proto.runtime.v1.GetBulkStateRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.GetBulkStateResponse.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.spec.proto.runtime.v1.GetBulkStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.GetBulkStateResponse.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.spec.proto.runtime.v1.GetBulkStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetBulkStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + itemsList: jspb.Message.toObjectList(msg.getItemsList(), + proto.spec.proto.runtime.v1.BulkStateItem.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.spec.proto.runtime.v1.GetBulkStateResponse} + */ +proto.spec.proto.runtime.v1.GetBulkStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.GetBulkStateResponse; + return proto.spec.proto.runtime.v1.GetBulkStateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.GetBulkStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.GetBulkStateResponse} + */ +proto.spec.proto.runtime.v1.GetBulkStateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.spec.proto.runtime.v1.BulkStateItem; + reader.readMessage(value,proto.spec.proto.runtime.v1.BulkStateItem.deserializeBinaryFromReader); + msg.addItems(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetBulkStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.GetBulkStateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.GetBulkStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetBulkStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.spec.proto.runtime.v1.BulkStateItem.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated BulkStateItem items = 1; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.GetBulkStateResponse.prototype.getItemsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spec.proto.runtime.v1.BulkStateItem, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.GetBulkStateResponse} returns this +*/ +proto.spec.proto.runtime.v1.GetBulkStateResponse.prototype.setItemsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.BulkStateItem=} opt_value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.BulkStateItem} + */ +proto.spec.proto.runtime.v1.GetBulkStateResponse.prototype.addItems = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spec.proto.runtime.v1.BulkStateItem, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.GetBulkStateResponse} returns this + */ +proto.spec.proto.runtime.v1.GetBulkStateResponse.prototype.clearItemsList = function() { + return this.setItemsList([]); +}; + + + + + +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.spec.proto.runtime.v1.BulkStateItem.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.BulkStateItem.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.spec.proto.runtime.v1.BulkStateItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.BulkStateItem.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: msg.getData_asB64(), + etag: jspb.Message.getFieldWithDefault(msg, 3, ""), + error: jspb.Message.getFieldWithDefault(msg, 4, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.BulkStateItem} + */ +proto.spec.proto.runtime.v1.BulkStateItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.BulkStateItem; + return proto.spec.proto.runtime.v1.BulkStateItem.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.BulkStateItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.BulkStateItem} + */ +proto.spec.proto.runtime.v1.BulkStateItem.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.setKey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setEtag(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; + case 5: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.BulkStateItem.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.BulkStateItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.BulkStateItem.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getEtag(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.BulkStateItem} returns this + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.proto.runtime.v1.BulkStateItem} returns this + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string etag = 3; + * @return {string} + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.getEtag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.BulkStateItem} returns this + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.setEtag = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string error = 4; + * @return {string} + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.BulkStateItem} returns this + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * map metadata = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.BulkStateItem} returns this + */ +proto.spec.proto.runtime.v1.BulkStateItem.prototype.clearMetadataMap = function() { + this.getMetadataMap().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.spec.proto.runtime.v1.GetStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.GetStateResponse.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.spec.proto.runtime.v1.GetStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + etag: jspb.Message.getFieldWithDefault(msg, 2, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.GetStateResponse} + */ +proto.spec.proto.runtime.v1.GetStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.GetStateResponse; + return proto.spec.proto.runtime.v1.GetStateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.GetStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.GetStateResponse} + */ +proto.spec.proto.runtime.v1.GetStateResponse.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.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setEtag(value); + break; + case 3: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.GetStateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.GetStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.GetStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getEtag(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.spec.proto.runtime.v1.GetStateResponse.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.spec.proto.runtime.v1.GetStateResponse.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.GetStateResponse.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.proto.runtime.v1.GetStateResponse} returns this + */ +proto.spec.proto.runtime.v1.GetStateResponse.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string etag = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.GetStateResponse.prototype.getEtag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.GetStateResponse} returns this + */ +proto.spec.proto.runtime.v1.GetStateResponse.prototype.setEtag = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * map metadata = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.GetStateResponse.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.GetStateResponse} returns this + */ +proto.spec.proto.runtime.v1.GetStateResponse.prototype.clearMetadataMap = function() { + this.getMetadataMap().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.spec.proto.runtime.v1.DeleteStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.DeleteStateRequest.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.spec.proto.runtime.v1.DeleteStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, ""), + etag: (f = msg.getEtag()) && proto.spec.proto.runtime.v1.Etag.toObject(includeInstance, f), + options: (f = msg.getOptions()) && proto.spec.proto.runtime.v1.StateOptions.toObject(includeInstance, f), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.DeleteStateRequest} + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.DeleteStateRequest; + return proto.spec.proto.runtime.v1.DeleteStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.DeleteStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.DeleteStateRequest} + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.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.setStoreName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 3: + var value = new proto.spec.proto.runtime.v1.Etag; + reader.readMessage(value,proto.spec.proto.runtime.v1.Etag.deserializeBinaryFromReader); + msg.setEtag(value); + break; + case 4: + var value = new proto.spec.proto.runtime.v1.StateOptions; + reader.readMessage(value,proto.spec.proto.runtime.v1.StateOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 5: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.DeleteStateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.DeleteStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEtag(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.spec.proto.runtime.v1.Etag.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.spec.proto.runtime.v1.StateOptions.serializeBinaryToWriter + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.DeleteStateRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.DeleteStateRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Etag etag = 3; + * @return {?proto.spec.proto.runtime.v1.Etag} + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.getEtag = function() { + return /** @type{?proto.spec.proto.runtime.v1.Etag} */ ( + jspb.Message.getWrapperField(this, proto.spec.proto.runtime.v1.Etag, 3)); +}; + + +/** + * @param {?proto.spec.proto.runtime.v1.Etag|undefined} value + * @return {!proto.spec.proto.runtime.v1.DeleteStateRequest} returns this +*/ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.setEtag = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.DeleteStateRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.clearEtag = function() { + return this.setEtag(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.hasEtag = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional StateOptions options = 4; + * @return {?proto.spec.proto.runtime.v1.StateOptions} + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.getOptions = function() { + return /** @type{?proto.spec.proto.runtime.v1.StateOptions} */ ( + jspb.Message.getWrapperField(this, proto.spec.proto.runtime.v1.StateOptions, 4)); +}; + + +/** + * @param {?proto.spec.proto.runtime.v1.StateOptions|undefined} value + * @return {!proto.spec.proto.runtime.v1.DeleteStateRequest} returns this +*/ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.DeleteStateRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.hasOptions = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * map metadata = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.DeleteStateRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteStateRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.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.spec.proto.runtime.v1.DeleteBulkStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.DeleteBulkStateRequest.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.spec.proto.runtime.v1.DeleteBulkStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + statesList: jspb.Message.toObjectList(msg.getStatesList(), + proto.spec.proto.runtime.v1.StateItem.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.spec.proto.runtime.v1.DeleteBulkStateRequest} + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.DeleteBulkStateRequest; + return proto.spec.proto.runtime.v1.DeleteBulkStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.DeleteBulkStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.DeleteBulkStateRequest} + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.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.setStoreName(value); + break; + case 2: + var value = new proto.spec.proto.runtime.v1.StateItem; + reader.readMessage(value,proto.spec.proto.runtime.v1.StateItem.deserializeBinaryFromReader); + msg.addStates(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.DeleteBulkStateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.DeleteBulkStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.spec.proto.runtime.v1.StateItem.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.DeleteBulkStateRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated StateItem states = 2; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.prototype.getStatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spec.proto.runtime.v1.StateItem, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.DeleteBulkStateRequest} returns this +*/ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.prototype.setStatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.StateItem=} opt_value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.StateItem} + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.prototype.addStates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spec.proto.runtime.v1.StateItem, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.DeleteBulkStateRequest} returns this + */ +proto.spec.proto.runtime.v1.DeleteBulkStateRequest.prototype.clearStatesList = function() { + return this.setStatesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.SaveStateRequest.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.spec.proto.runtime.v1.SaveStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.SaveStateRequest.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.spec.proto.runtime.v1.SaveStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SaveStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + statesList: jspb.Message.toObjectList(msg.getStatesList(), + proto.spec.proto.runtime.v1.StateItem.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.spec.proto.runtime.v1.SaveStateRequest} + */ +proto.spec.proto.runtime.v1.SaveStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.SaveStateRequest; + return proto.spec.proto.runtime.v1.SaveStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.SaveStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.SaveStateRequest} + */ +proto.spec.proto.runtime.v1.SaveStateRequest.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.setStoreName(value); + break; + case 2: + var value = new proto.spec.proto.runtime.v1.StateItem; + reader.readMessage(value,proto.spec.proto.runtime.v1.StateItem.deserializeBinaryFromReader); + msg.addStates(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.SaveStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.SaveStateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.SaveStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.SaveStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoreName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.spec.proto.runtime.v1.StateItem.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string store_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.SaveStateRequest.prototype.getStoreName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.SaveStateRequest} returns this + */ +proto.spec.proto.runtime.v1.SaveStateRequest.prototype.setStoreName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated StateItem states = 2; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.SaveStateRequest.prototype.getStatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spec.proto.runtime.v1.StateItem, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.SaveStateRequest} returns this +*/ +proto.spec.proto.runtime.v1.SaveStateRequest.prototype.setStatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.StateItem=} opt_value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.StateItem} + */ +proto.spec.proto.runtime.v1.SaveStateRequest.prototype.addStates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spec.proto.runtime.v1.StateItem, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.SaveStateRequest} returns this + */ +proto.spec.proto.runtime.v1.SaveStateRequest.prototype.clearStatesList = function() { + return this.setStatesList([]); +}; + + + + + +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.spec.proto.runtime.v1.StateItem.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.StateItem.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.spec.proto.runtime.v1.StateItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.StateItem.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: msg.getValue_asB64(), + etag: (f = msg.getEtag()) && proto.spec.proto.runtime.v1.Etag.toObject(includeInstance, f), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + options: (f = msg.getOptions()) && proto.spec.proto.runtime.v1.StateOptions.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.spec.proto.runtime.v1.StateItem} + */ +proto.spec.proto.runtime.v1.StateItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.StateItem; + return proto.spec.proto.runtime.v1.StateItem.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.StateItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.StateItem} + */ +proto.spec.proto.runtime.v1.StateItem.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.setKey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + case 3: + var value = new proto.spec.proto.runtime.v1.Etag; + reader.readMessage(value,proto.spec.proto.runtime.v1.Etag.deserializeBinaryFromReader); + msg.setEtag(value); + break; + case 4: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 5: + var value = new proto.spec.proto.runtime.v1.StateOptions; + reader.readMessage(value,proto.spec.proto.runtime.v1.StateOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.StateItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.StateItem.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.StateItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.StateItem.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getEtag(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.spec.proto.runtime.v1.Etag.serializeBinaryToWriter + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.spec.proto.runtime.v1.StateOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.StateItem.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.StateItem} returns this + */ +proto.spec.proto.runtime.v1.StateItem.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.spec.proto.runtime.v1.StateItem.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.spec.proto.runtime.v1.StateItem.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.spec.proto.runtime.v1.StateItem.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.proto.runtime.v1.StateItem} returns this + */ +proto.spec.proto.runtime.v1.StateItem.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional Etag etag = 3; + * @return {?proto.spec.proto.runtime.v1.Etag} + */ +proto.spec.proto.runtime.v1.StateItem.prototype.getEtag = function() { + return /** @type{?proto.spec.proto.runtime.v1.Etag} */ ( + jspb.Message.getWrapperField(this, proto.spec.proto.runtime.v1.Etag, 3)); +}; + + +/** + * @param {?proto.spec.proto.runtime.v1.Etag|undefined} value + * @return {!proto.spec.proto.runtime.v1.StateItem} returns this +*/ +proto.spec.proto.runtime.v1.StateItem.prototype.setEtag = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.StateItem} returns this + */ +proto.spec.proto.runtime.v1.StateItem.prototype.clearEtag = function() { + return this.setEtag(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.StateItem.prototype.hasEtag = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * map metadata = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.StateItem.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.StateItem} returns this + */ +proto.spec.proto.runtime.v1.StateItem.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + +/** + * optional StateOptions options = 5; + * @return {?proto.spec.proto.runtime.v1.StateOptions} + */ +proto.spec.proto.runtime.v1.StateItem.prototype.getOptions = function() { + return /** @type{?proto.spec.proto.runtime.v1.StateOptions} */ ( + jspb.Message.getWrapperField(this, proto.spec.proto.runtime.v1.StateOptions, 5)); +}; + + +/** + * @param {?proto.spec.proto.runtime.v1.StateOptions|undefined} value + * @return {!proto.spec.proto.runtime.v1.StateItem} returns this +*/ +proto.spec.proto.runtime.v1.StateItem.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.StateItem} returns this + */ +proto.spec.proto.runtime.v1.StateItem.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.StateItem.prototype.hasOptions = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.spec.proto.runtime.v1.Etag.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.Etag.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.spec.proto.runtime.v1.Etag} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.Etag.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.spec.proto.runtime.v1.Etag} + */ +proto.spec.proto.runtime.v1.Etag.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.Etag; + return proto.spec.proto.runtime.v1.Etag.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.Etag} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.Etag} + */ +proto.spec.proto.runtime.v1.Etag.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.spec.proto.runtime.v1.Etag.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.Etag.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.Etag} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.Etag.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.spec.proto.runtime.v1.Etag.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.Etag} returns this + */ +proto.spec.proto.runtime.v1.Etag.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.spec.proto.runtime.v1.StateOptions.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.StateOptions.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.spec.proto.runtime.v1.StateOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.StateOptions.toObject = function(includeInstance, msg) { + var f, obj = { + concurrency: jspb.Message.getFieldWithDefault(msg, 1, 0), + consistency: 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.spec.proto.runtime.v1.StateOptions} + */ +proto.spec.proto.runtime.v1.StateOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.StateOptions; + return proto.spec.proto.runtime.v1.StateOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.StateOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.StateOptions} + */ +proto.spec.proto.runtime.v1.StateOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.spec.proto.runtime.v1.StateOptions.StateConcurrency} */ (reader.readEnum()); + msg.setConcurrency(value); + break; + case 2: + var value = /** @type {!proto.spec.proto.runtime.v1.StateOptions.StateConsistency} */ (reader.readEnum()); + msg.setConsistency(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.StateOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.StateOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.StateOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.StateOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConcurrency(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getConsistency(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.spec.proto.runtime.v1.StateOptions.StateConcurrency = { + CONCURRENCY_UNSPECIFIED: 0, + CONCURRENCY_FIRST_WRITE: 1, + CONCURRENCY_LAST_WRITE: 2 +}; + +/** + * @enum {number} + */ +proto.spec.proto.runtime.v1.StateOptions.StateConsistency = { + CONSISTENCY_UNSPECIFIED: 0, + CONSISTENCY_EVENTUAL: 1, + CONSISTENCY_STRONG: 2 +}; + +/** + * optional StateConcurrency concurrency = 1; + * @return {!proto.spec.proto.runtime.v1.StateOptions.StateConcurrency} + */ +proto.spec.proto.runtime.v1.StateOptions.prototype.getConcurrency = function() { + return /** @type {!proto.spec.proto.runtime.v1.StateOptions.StateConcurrency} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.StateOptions.StateConcurrency} value + * @return {!proto.spec.proto.runtime.v1.StateOptions} returns this + */ +proto.spec.proto.runtime.v1.StateOptions.prototype.setConcurrency = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional StateConsistency consistency = 2; + * @return {!proto.spec.proto.runtime.v1.StateOptions.StateConsistency} + */ +proto.spec.proto.runtime.v1.StateOptions.prototype.getConsistency = function() { + return /** @type {!proto.spec.proto.runtime.v1.StateOptions.StateConsistency} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.StateOptions.StateConsistency} value + * @return {!proto.spec.proto.runtime.v1.StateOptions} returns this + */ +proto.spec.proto.runtime.v1.StateOptions.prototype.setConsistency = function(value) { + return jspb.Message.setProto3EnumField(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.spec.proto.runtime.v1.TransactionalStateOperation.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.TransactionalStateOperation.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.spec.proto.runtime.v1.TransactionalStateOperation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TransactionalStateOperation.toObject = function(includeInstance, msg) { + var f, obj = { + operationtype: jspb.Message.getFieldWithDefault(msg, 1, ""), + request: (f = msg.getRequest()) && proto.spec.proto.runtime.v1.StateItem.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.spec.proto.runtime.v1.TransactionalStateOperation} + */ +proto.spec.proto.runtime.v1.TransactionalStateOperation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.TransactionalStateOperation; + return proto.spec.proto.runtime.v1.TransactionalStateOperation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.TransactionalStateOperation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.TransactionalStateOperation} + */ +proto.spec.proto.runtime.v1.TransactionalStateOperation.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.setOperationtype(value); + break; + case 2: + var value = new proto.spec.proto.runtime.v1.StateItem; + reader.readMessage(value,proto.spec.proto.runtime.v1.StateItem.deserializeBinaryFromReader); + msg.setRequest(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.TransactionalStateOperation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.TransactionalStateOperation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.TransactionalStateOperation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.TransactionalStateOperation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOperationtype(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.spec.proto.runtime.v1.StateItem.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string operationType = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.TransactionalStateOperation.prototype.getOperationtype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.TransactionalStateOperation} returns this + */ +proto.spec.proto.runtime.v1.TransactionalStateOperation.prototype.setOperationtype = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional StateItem request = 2; + * @return {?proto.spec.proto.runtime.v1.StateItem} + */ +proto.spec.proto.runtime.v1.TransactionalStateOperation.prototype.getRequest = function() { + return /** @type{?proto.spec.proto.runtime.v1.StateItem} */ ( + jspb.Message.getWrapperField(this, proto.spec.proto.runtime.v1.StateItem, 2)); +}; + + +/** + * @param {?proto.spec.proto.runtime.v1.StateItem|undefined} value + * @return {!proto.spec.proto.runtime.v1.TransactionalStateOperation} returns this +*/ +proto.spec.proto.runtime.v1.TransactionalStateOperation.prototype.setRequest = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.spec.proto.runtime.v1.TransactionalStateOperation} returns this + */ +proto.spec.proto.runtime.v1.TransactionalStateOperation.prototype.clearRequest = function() { + return this.setRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.proto.runtime.v1.TransactionalStateOperation.prototype.hasRequest = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.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.spec.proto.runtime.v1.ExecuteStateTransactionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.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.spec.proto.runtime.v1.ExecuteStateTransactionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + storename: jspb.Message.getFieldWithDefault(msg, 1, ""), + operationsList: jspb.Message.toObjectList(msg.getOperationsList(), + proto.spec.proto.runtime.v1.TransactionalStateOperation.toObject, includeInstance), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest} + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest; + return proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest} + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.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.setStorename(value); + break; + case 2: + var value = new proto.spec.proto.runtime.v1.TransactionalStateOperation; + reader.readMessage(value,proto.spec.proto.runtime.v1.TransactionalStateOperation.deserializeBinaryFromReader); + msg.addOperations(value); + break; + case 3: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStorename(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOperationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.spec.proto.runtime.v1.TransactionalStateOperation.serializeBinaryToWriter + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string storeName = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.prototype.getStorename = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest} returns this + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.prototype.setStorename = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated TransactionalStateOperation operations = 2; + * @return {!Array} + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.prototype.getOperationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.spec.proto.runtime.v1.TransactionalStateOperation, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest} returns this +*/ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.prototype.setOperationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.spec.proto.runtime.v1.TransactionalStateOperation=} opt_value + * @param {number=} opt_index + * @return {!proto.spec.proto.runtime.v1.TransactionalStateOperation} + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.prototype.addOperations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spec.proto.runtime.v1.TransactionalStateOperation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest} returns this + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.prototype.clearOperationsList = function() { + return this.setOperationsList([]); +}; + + +/** + * map metadata = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest} returns this + */ +proto.spec.proto.runtime.v1.ExecuteStateTransactionRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().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.spec.proto.runtime.v1.PublishEventRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.PublishEventRequest.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.spec.proto.runtime.v1.PublishEventRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.PublishEventRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pubsubName: jspb.Message.getFieldWithDefault(msg, 1, ""), + topic: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: msg.getData_asB64(), + dataContentType: jspb.Message.getFieldWithDefault(msg, 4, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.PublishEventRequest} + */ +proto.spec.proto.runtime.v1.PublishEventRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.PublishEventRequest; + return proto.spec.proto.runtime.v1.PublishEventRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.PublishEventRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.PublishEventRequest} + */ +proto.spec.proto.runtime.v1.PublishEventRequest.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.setPubsubName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTopic(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDataContentType(value); + break; + case 5: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.PublishEventRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.PublishEventRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.PublishEventRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubsubName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTopic(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getDataContentType(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string pubsub_name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.getPubsubName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.PublishEventRequest} returns this + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.setPubsubName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string topic = 2; + * @return {string} + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.getTopic = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.PublishEventRequest} returns this + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.setTopic = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.proto.runtime.v1.PublishEventRequest} returns this + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string data_content_type = 4; + * @return {string} + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.getDataContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.PublishEventRequest} returns this + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.setDataContentType = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * map metadata = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.PublishEventRequest} returns this + */ +proto.spec.proto.runtime.v1.PublishEventRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().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.spec.proto.runtime.v1.InvokeBindingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.InvokeBindingRequest.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.spec.proto.runtime.v1.InvokeBindingRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: msg.getData_asB64(), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + operation: 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.spec.proto.runtime.v1.InvokeBindingRequest} + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.InvokeBindingRequest; + return proto.spec.proto.runtime.v1.InvokeBindingRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.InvokeBindingRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.InvokeBindingRequest} + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.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 {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOperation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.InvokeBindingRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.InvokeBindingRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getOperation(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.InvokeBindingRequest} returns this + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.proto.runtime.v1.InvokeBindingRequest} returns this + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * map metadata = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.InvokeBindingRequest} returns this + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + +/** + * optional string operation = 4; + * @return {string} + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.getOperation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.spec.proto.runtime.v1.InvokeBindingRequest} returns this + */ +proto.spec.proto.runtime.v1.InvokeBindingRequest.prototype.setOperation = 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.spec.proto.runtime.v1.InvokeBindingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.spec.proto.runtime.v1.InvokeBindingResponse.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.spec.proto.runtime.v1.InvokeBindingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.proto.runtime.v1.InvokeBindingResponse} + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.proto.runtime.v1.InvokeBindingResponse; + return proto.spec.proto.runtime.v1.InvokeBindingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.proto.runtime.v1.InvokeBindingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.proto.runtime.v1.InvokeBindingResponse} + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.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.setData(value); + break; + case 2: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.proto.runtime.v1.InvokeBindingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.proto.runtime.v1.InvokeBindingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.proto.runtime.v1.InvokeBindingResponse} returns this + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * map metadata = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.spec.proto.runtime.v1.InvokeBindingResponse} returns this + */ +proto.spec.proto.runtime.v1.InvokeBindingResponse.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + +goog.object.extend(exports, proto.spec.proto.runtime.v1); diff --git a/sdk/js-sdk/scripts/build-grpc.sh b/sdk/js-sdk/scripts/build-grpc.sh new file mode 100755 index 0000000000..2d971ccac2 --- /dev/null +++ b/sdk/js-sdk/scripts/build-grpc.sh @@ -0,0 +1,64 @@ +#!/bin/bash +OS=$(echo `uname`|tr '[:upper:]' '[:lower:]') +ARCH=$(uname -m) + +# Proto buf generation +APPCALLBACK="appcallback" +COMMON="common" +DAPR="dapr" +RUNTIME="runtime" +GOOGLE_ANY="runtime" +PATH_ROOT=$(pwd) +PATH_PROTO_ROOT="${PATH_ROOT}/../../spec/proto/runtime/v1" +PATH_PROTO_OUTPUT="${PATH_ROOT}/proto" + +prerequisiteCheckProtobuf() { + if ! type "protoc" > /dev/null; then + echo "protoc is not installed, trying to install" + sudo apt update + sudo apt install -y protobuf-compiler + protoc --version + + prerequisiteCheckProtobuf + else + echo "protoc ($(protoc --version)) installed" + fi +} + +generateGrpc() { + PATH_PROTO=$1 + PATH_FILE=$2 + + echo "[protoc] Generating RPC for $PATH_PROTO/$PATH_FILE" + + # Tools to be installed by npm (see package.json) + # npm install grpc-tools --save-dev + # npm install grpc_tools_node_protoc_ts --save-dev + PROTOC_GEN_TS_PATH="${PATH_ROOT}/node_modules/.bin/protoc-gen-ts" + PROTOC_GEN_GRPC_PATH="${PATH_ROOT}/node_modules/.bin/grpc_tools_node_protoc_plugin" + + protoc \ + --proto_path="${PATH_PROTO}" \ + --plugin="protoc-gen-ts=${PROTOC_GEN_TS_PATH}" \ + --plugin=protoc-gen-grpc=${PROTOC_GEN_GRPC_PATH} \ + --js_out="import_style=commonjs,binary:$PATH_PROTO_OUTPUT" \ + --ts_out="grpc_js:$PATH_PROTO_OUTPUT" \ + --grpc_out="grpc_js:$PATH_PROTO_OUTPUT" \ + "$PATH_PROTO/$PATH_FILE" +} + +echo "Checking Dependencies" +prerequisiteCheckProtobuf + +echo "" +echo "Removing old Proto Files: ${PATH_PROTO_OUTPUT}" +rm -rf $PATH_PROTO_OUTPUT +mkdir -p $PATH_PROTO_OUTPUT + +echo "" +echo "Compiling gRPC files" +generateGrpc $PATH_PROTO_ROOT "runtime.proto" +generateGrpc $PATH_PROTO_ROOT "appcallback.proto" + +echo "" +echo "DONE" diff --git a/sdk/js-sdk/src/Client.ts b/sdk/js-sdk/src/Client.ts new file mode 100644 index 0000000000..9c7096e9ee --- /dev/null +++ b/sdk/js-sdk/src/Client.ts @@ -0,0 +1,29 @@ +import { ChannelCredentials } from "@grpc/grpc-js"; +import { RuntimeClient } from "../proto/runtime_grpc_pb" + +export default class Client { + readonly grpcClientPort: string; + readonly grpcClientCredentials: ChannelCredentials; + readonly grpcClient: RuntimeClient; + // readonly pubsub: IClientPubSub; + // readonly state: IClientState; + // readonly binding: IClientBinding; + // readonly invoker: IClientInvoker; + // readonly secret: IClientSecret; + // readonly actor: IClientActor; + + constructor(port: string = process.env.runtime_GRPC_PORT || '34904') { + this.grpcClientPort = port; + this.grpcClientCredentials = ChannelCredentials.createInsecure(); + + console.log(`[Layotto-JS] Start connection to port:${this.grpcClientPort}`); + this.grpcClient = new RuntimeClient(`127.0.0.1:${this.grpcClientPort}`, this.grpcClientCredentials); + + // this.state = new GRPCClientState(client); + // this.pubsub = new GRPCClientPubSub(client); + // this.binding = new GRPCClientBinding(client); + // this.invoker = new GRPCClientInvoker(client); + // this.secret = new GRPCClientSecret(client); + // this.actor = new GRPCClientActor(client); + } +} diff --git a/sdk/js-sdk/src/demo/state.ts b/sdk/js-sdk/src/demo/state.ts new file mode 100644 index 0000000000..048d195329 --- /dev/null +++ b/sdk/js-sdk/src/demo/state.ts @@ -0,0 +1,5 @@ +import { Client } from '..'; + +const client = new Client(); + +// const res = await client.state.invoke(appId, 'hello-world', HttpMethod.GET); diff --git a/sdk/js-sdk/src/index.ts b/sdk/js-sdk/src/index.ts new file mode 100644 index 0000000000..2dcfff9d26 --- /dev/null +++ b/sdk/js-sdk/src/index.ts @@ -0,0 +1,5 @@ +import Client from "./Client"; + +export { + Client, +} diff --git a/sdk/js-sdk/test/unit/Client.test.ts b/sdk/js-sdk/test/unit/Client.test.ts new file mode 100644 index 0000000000..8b01e240e6 --- /dev/null +++ b/sdk/js-sdk/test/unit/Client.test.ts @@ -0,0 +1,8 @@ +import { Client } from '../../src'; + +describe('Client', () => { + it('should create a Client with default port', () => { + const client = new Client(); + expect(client.grpcClientPort).toEqual('34904'); + }); +}); diff --git a/sdk/js-sdk/tsconfig.json b/sdk/js-sdk/tsconfig.json new file mode 100644 index 0000000000..8424b3f74b --- /dev/null +++ b/sdk/js-sdk/tsconfig.json @@ -0,0 +1,73 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + "outDir": "./dist", /* Redirect output structure to the directory. */ + "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ + + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + + /* Advanced Options */ + "skipLibCheck": true, /* Skip type checking of declaration files. */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + }, + "include": ["src"], + "exclude": ["node_modules", "**/__tests__/*"] +}