diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index cd5bf78..fdc42fa 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -18,24 +18,50 @@ on: jobs: build: runs-on: ${{ matrix.os }} + services: + redis: + image: redis + ports: + - 6379:6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + etcd: + image: bitnami/etcd + env: + ALLOW_NONE_AUTHENTICATION: yes + ports: + - 2380:2379 strategy: fail-fast: false matrix: node-version: [16] - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest] steps: - name: Checkout Git Source uses: actions/checkout@v2 + with: + submodules: recursive - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - name: Bootstrap layotto + run: | + cd demo + wget -q https://github.com/mosn/layotto/releases/download/v0.4.0/layotto.linux_amd64.zip + unzip layotto.linux_amd64.zip + chmod +x layotto + ./layotto start -c ./config.json & + - name: Install Dependencies - run: npm i -g npminstall && npminstall + run: npm i - name: Continuous Integration run: npm run ci diff --git a/.gitignore b/.gitignore index ef229ed..b522544 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ coverage/ dist/ node_modules/ +.idea +proto +.fleet +.DS_Store diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3c6adb4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "layotto"] + path = layotto + url = git@github.com:mosn/layotto.git diff --git a/README.md b/README.md index 87de1c5..00139c8 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,15 @@ The Layotto Node.js SDK to build your application. [![Test coverage](https://img.shields.io/codecov/c/github/layotto/js-sdk.svg?style=flat-square)](https://codecov.io/gh/layotto/js-sdk) [![Known Vulnerabilities](https://snyk.io/test/npm/layotto/badge.svg?style=flat-square)](https://snyk.io/test/npm/layotto) +## Clone +```shell +git clone --recurse-submodules git@github.com:layotto/js-sdk.git +``` + +If forgot to add `--recurse-submodules`, you can run `git submodule update --init --recursive` to clone the submodules. + +More git submodule commands, please refer to [Git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules). + ## Usage ### State @@ -48,7 +57,6 @@ Should install [grpc-tools](https://github.com/grpc/grpc-node) first. MacOS M1 follow [this issue](https://github.com/grpc/grpc-node/issues/1405). ```bash -npm install grpc-tools npm run build:grpc ``` diff --git a/demo/config.json b/demo/config.json new file mode 100644 index 0000000..88d4d9c --- /dev/null +++ b/demo/config.json @@ -0,0 +1,142 @@ +{ + "servers": [ + { + "default_log_path": "stdout", + "default_log_level": "DEBUG", + "routers": [ + { + "router_config_name": "actuator_dont_need_router" + } + ], + "listeners": [ + { + "name": "grpc", + "address": "127.0.0.1:34904", + "bind_port": true, + "filter_chains": [ + { + "filters": [ + { + "type": "grpc", + "config": { + "server_name": "runtime", + "grpc_config": { + "hellos": { + "helloworld": { + "type": "helloworld", + "hello": "greeting" + } + }, + "state": { + "state_demo": { + "type": "redis", + "metadata": { + "redisHost": "localhost:6379", + "redisPassword": "" + } + }, + "redis": { + "type": "redis", + "metadata": { + "redisHost": "localhost:6379", + "redisPassword": "" + } + } + }, + "config_store": { + }, + "sequencer": { + "sequencer_demo": { + "type": "redis", + "metadata": { + "redisHost": "localhost:6379", + "redisPassword": "" + } + }, + "etcd": { + "type": "redis", + "metadata": { + "redisHost": "localhost:6379", + "redisPassword": "" + } + } + }, + "lock": { + "lock_demo": { + "type": "redis", + "metadata": { + "redisHost": "localhost:6379", + "redisPassword": "" + } + }, + "redis": { + "type": "redis", + "metadata": { + "redisHost": "localhost:6379", + "redisPassword": "" + } + } + }, + "bindings": { + "http": { + "type": "http", + "metadata": { + "url": "https://mosn.io/layotto" + } + } + }, + "pub_subs": { + "pub_subs_demo": { + "type": "redis", + "metadata": { + "redisHost": "localhost:6379", + "redisPassword": "" + } + }, + "redis": { + "type": "redis", + "metadata": { + "redisHost": "localhost:6379", + "redisPassword": "" + } + } + }, + "app": { + "app_id": "app1", + "grpc_callback_port": 9999 + } + } + } + } + ] + } + ] + }, + { + "name": "actuator", + "address": "127.0.0.1:34999", + "bind_port": true, + "filter_chains": [ + { + "filters": [ + { + "type": "proxy", + "config": { + "downstream_protocol": "Http1", + "upstream_protocol": "Http1", + "router_config_name": "actuator_dont_need_router" + } + } + ] + } + ], + "stream_filters": [ + { + "type": "actuator_filter" + } + ] + } + ] + } + ] +} diff --git a/layotto b/layotto new file mode 160000 index 0000000..1507aad --- /dev/null +++ b/layotto @@ -0,0 +1 @@ +Subproject commit 1507aad29975684f29f8ee57716433f06826c5e0 diff --git a/package.json b/package.json index 28574f3..03c72e4 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,11 @@ "build:grpc": "scripts/build-grpc.sh", "tsc:clean": "rm -rf dist", "tsc:cjs": "tsc -p tsconfig.json", - "build": "npm run tsc:clean && npm run tsc:cjs", + "tsc:check": "tsc -p tsconfig.json --noEmit", + "build": "npm run tsc:clean && npm run build:grpc && npm run tsc:cjs", "rename:cjs": "for f in cjs/*.js; do mv -- \"$f\" \"${f/.js/.cjs}\"; done", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postinstall": "npm run build:grpc" }, "repository": { "type": "git", @@ -40,7 +42,7 @@ "@eggjs/tsconfig": "^1.0.0", "@types/google-protobuf": "^3.15.5", "@types/jest": "^27.0.2", - "egg-ci": "^1.19.0", + "egg-ci": "^2.1.0", "grpc_tools_node_protoc_ts": "^5.3.2", "jest": "^27.2.5", "ts-jest": "^27.0.7", @@ -48,7 +50,8 @@ "tslint": "^6.1.3", "tslint-config-prettier": "^1.18.0", "type-fest": "^2.5.2", - "typescript": "^4.4.4" + "typescript": "^4.4.4", + "grpc-tools": "^1.11.3" }, "dependencies": { "@grpc/grpc-js": "^1.4.1", @@ -60,8 +63,6 @@ "ci": { "version": "16", "type": "github", - "os": { - "github": "linux, macos" - } + "os": [ "linux", "macos" ] } } diff --git a/proto/appcallback_grpc_pb.d.ts b/proto/appcallback_grpc_pb.d.ts deleted file mode 100644 index 5cb6357..0000000 --- a/proto/appcallback_grpc_pb.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// 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/proto/appcallback_grpc_pb.js b/proto/appcallback_grpc_pb.js deleted file mode 100644 index 044a4b5..0000000 --- a/proto/appcallback_grpc_pb.js +++ /dev/null @@ -1,85 +0,0 @@ -// 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/proto/appcallback_pb.d.ts b/proto/appcallback_pb.d.ts deleted file mode 100644 index 5807b6e..0000000 --- a/proto/appcallback_pb.d.ts +++ /dev/null @@ -1,128 +0,0 @@ -// 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/proto/appcallback_pb.js b/proto/appcallback_pb.js deleted file mode 100644 index 021406f..0000000 --- a/proto/appcallback_pb.js +++ /dev/null @@ -1,965 +0,0 @@ -// 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/proto/runtime_grpc_pb.d.ts b/proto/runtime_grpc_pb.d.ts deleted file mode 100644 index 52ea7d8..0000000 --- a/proto/runtime_grpc_pb.d.ts +++ /dev/null @@ -1,382 +0,0 @@ -// 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/proto/runtime_grpc_pb.js b/proto/runtime_grpc_pb.js deleted file mode 100644 index 157074b..0000000 --- a/proto/runtime_grpc_pb.js +++ /dev/null @@ -1,644 +0,0 @@ -// 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/proto/runtime_pb.d.ts b/proto/runtime_pb.d.ts deleted file mode 100644 index 1092132..0000000 --- a/proto/runtime_pb.d.ts +++ /dev/null @@ -1,1283 +0,0 @@ -// 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(): string; - setNextId(value: string): 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: string, - } -} - -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/proto/runtime_pb.js b/proto/runtime_pb.js deleted file mode 100644 index d6ed905..0000000 --- a/proto/runtime_pb.js +++ /dev/null @@ -1,10020 +0,0 @@ -// 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 {string} */ (reader.readInt64String()); - 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 (parseInt(f, 10) !== 0) { - writer.writeInt64String( - 1, - f - ); - } -}; - - -/** - * optional int64 next_id = 1; - * @return {string} - */ -proto.spec.proto.runtime.v1.GetNextIdResponse.prototype.getNextId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.spec.proto.runtime.v1.GetNextIdResponse} returns this - */ -proto.spec.proto.runtime.v1.GetNextIdResponse.prototype.setNextId = function(value) { - return jspb.Message.setProto3StringIntField(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/scripts/build-grpc.sh b/scripts/build-grpc.sh index 16a5f3f..64e04e8 100755 --- a/scripts/build-grpc.sh +++ b/scripts/build-grpc.sh @@ -18,21 +18,14 @@ ARCH=$(uname -m) # Proto buf generation # https://medium.com/blokur/how-to-implement-a-grpc-client-and-server-in-typescript-fa3ac807855e PATH_ROOT=$(pwd) -PATH_PROTO_ROOT="${PATH_ROOT}/../../spec/proto/runtime/v1" +PATH_PROTO_ROOT="${PATH_ROOT}/layotto/spec/proto" 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 -} +PROTO_FILES=( +"runtime/v1/lifecycle.proto" +"runtime/v1/runtime.proto" +"runtime/v1/appcallback.proto" +) generateGrpc() { PATH_PROTO=$1 @@ -47,7 +40,7 @@ generateGrpc() { PROTOC_GEN_GRPC_PATH="${PATH_ROOT}/node_modules/.bin/grpc_tools_node_protoc_plugin" # commonjs - protoc \ + grpc_tools_node_protoc \ --proto_path="${PATH_PROTO}" \ --plugin="protoc-gen-ts=${PROTOC_GEN_TS_PATH}" \ --plugin=protoc-gen-grpc=${PROTOC_GEN_GRPC_PATH} \ @@ -57,9 +50,6 @@ generateGrpc() { "$PATH_PROTO/$PATH_FILE" } -echo "Checking Dependencies" -prerequisiteCheckProtobuf - echo "" echo "Removing old Proto Files: ${PATH_PROTO_OUTPUT}" rm -rf $PATH_PROTO_OUTPUT @@ -67,8 +57,11 @@ mkdir -p $PATH_PROTO_OUTPUT echo "" echo "Compiling gRPC files" -generateGrpc $PATH_PROTO_ROOT "runtime.proto" -generateGrpc $PATH_PROTO_ROOT "appcallback.proto" + +for proto_file in ${PROTO_FILES[@]}; do + echo "generate ${proto_file}" + generateGrpc $PATH_PROTO_ROOT "${proto_file}" +done echo "" echo "DONE" diff --git a/src/client/API.ts b/src/client/API.ts index a4c6672..c38ed78 100644 --- a/src/client/API.ts +++ b/src/client/API.ts @@ -13,7 +13,7 @@ * limitations under the License. */ import { Metadata } from '@grpc/grpc-js'; -import { RuntimeClient } from '../../proto/runtime_grpc_pb'; +import { RuntimeClient } from '../../proto/runtime/v1/runtime_grpc_pb'; import { KV, RequestWithMeta, Map } from '../types/common'; export class API { diff --git a/src/client/Binding.ts b/src/client/Binding.ts index 72f3054..b07cb91 100644 --- a/src/client/Binding.ts +++ b/src/client/Binding.ts @@ -12,10 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { +import { InvokeBindingRequest as InvokeBindingRequestPB, InvokeBindingResponse as InvokeBindingResponsePB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { API } from './API'; import { InvokeBindingRequest, @@ -31,11 +31,11 @@ export default class Binding extends API { if (typeof request.data === 'string') { req.setData(Buffer.from(request.data, 'utf8')); } else { - req.setData(request.data); + req.setData(request.data as Uint8Array); } this.mergeMetadataToMap(req.getMetadataMap(), request.metadata); - - return new Promise((resolve, reject) => { + + return new Promise((resolve, reject) => { this.runtime.invokeBinding(req, this.createMetadata(request), (err, res: InvokeBindingResponsePB) => { if (err) return reject(err); resolve({ diff --git a/src/client/Client.ts b/src/client/Client.ts index 6a9e9a6..9a93131 100644 --- a/src/client/Client.ts +++ b/src/client/Client.ts @@ -14,7 +14,7 @@ */ import { debuglog } from 'node:util'; import { ChannelCredentials } from '@grpc/grpc-js'; -import { RuntimeClient } from '../../proto/runtime_grpc_pb'; +import { RuntimeClient } from '../../proto/runtime/v1/runtime_grpc_pb'; import State from './State'; import Hello from './Hello'; import Invoker from './Invoker'; @@ -47,7 +47,7 @@ export default class Client { this.port = port; const clientCredentials = ChannelCredentials.createInsecure(); this._runtime = new RuntimeClient(`${this.host}:${this.port}`, clientCredentials); - debug('Start connection to %s:%s', this.host, this.port); + debug('Start connection to %s:%s', this.host, this.port); } get hello() { diff --git a/src/client/Configuration.ts b/src/client/Configuration.ts index ba13737..832f752 100644 --- a/src/client/Configuration.ts +++ b/src/client/Configuration.ts @@ -21,7 +21,7 @@ import { DeleteConfigurationRequest as DeleteConfigurationRequestPB, SubscribeConfigurationRequest as SubscribeConfigurationRequestPB, SubscribeConfigurationResponse as SubscribeConfigurationResponsePB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { API } from './API'; import { GetConfigurationRequest, @@ -48,7 +48,7 @@ export default class Configuration extends API { } this.mergeMetadataToMap(req.getMetadataMap(), request.metadata); - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { this.runtime.getConfiguration(req, this.createMetadata(request), (err, res: GetConfigurationResponsePB) => { if (err) return reject(err); resolve(res.getItemsList().map(item => this.createGetConfigurationItem(item))); diff --git a/src/client/File.ts b/src/client/File.ts index 61f4bc9..3b44f2e 100644 --- a/src/client/File.ts +++ b/src/client/File.ts @@ -15,13 +15,13 @@ import { debuglog } from 'node:util'; import { Transform, Readable } from 'stream'; import { pipeline as pipelinePromise } from 'stream/promises'; -import { +import { GetFileRequest as GetFileRequestPB, GetFileResponse as GetFileResponsePB, PutFileRequest as PutFileRequestPB, ListFileRequest as ListFileRequestPB, DelFileRequest as DelFileRequestPB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { API } from './API'; import { GetFileRequest, ListFileResponse, PutFileRequest } from '../types/File'; @@ -94,7 +94,7 @@ export default class File extends API { if (err) return reject(err); debug('listFile: %j, res: %j', request, res); resolve({ - names: res.getFileNameList(), + names: res.getFilesList().map(t => t.getFileName()), }); }); }); diff --git a/src/client/Hello.ts b/src/client/Hello.ts index b73faf8..473e774 100644 --- a/src/client/Hello.ts +++ b/src/client/Hello.ts @@ -12,10 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { +import { SayHelloRequest as SayHelloRequestPB, SayHelloResponse as SayHelloResponsePB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { API } from './API'; import { SayHelloRequest } from '../types/Hello'; @@ -25,7 +25,7 @@ export default class Hello extends API { if (!request) request = {}; req.setServiceName(request.serviceName ?? 'helloworld'); if (request.name) req.setName(request.name); - + return new Promise((resolve, reject) => { this.runtime.sayHello(req, this.createMetadata(request as SayHelloRequest), (err, res: SayHelloResponsePB) => { if (err) return reject(err); diff --git a/src/client/Invoker.ts b/src/client/Invoker.ts index 298e278..4999173 100644 --- a/src/client/Invoker.ts +++ b/src/client/Invoker.ts @@ -18,7 +18,7 @@ import { CommonInvokeRequest as CommonInvokeRequestPB, HTTPExtension, InvokeResponse as InvokeResponsePB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { API } from './API'; import { InvokeServiceRequest, InvokeResponse } from '../types/Invoker'; @@ -44,8 +44,6 @@ export default class Invoker extends API { message.setData(dataSerialized); } - console.log(message); - const req = new InvokeServiceRequestPB(); req.setId(request.id); req.setMessage(message); @@ -60,7 +58,7 @@ export default class Invoker extends API { if (rawData) { content = JSON.parse(Buffer.from(rawData.getValue_asU8()).toString()); } else { - content = {}; + content = {}; } } else if (contentType === 'text/plain') { if (rawData) { diff --git a/src/client/Lock.ts b/src/client/Lock.ts index ca74a55..8d6c795 100644 --- a/src/client/Lock.ts +++ b/src/client/Lock.ts @@ -18,7 +18,7 @@ import { TryLockResponse as TryLockResponsePB, UnlockRequest as UnlockRequestPB, UnlockResponse as UnlockResponsePB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { API } from './API'; import { TryLockRequest, UnlockRequest } from '../types/Lock'; diff --git a/src/client/PubSub.ts b/src/client/PubSub.ts index 658cff0..de27b46 100644 --- a/src/client/PubSub.ts +++ b/src/client/PubSub.ts @@ -12,9 +12,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { +import { PublishEventRequest as PublishEventRequestPB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { API } from './API'; import { PublishEventRequest } from '../types/PubSub'; diff --git a/src/client/Sequencer.ts b/src/client/Sequencer.ts index ac94278..f4e88ca 100644 --- a/src/client/Sequencer.ts +++ b/src/client/Sequencer.ts @@ -16,7 +16,7 @@ import { GetNextIdRequest as GetNextIdRequestPB, GetNextIdResponse as GetNextIdResponsePB, SequencerOptions as SequencerOptionsPB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { API } from './API'; import { GetNextIdRequest } from '../types/Sequencer'; diff --git a/src/client/State.ts b/src/client/State.ts index 1f9a106..f67cef5 100644 --- a/src/client/State.ts +++ b/src/client/State.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { +import { SaveStateRequest as SaveStateRequestPB, StateItem as StateItemPB, Etag as EtagPB, @@ -24,7 +24,7 @@ import { DeleteBulkStateRequest as DeleteBulkStateRequestPB, ExecuteStateTransactionRequest as ExecuteStateTransactionRequestPB, TransactionalStateOperation as TransactionalStateOperationPB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { API } from './API'; import { DeleteBulkStateRequest, @@ -96,16 +96,15 @@ export default class State extends API { const states: ResponseStateItem[] = []; const itemsList = res.getItemsList(); for (const item of itemsList) { - // pb.message.array[0] is key, pb.message.array[1] is value - if (isEmptyPBMessage(item, 1)) { - continue; + const value = item.getData_asU8(); + if (value && value.length > 0) { + states.push({ + key: item.getKey(), + value: item.getData_asU8(), + etag: item.getEtag(), + metadata: convertMapToKVString(item.getMetadataMap()), + }); } - states.push({ - key: item.getKey(), - value: item.getData_asU8(), - etag: item.getEtag(), - metadata: convertMapToKVString(item.getMetadataMap()), - }); } resolve(states); }); @@ -121,6 +120,10 @@ export default class State extends API { const etagInstance = new EtagPB(); etagInstance.setValue(request.etag); req.setEtag(etagInstance); + } else { + const etagInstance = new EtagPB(); + etagInstance.setValue('0'); + req.setEtag(etagInstance); } if (request.options) { const optionsInstance = new StateOptionsPB(); @@ -190,6 +193,10 @@ export default class State extends API { const etag = new EtagPB(); etag.setValue(item.etag); stateItem.setEtag(etag); + } else { + const etag = new EtagPB(); + etag.setValue('0'); + stateItem.setEtag(etag); } if (item.options !== undefined) { const options = new StateOptionsPB(); diff --git a/src/index.ts b/src/index.ts index 2617692..d49f98c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,7 +15,7 @@ import Client from './client/Client'; import Server from './server/Server'; import * as utils from './utils'; -import * as RumtimeTypes from '../proto/runtime_pb'; +import * as RumtimeTypes from '../proto/runtime/v1/runtime_pb'; export { Client, diff --git a/src/server/GRPCServerImpl.ts b/src/server/GRPCServerImpl.ts index ed153f9..b548e83 100644 --- a/src/server/GRPCServerImpl.ts +++ b/src/server/GRPCServerImpl.ts @@ -16,13 +16,13 @@ import { debuglog } from 'node:util'; import * as grpc from '@grpc/grpc-js'; import { Empty } from 'google-protobuf/google/protobuf/empty_pb'; -import { IAppCallbackServer } from '../../proto/appcallback_grpc_pb'; +import { IAppCallbackServer } from '../../proto/runtime/v1/appcallback_grpc_pb'; import { ListTopicSubscriptionsResponse, TopicSubscription, TopicEventRequest, TopicEventResponse, -} from '../../proto/appcallback_pb'; +} from '../../proto/runtime/v1/appcallback_pb'; import { PubSubCallback } from '../types/PubSub'; const debug = debuglog('layotto:server:grpc'); @@ -52,7 +52,7 @@ export default class GRPCServerImpl implements IAppCallbackServer { const req = call.request; const res = new TopicEventResponse(); const handlerKey = this.createPubSubHandlerKey(req.getPubsubName(), req.getTopic()); - + const handler = this._handlersTopics[handlerKey]; if (!handler) { debug('PubSub Event from topic: "%s" was not handled, drop now', handlerKey); @@ -71,7 +71,7 @@ export default class GRPCServerImpl implements IAppCallbackServer { } catch { data = rawData; } - + try { await handler(data); res.setStatus(TopicEventResponse.TopicEventResponseStatus.SUCCESS); diff --git a/src/server/Server.ts b/src/server/Server.ts index cb94403..d742558 100644 --- a/src/server/Server.ts +++ b/src/server/Server.ts @@ -14,7 +14,7 @@ */ import { debuglog } from 'node:util'; import { ServerCredentials, Server as GRPCServer } from '@grpc/grpc-js'; -import { AppCallbackService } from '../../proto/appcallback_grpc_pb'; +import { AppCallbackService } from '../../proto/runtime/v1/appcallback_grpc_pb'; import GRPCServerImpl from './GRPCServerImpl'; import PubSub from './PubSub'; import { sleep } from '../utils'; diff --git a/src/types/Invoker.ts b/src/types/Invoker.ts index 32cd991..4fb0c38 100644 --- a/src/types/Invoker.ts +++ b/src/types/Invoker.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { HTTPExtension } from '../../proto/runtime_pb'; +import { HTTPExtension } from '../../proto/runtime/v1/runtime_pb'; import { RequestWithMeta } from './common'; export type InvokeServiceRequest = RequestWithMeta<{ diff --git a/src/types/Sequencer.ts b/src/types/Sequencer.ts index 15f76ff..3ab5512 100644 --- a/src/types/Sequencer.ts +++ b/src/types/Sequencer.ts @@ -14,7 +14,7 @@ */ import { SequencerOptions as SequencerOptionsPB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { KV, RequestWithMeta } from './common'; export type SequencerOptions = { diff --git a/src/types/State.ts b/src/types/State.ts index 474ca4f..42f4433 100644 --- a/src/types/State.ts +++ b/src/types/State.ts @@ -13,9 +13,9 @@ * limitations under the License. */ import { Except, SetOptional } from 'type-fest'; -import { +import { StateOptions as StateOptionsPB, -} from '../../proto/runtime_pb'; +} from '../../proto/runtime/v1/runtime_pb'; import { KV, RequestWithMeta } from './common'; export type StateConcurrency = StateOptionsPB.StateConcurrency; diff --git a/src/types/common.ts b/src/types/common.ts index 13b693c..2bba43e 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -33,4 +33,4 @@ export function convertArrayToKVString(items: [string, string][]) { kv[item[0]] = item[1]; } return kv; -}; +} diff --git a/src/utils.ts b/src/utils.ts index 0b48fab..39b62ee 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -44,7 +44,7 @@ export async function sleep(ms: number) { // convertedPrimitiveFields_: {} // } export function isEmptyPBMessage(item, emptyLength = 0) { - if (item.array.length === emptyLength) return true; + if (!item.array || item.array.length === emptyLength) return true; return false; } diff --git a/test/unit/client/Binding.test.ts b/test/unit/client/Binding.test.ts index cb695ba..77ad47c 100644 --- a/test/unit/client/Binding.test.ts +++ b/test/unit/client/Binding.test.ts @@ -28,7 +28,7 @@ describe('client/Binding.test.ts', () => { data: '😄ok,你好', metadata: { token: '123' }, }); - assert.match(Buffer.from(res.data).toString(), /{"name":"layotto",/) + assert.match(Buffer.from(res.data).toString(), /mosn\.io\/layotto/) assert.equal(res.metadata.statusCode, '200'); }); }); diff --git a/test/unit/client/Client.test.ts b/test/unit/client/Client.test.ts index e0de6ba..d9982a1 100644 --- a/test/unit/client/Client.test.ts +++ b/test/unit/client/Client.test.ts @@ -20,7 +20,7 @@ describe('client/Client.test.ts', () => { beforeAll(async () => { client = new Client(); const hello = await client.hello.sayHello(); - assert.equal(hello, 'greeting, '); + assert.equal(hello, 'greeting'); const hello2 = await client.hello.sayHello({ name: 'js-sdk' }); assert.equal(hello2, 'greeting, js-sdk'); }); diff --git a/test/unit/client/Sequencer.test.ts b/test/unit/client/Sequencer.test.ts index 273858f..78876d9 100644 --- a/test/unit/client/Sequencer.test.ts +++ b/test/unit/client/Sequencer.test.ts @@ -30,7 +30,7 @@ describe('client/Sequencer.test.ts', () => { for (let i = 0; i < 20; i++) { lastId = currentId; currentId = await client.sequencer.getNextId({ - storeName, + storeName, key: 'user_info', }); assert(BigInt(currentId) > BigInt(lastId)); @@ -47,7 +47,7 @@ describe('client/Sequencer.test.ts', () => { for (let i = 0; i < 20; i++) { lastId = currentId; currentId = await client.sequencer.getNextId({ - storeName, + storeName, key: 'user_info', options: { increment: RumtimeTypes.SequencerOptions.AutoIncrement.WEAK, diff --git a/test/unit/client/State.test.ts b/test/unit/client/State.test.ts index b5524db..294dfd3 100644 --- a/test/unit/client/State.test.ts +++ b/test/unit/client/State.test.ts @@ -48,7 +48,7 @@ describe('client/State.test.ts', () => { it('should get empty value', async () => { const key = 'js-sdk-unit-empty-' + Date.now(); await client.state.save({ - storeName, + storeName, states: { key, value: '', @@ -65,23 +65,23 @@ describe('client/State.test.ts', () => { const key = 'js-sdk-unit-' + Date.now(); const value = `hello js-sdk, with 中文, 😄, at ${Date()}`; await client.state.save({ - storeName, + storeName, states: { key, value }, requestMeta: { traceid: `mock-traceid-unittest-${Date.now()}` }, }); const state = await client.state.get({ storeName, key }); assert(state); assert.equal(Buffer.from(state.value).toString(), value); - + await client.state.save({ - storeName, + storeName, states: { key, value }, }); const state2 = await client.state.get({ storeName, key }); assert(state2); assert.equal(Buffer.from(state2.value).toString(), value); }); - + it('should save bulk items and get them success', async () => { const items: { key: string, value: string }[] = []; for (let i = 0; i < 20; i++) { @@ -90,16 +90,16 @@ describe('client/State.test.ts', () => { items.push({ key, value }); } await client.state.save({ - storeName, + storeName, states: items, }); - + for (const { key, value } of items) { const state = await client.state.get({ storeName, key }); assert(state); assert.equal(Buffer.from(state.value).toString(), value); } - + const keys = items.map(i => i.key); const states = await client.state.getBulk({ storeName, keys }); assert.equal(states.length, items.length); @@ -146,14 +146,14 @@ describe('client/State.test.ts', () => { // delete not exists await client.state.deleteBulk({ storeName, states: keys }); let states = await client.state.getBulk({ - storeName, + storeName, keys: keys.map(i => i.key), }); assert.equal(states.length, 0); await client.state.save({ storeName, states: items }); states = await client.state.getBulk({ - storeName, + storeName, keys: keys.map(i => i.key), }); assert.equal(states.length, 20); @@ -162,7 +162,7 @@ describe('client/State.test.ts', () => { await client.state.deleteBulk({ storeName, states: keys.slice(0, 5) }); states = await client.state.getBulk({ - storeName, + storeName, keys: keys.map(i => i.key), }); assert.equal(states.length, 15); @@ -171,7 +171,7 @@ describe('client/State.test.ts', () => { await client.state.deleteBulk({ storeName, states: keys }); states = await client.state.getBulk({ - storeName, + storeName, keys: keys.map(i => i.key), }); assert.equal(states.length, 0);