diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 962d0305..ffb8dd1c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,93 +1,96 @@ -name: Tests - -on: - workflow_call: - inputs: - runtime: - required: true - type: string - - registry: - description: "When in QA mode, the Docker registry to use" - type: string - required: false - - image: - description: "When in QA mode, the Docker image to use" - type: string - required: false - - tag: - description: "When in QA mode, the Docker image tag to use" - type: string - required: false - -jobs: - load_configuration: - uses: ./.github/workflows/load-configuration.yml - with: - runtime: ${{ inputs.runtime }} - registry: ${{ inputs.registry }} - image: ${{ inputs.image }} - tag: ${{ inputs.tag }} - - test: - needs: load_configuration - timeout-minutes: 10 - name: "${{ matrix.group.name }}" - strategy: - fail-fast: false - matrix: - group: - - name: samples - path: ./src/samples - - - name: connection - path: ./src/connection - - - name: extra - path: ./src/extra - - - name: persistentSubscription - path: ./src/persistentSubscription - - - name: projections - path: ./src/projections - - - name: streams - path: ./src/streams - - - name: opentelemetry - path: ./src/opentelemetry - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Login to Cloudsmith - uses: docker/login-action@v3 - with: - registry: ${{ needs.load_configuration.outputs.registry }} - username: ${{ secrets.CLOUDSMITH_CICD_USER }} - password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }} - - - uses: actions/setup-node@v4 - with: - node-version-file: .github/files/.nvmrc - - - name: NodeJS version - run: node -v - - - name: Corepack - run: corepack enable - - - name: Install - run: yarn - - - name: Build - run: yarn build - - - name: Run Tests - run: yarn test ${{ matrix.group.path }} --ci --run-in-band --forceExit - env: - KURRENT_IMAGE: "${{ needs.load_configuration.outputs.registry }}/${{ needs.load_configuration.outputs.image }}:${{ needs.load_configuration.outputs.tag }}" +name: Tests + +on: + workflow_call: + inputs: + runtime: + required: true + type: string + + registry: + description: "When in QA mode, the Docker registry to use" + type: string + required: false + + image: + description: "When in QA mode, the Docker image to use" + type: string + required: false + + tag: + description: "When in QA mode, the Docker image tag to use" + type: string + required: false + +jobs: + load_configuration: + uses: ./.github/workflows/load-configuration.yml + with: + runtime: ${{ inputs.runtime }} + registry: ${{ inputs.registry }} + image: ${{ inputs.image }} + tag: ${{ inputs.tag }} + + test: + needs: load_configuration + timeout-minutes: 10 + name: "${{ matrix.group.name }}" + strategy: + fail-fast: false + matrix: + group: + - name: samples + path: ./src/samples + + - name: connection + path: ./src/connection + + - name: extra + path: ./src/extra + + - name: persistentSubscription + path: ./src/persistentSubscription + + - name: projections + path: ./src/projections + + - name: streams + path: ./src/streams + + - name: opentelemetry + path: ./src/opentelemetry + + - name: schemaRegistry + path: ./src/schemaRegistry + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Login to Cloudsmith + uses: docker/login-action@v3 + with: + registry: ${{ needs.load_configuration.outputs.registry }} + username: ${{ secrets.CLOUDSMITH_CICD_USER }} + password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }} + + - uses: actions/setup-node@v4 + with: + node-version-file: .github/files/.nvmrc + + - name: NodeJS version + run: node -v + + - name: Corepack + run: corepack enable + + - name: Install + run: yarn + + - name: Build + run: yarn build + + - name: Run Tests + run: yarn test ${{ matrix.group.path }} --ci --run-in-band --forceExit + env: + KURRENT_IMAGE: "${{ needs.load_configuration.outputs.registry }}/${{ needs.load_configuration.outputs.image }}:${{ needs.load_configuration.outputs.tag }}" diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_grpc_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_pb.d.ts b/packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_pb.d.ts new file mode 100644 index 00000000..3b315705 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_pb.d.ts @@ -0,0 +1,75 @@ +// package: kurrentdb.protocol.v2.registry.errors +// file: kurrentdb/protocols/v2/registry/errors.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as kurrentdb_protocols_v2_rpc_pb from "../../../../kurrentdb/protocols/v2/rpc_pb"; + +export class SchemaNotFoundErrorDetails extends jspb.Message { + getSchema(): string; + setSchema(value: string): SchemaNotFoundErrorDetails; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaNotFoundErrorDetails.AsObject; + static toObject(includeInstance: boolean, msg: SchemaNotFoundErrorDetails): SchemaNotFoundErrorDetails.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaNotFoundErrorDetails, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaNotFoundErrorDetails; + static deserializeBinaryFromReader(message: SchemaNotFoundErrorDetails, reader: jspb.BinaryReader): SchemaNotFoundErrorDetails; +} + +export namespace SchemaNotFoundErrorDetails { + export type AsObject = { + schema: string, + } +} + +export class SchemaAlreadyExistsErrorDetails extends jspb.Message { + getSchema(): string; + setSchema(value: string): SchemaAlreadyExistsErrorDetails; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaAlreadyExistsErrorDetails.AsObject; + static toObject(includeInstance: boolean, msg: SchemaAlreadyExistsErrorDetails): SchemaAlreadyExistsErrorDetails.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaAlreadyExistsErrorDetails, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaAlreadyExistsErrorDetails; + static deserializeBinaryFromReader(message: SchemaAlreadyExistsErrorDetails, reader: jspb.BinaryReader): SchemaAlreadyExistsErrorDetails; +} + +export namespace SchemaAlreadyExistsErrorDetails { + export type AsObject = { + schema: string, + } +} + +export class SchemaDeletedErrorDetails extends jspb.Message { + getSchema(): string; + setSchema(value: string): SchemaDeletedErrorDetails; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaDeletedErrorDetails.AsObject; + static toObject(includeInstance: boolean, msg: SchemaDeletedErrorDetails): SchemaDeletedErrorDetails.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaDeletedErrorDetails, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaDeletedErrorDetails; + static deserializeBinaryFromReader(message: SchemaDeletedErrorDetails, reader: jspb.BinaryReader): SchemaDeletedErrorDetails; +} + +export namespace SchemaDeletedErrorDetails { + export type AsObject = { + schema: string, + } +} + +export enum RegistryError { + UNSPECIFIED = 0, + SCHEMA_NOT_FOUND = 1, + SCHEMA_ALREADY_EXISTS = 2, + SCHEMA_DELETED = 3, +} diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_pb.js new file mode 100644 index 00000000..13d5aa99 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_pb.js @@ -0,0 +1,493 @@ +// source: kurrentdb/protocols/v2/registry/errors.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() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var kurrentdb_protocols_v2_rpc_pb = require('../../../../kurrentdb/protocols/v2/rpc_pb.js'); +goog.object.extend(proto, kurrentdb_protocols_v2_rpc_pb); +goog.exportSymbol('proto.kurrentdb.protocol.v2.registry.errors.RegistryError', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails', 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.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.displayName = 'proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.displayName = 'proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.displayName = 'proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.toObject = function(includeInstance, msg) { + var f, obj = { + schema: 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.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails; + return proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.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.setSchema(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema = 1; + * @return {string} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails} returns this + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaNotFoundErrorDetails.prototype.setSchema = 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.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.toObject = function(includeInstance, msg) { + var f, obj = { + schema: 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.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails; + return proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.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.setSchema(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema = 1; + * @return {string} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails} returns this + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaAlreadyExistsErrorDetails.prototype.setSchema = 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.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.toObject = function(includeInstance, msg) { + var f, obj = { + schema: 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.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails; + return proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.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.setSchema(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema = 1; + * @return {string} + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails} returns this + */ +proto.kurrentdb.protocol.v2.registry.errors.SchemaDeletedErrorDetails.prototype.setSchema = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * @enum {number} + */ +proto.kurrentdb.protocol.v2.registry.errors.RegistryError = { + UNSPECIFIED: 0, + SCHEMA_NOT_FOUND: 1, + SCHEMA_ALREADY_EXISTS: 2, + SCHEMA_DELETED: 3 +}; + +goog.object.extend(exports, proto.kurrentdb.protocol.v2.registry.errors); diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/events_grpc_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/events_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/events_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/events_pb.d.ts b/packages/db-client/generated/kurrentdb/protocols/v2/registry/events_pb.d.ts new file mode 100644 index 00000000..e4b56463 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/events_pb.d.ts @@ -0,0 +1,255 @@ +// package: kurrentdb.protocol.registry.v2 +// file: kurrentdb/protocols/v2/registry/events.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as kurrentdb_protocols_v2_registry_shared_pb from "../../../../kurrentdb/protocols/v2/registry/shared_pb"; + +export class SchemaCreated extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): SchemaCreated; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): SchemaCreated; + getDataFormat(): kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat; + setDataFormat(value: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat): SchemaCreated; + getCompatibility(): kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode; + setCompatibility(value: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode): SchemaCreated; + + getTagsMap(): jspb.Map; + clearTagsMap(): void; + getSchemaVersionId(): string; + setSchemaVersionId(value: string): SchemaCreated; + getSchemaDefinition(): Uint8Array | string; + getSchemaDefinition_asU8(): Uint8Array; + getSchemaDefinition_asB64(): string; + setSchemaDefinition(value: Uint8Array | string): SchemaCreated; + getVersionNumber(): number; + setVersionNumber(value: number): SchemaCreated; + + hasCreatedAt(): boolean; + clearCreatedAt(): void; + getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): SchemaCreated; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaCreated.AsObject; + static toObject(includeInstance: boolean, msg: SchemaCreated): SchemaCreated.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaCreated, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaCreated; + static deserializeBinaryFromReader(message: SchemaCreated, reader: jspb.BinaryReader): SchemaCreated; +} + +export namespace SchemaCreated { + export type AsObject = { + schemaName: string, + description?: string, + dataFormat: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat, + compatibility: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode, + + tagsMap: Array<[string, string]>, + schemaVersionId: string, + schemaDefinition: Uint8Array | string, + versionNumber: number, + createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class SchemaVersionRegistered extends jspb.Message { + getSchemaVersionId(): string; + setSchemaVersionId(value: string): SchemaVersionRegistered; + getSchemaDefinition(): Uint8Array | string; + getSchemaDefinition_asU8(): Uint8Array; + getSchemaDefinition_asB64(): string; + setSchemaDefinition(value: Uint8Array | string): SchemaVersionRegistered; + getVersionNumber(): number; + setVersionNumber(value: number): SchemaVersionRegistered; + getSchemaName(): string; + setSchemaName(value: string): SchemaVersionRegistered; + getDataFormat(): kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat; + setDataFormat(value: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat): SchemaVersionRegistered; + + hasRegisteredAt(): boolean; + clearRegisteredAt(): void; + getRegisteredAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setRegisteredAt(value?: google_protobuf_timestamp_pb.Timestamp): SchemaVersionRegistered; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaVersionRegistered.AsObject; + static toObject(includeInstance: boolean, msg: SchemaVersionRegistered): SchemaVersionRegistered.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaVersionRegistered, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaVersionRegistered; + static deserializeBinaryFromReader(message: SchemaVersionRegistered, reader: jspb.BinaryReader): SchemaVersionRegistered; +} + +export namespace SchemaVersionRegistered { + export type AsObject = { + schemaVersionId: string, + schemaDefinition: Uint8Array | string, + versionNumber: number, + schemaName: string, + dataFormat: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat, + registeredAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class SchemaVersionsDeleted extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): SchemaVersionsDeleted; + clearVersionsList(): void; + getVersionsList(): Array; + setVersionsList(value: Array): SchemaVersionsDeleted; + addVersions(value: string, index?: number): string; + getLatestSchemaVersionId(): string; + setLatestSchemaVersionId(value: string): SchemaVersionsDeleted; + getLatestSchemaVersionNumber(): number; + setLatestSchemaVersionNumber(value: number): SchemaVersionsDeleted; + + hasDeletedAt(): boolean; + clearDeletedAt(): void; + getDeletedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setDeletedAt(value?: google_protobuf_timestamp_pb.Timestamp): SchemaVersionsDeleted; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaVersionsDeleted.AsObject; + static toObject(includeInstance: boolean, msg: SchemaVersionsDeleted): SchemaVersionsDeleted.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaVersionsDeleted, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaVersionsDeleted; + static deserializeBinaryFromReader(message: SchemaVersionsDeleted, reader: jspb.BinaryReader): SchemaVersionsDeleted; +} + +export namespace SchemaVersionsDeleted { + export type AsObject = { + schemaName: string, + versionsList: Array, + latestSchemaVersionId: string, + latestSchemaVersionNumber: number, + deletedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class SchemaDeleted extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): SchemaDeleted; + + hasDeletedAt(): boolean; + clearDeletedAt(): void; + getDeletedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setDeletedAt(value?: google_protobuf_timestamp_pb.Timestamp): SchemaDeleted; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaDeleted.AsObject; + static toObject(includeInstance: boolean, msg: SchemaDeleted): SchemaDeleted.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaDeleted, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaDeleted; + static deserializeBinaryFromReader(message: SchemaDeleted, reader: jspb.BinaryReader): SchemaDeleted; +} + +export namespace SchemaDeleted { + export type AsObject = { + schemaName: string, + deletedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class SchemaCompatibilityModeChanged extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): SchemaCompatibilityModeChanged; + getCompatibility(): kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode; + setCompatibility(value: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode): SchemaCompatibilityModeChanged; + + hasChangedAt(): boolean; + clearChangedAt(): void; + getChangedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setChangedAt(value?: google_protobuf_timestamp_pb.Timestamp): SchemaCompatibilityModeChanged; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaCompatibilityModeChanged.AsObject; + static toObject(includeInstance: boolean, msg: SchemaCompatibilityModeChanged): SchemaCompatibilityModeChanged.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaCompatibilityModeChanged, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaCompatibilityModeChanged; + static deserializeBinaryFromReader(message: SchemaCompatibilityModeChanged, reader: jspb.BinaryReader): SchemaCompatibilityModeChanged; +} + +export namespace SchemaCompatibilityModeChanged { + export type AsObject = { + schemaName: string, + compatibility: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode, + changedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class SchemaTagsUpdated extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): SchemaTagsUpdated; + + getTagsMap(): jspb.Map; + clearTagsMap(): void; + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): SchemaTagsUpdated; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaTagsUpdated.AsObject; + static toObject(includeInstance: boolean, msg: SchemaTagsUpdated): SchemaTagsUpdated.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaTagsUpdated, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaTagsUpdated; + static deserializeBinaryFromReader(message: SchemaTagsUpdated, reader: jspb.BinaryReader): SchemaTagsUpdated; +} + +export namespace SchemaTagsUpdated { + export type AsObject = { + schemaName: string, + + tagsMap: Array<[string, string]>, + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class SchemaDescriptionUpdated extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): SchemaDescriptionUpdated; + getDescription(): string; + setDescription(value: string): SchemaDescriptionUpdated; + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): SchemaDescriptionUpdated; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaDescriptionUpdated.AsObject; + static toObject(includeInstance: boolean, msg: SchemaDescriptionUpdated): SchemaDescriptionUpdated.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaDescriptionUpdated, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaDescriptionUpdated; + static deserializeBinaryFromReader(message: SchemaDescriptionUpdated, reader: jspb.BinaryReader): SchemaDescriptionUpdated; +} + +export namespace SchemaDescriptionUpdated { + export type AsObject = { + schemaName: string, + description: string, + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/events_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/events_pb.js new file mode 100644 index 00000000..32282037 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/events_pb.js @@ -0,0 +1,2057 @@ +// source: kurrentdb/protocols/v2/registry/events.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() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var kurrentdb_protocols_v2_registry_shared_pb = require('../../../../kurrentdb/protocols/v2/registry/shared_pb.js'); +goog.object.extend(proto, kurrentdb_protocols_v2_registry_shared_pb); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaCreated', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaDeleted', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted', 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.kurrentdb.protocol.registry.v2.SchemaCreated = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaCreated, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaCreated.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaCreated'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaDeleted, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaDeleted.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaDeleted'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaCreated.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + dataFormat: jspb.Message.getFieldWithDefault(msg, 3, 0), + compatibility: jspb.Message.getFieldWithDefault(msg, 4, 0), + tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [], + schemaVersionId: jspb.Message.getFieldWithDefault(msg, 6, ""), + schemaDefinition: msg.getSchemaDefinition_asB64(), + versionNumber: jspb.Message.getFieldWithDefault(msg, 8, 0), + createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaCreated; + return proto.kurrentdb.protocol.registry.v2.SchemaCreated.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.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.setSchemaName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (reader.readEnum()); + msg.setDataFormat(value); + break; + case 4: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (reader.readEnum()); + msg.setCompatibility(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 = /** @type {string} */ (reader.readString()); + msg.setSchemaVersionId(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSchemaDefinition(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersionNumber(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaCreated.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getDataFormat(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getCompatibility(); + if (f !== 0.0) { + writer.writeEnum( + 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.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getSchemaDefinition_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getVersionNumber(); + if (f !== 0) { + writer.writeInt32( + 8, + f + ); + } + f = message.getCreatedAt(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.clearDescription = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.hasDescription = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional SchemaDataFormat data_format = 3; + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.getDataFormat = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.setDataFormat = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional CompatibilityMode compatibility = 4; + * @return {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.getCompatibility = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.setCompatibility = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * map tags = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.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.kurrentdb.protocol.registry.v2.SchemaCreated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.clearTagsMap = function() { + this.getTagsMap().clear(); + return this;}; + + +/** + * optional string schema_version_id = 6; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional bytes schema_definition = 7; + * @return {!(string|Uint8Array)} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.getSchemaDefinition = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes schema_definition = 7; + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.getSchemaDefinition_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSchemaDefinition())); +}; + + +/** + * optional bytes schema_definition = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.getSchemaDefinition_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSchemaDefinition())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.setSchemaDefinition = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional int32 version_number = 8; + * @return {number} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.getVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.setVersionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional google.protobuf.Timestamp created_at = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.getCreatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.setCreatedAt = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCreated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.clearCreatedAt = function() { + return this.setCreatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCreated.prototype.hasCreatedAt = function() { + return jspb.Message.getField(this, 9) != 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.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.toObject = function(includeInstance, msg) { + var f, obj = { + schemaVersionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + schemaDefinition: msg.getSchemaDefinition_asB64(), + versionNumber: jspb.Message.getFieldWithDefault(msg, 3, 0), + schemaName: jspb.Message.getFieldWithDefault(msg, 4, ""), + dataFormat: jspb.Message.getFieldWithDefault(msg, 5, 0), + registeredAt: (f = msg.getRegisteredAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered; + return proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.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.setSchemaVersionId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSchemaDefinition(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersionNumber(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSchemaName(value); + break; + case 5: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (reader.readEnum()); + msg.setDataFormat(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setRegisteredAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSchemaDefinition_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getVersionNumber(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getDataFormat(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = message.getRegisteredAt(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_version_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes schema_definition = 2; + * @return {!(string|Uint8Array)} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.getSchemaDefinition = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes schema_definition = 2; + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.getSchemaDefinition_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSchemaDefinition())); +}; + + +/** + * optional bytes schema_definition = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.getSchemaDefinition_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSchemaDefinition())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.setSchemaDefinition = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int32 version_number = 3; + * @return {number} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.getVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.setVersionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string schema_name = 4; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional SchemaDataFormat data_format = 5; + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.getDataFormat = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.setDataFormat = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + +/** + * optional google.protobuf.Timestamp registered_at = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.getRegisteredAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.setRegisteredAt = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.clearRegisteredAt = function() { + return this.setRegisteredAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionRegistered.prototype.hasRegisteredAt = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.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.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + versionsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + latestSchemaVersionId: jspb.Message.getFieldWithDefault(msg, 3, ""), + latestSchemaVersionNumber: jspb.Message.getFieldWithDefault(msg, 4, 0), + deletedAt: (f = msg.getDeletedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted; + return proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.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.setSchemaName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addVersions(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLatestSchemaVersionId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLatestSchemaVersionNumber(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setDeletedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersionsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getLatestSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLatestSchemaVersionNumber(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getDeletedAt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string versions = 2; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.getVersionsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.setVersionsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.addVersions = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.clearVersionsList = function() { + return this.setVersionsList([]); +}; + + +/** + * optional string latest_schema_version_id = 3; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.getLatestSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.setLatestSchemaVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 latest_schema_version_number = 4; + * @return {number} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.getLatestSchemaVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.setLatestSchemaVersionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp deleted_at = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.getDeletedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.setDeletedAt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.clearDeletedAt = function() { + return this.setDeletedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersionsDeleted.prototype.hasDeletedAt = 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.kurrentdb.protocol.registry.v2.SchemaDeleted.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaDeleted.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDeleted} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + deletedAt: (f = msg.getDeletedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDeleted} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaDeleted; + return proto.kurrentdb.protocol.registry.v2.SchemaDeleted.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDeleted} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDeleted} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.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.setSchemaName(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setDeletedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaDeleted.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDeleted} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDeletedAt(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDeleted} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp deleted_at = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.prototype.getDeletedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDeleted} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.prototype.setDeletedAt = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDeleted} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.prototype.clearDeletedAt = function() { + return this.setDeletedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDeleted.prototype.hasDeletedAt = 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.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + compatibility: jspb.Message.getFieldWithDefault(msg, 2, 0), + changedAt: (f = msg.getChangedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged; + return proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.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.setSchemaName(value); + break; + case 2: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (reader.readEnum()); + msg.setCompatibility(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setChangedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCompatibility(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getChangedAt(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional CompatibilityMode compatibility = 2; + * @return {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.prototype.getCompatibility = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.prototype.setCompatibility = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp changed_at = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.prototype.getChangedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.prototype.setChangedAt = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.prototype.clearChangedAt = function() { + return this.setChangedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityModeChanged.prototype.hasChangedAt = 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.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [], + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated} + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated; + return proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated} + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.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.setSchemaName(value); + break; + case 2: + 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 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * map tags = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.prototype.getTagsMap = 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.kurrentdb.protocol.registry.v2.SchemaTagsUpdated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.prototype.clearTagsMap = function() { + this.getTagsMap().clear(); + return this;}; + + +/** + * optional google.protobuf.Timestamp updated_at = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.prototype.getUpdatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaTagsUpdated.prototype.hasUpdatedAt = 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.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated; + return proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.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.setSchemaName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp updated_at = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.prototype.getUpdatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDescriptionUpdated.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.kurrentdb.protocol.registry.v2); diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_grpc_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_pb.d.ts b/packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_pb.d.ts new file mode 100644 index 00000000..c9afd5ad --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_pb.d.ts @@ -0,0 +1,474 @@ +// package: kurrentdb.protocol.registry.v2 +// file: kurrentdb/protocols/v2/registry/groups.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb"; +import * as kurrentdb_protocols_v2_registry_shared_pb from "../../../../kurrentdb/protocols/v2/registry/shared_pb"; + +export class AutoRegistrationSettings extends jspb.Message { + getEnabled(): boolean; + setEnabled(value: boolean): AutoRegistrationSettings; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AutoRegistrationSettings.AsObject; + static toObject(includeInstance: boolean, msg: AutoRegistrationSettings): AutoRegistrationSettings.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AutoRegistrationSettings, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AutoRegistrationSettings; + static deserializeBinaryFromReader(message: AutoRegistrationSettings, reader: jspb.BinaryReader): AutoRegistrationSettings; +} + +export namespace AutoRegistrationSettings { + export type AsObject = { + enabled: boolean, + } +} + +export class ValidationSettings extends jspb.Message { + getEnabled(): boolean; + setEnabled(value: boolean): ValidationSettings; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidationSettings.AsObject; + static toObject(includeInstance: boolean, msg: ValidationSettings): ValidationSettings.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidationSettings, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidationSettings; + static deserializeBinaryFromReader(message: ValidationSettings, reader: jspb.BinaryReader): ValidationSettings; +} + +export namespace ValidationSettings { + export type AsObject = { + enabled: boolean, + } +} + +export class CompatibilitySettings extends jspb.Message { + getEnforce(): boolean; + setEnforce(value: boolean): CompatibilitySettings; + getMode(): kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode; + setMode(value: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode): CompatibilitySettings; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CompatibilitySettings.AsObject; + static toObject(includeInstance: boolean, msg: CompatibilitySettings): CompatibilitySettings.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CompatibilitySettings, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CompatibilitySettings; + static deserializeBinaryFromReader(message: CompatibilitySettings, reader: jspb.BinaryReader): CompatibilitySettings; +} + +export namespace CompatibilitySettings { + export type AsObject = { + enforce: boolean, + mode: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode, + } +} + +export class DataFormatSettings extends jspb.Message { + getEnforce(): boolean; + setEnforce(value: boolean): DataFormatSettings; + getFormat(): kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat; + setFormat(value: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat): DataFormatSettings; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DataFormatSettings.AsObject; + static toObject(includeInstance: boolean, msg: DataFormatSettings): DataFormatSettings.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DataFormatSettings, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DataFormatSettings; + static deserializeBinaryFromReader(message: DataFormatSettings, reader: jspb.BinaryReader): DataFormatSettings; +} + +export namespace DataFormatSettings { + export type AsObject = { + enforce: boolean, + format: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat, + } +} + +export class StreamFilter extends jspb.Message { + getFilterType(): StreamFilterType; + setFilterType(value: StreamFilterType): StreamFilter; + getExpression(): string; + setExpression(value: string): StreamFilter; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamFilter.AsObject; + static toObject(includeInstance: boolean, msg: StreamFilter): StreamFilter.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamFilter, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamFilter; + static deserializeBinaryFromReader(message: StreamFilter, reader: jspb.BinaryReader): StreamFilter; +} + +export namespace StreamFilter { + export type AsObject = { + filterType: StreamFilterType, + expression: string, + } +} + +export class StreamFilterSettings extends jspb.Message { + getEnforce(): boolean; + setEnforce(value: boolean): StreamFilterSettings; + + hasFilter(): boolean; + clearFilter(): void; + getFilter(): StreamFilter | undefined; + setFilter(value?: StreamFilter): StreamFilterSettings; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamFilterSettings.AsObject; + static toObject(includeInstance: boolean, msg: StreamFilterSettings): StreamFilterSettings.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamFilterSettings, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamFilterSettings; + static deserializeBinaryFromReader(message: StreamFilterSettings, reader: jspb.BinaryReader): StreamFilterSettings; +} + +export namespace StreamFilterSettings { + export type AsObject = { + enforce: boolean, + filter?: StreamFilter.AsObject, + } +} + +export class SchemaGroupDetails extends jspb.Message { + getName(): string; + setName(value: string): SchemaGroupDetails; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): SchemaGroupDetails; + + getTagsMap(): jspb.Map; + clearTagsMap(): void; + + hasAutoRegistration(): boolean; + clearAutoRegistration(): void; + getAutoRegistration(): AutoRegistrationSettings | undefined; + setAutoRegistration(value?: AutoRegistrationSettings): SchemaGroupDetails; + + hasValidation(): boolean; + clearValidation(): void; + getValidation(): ValidationSettings | undefined; + setValidation(value?: ValidationSettings): SchemaGroupDetails; + + hasCompatibility(): boolean; + clearCompatibility(): void; + getCompatibility(): CompatibilitySettings | undefined; + setCompatibility(value?: CompatibilitySettings): SchemaGroupDetails; + + hasDataFormat(): boolean; + clearDataFormat(): void; + getDataFormat(): DataFormatSettings | undefined; + setDataFormat(value?: DataFormatSettings): SchemaGroupDetails; + + hasStreamFilter(): boolean; + clearStreamFilter(): void; + getStreamFilter(): StreamFilterSettings | undefined; + setStreamFilter(value?: StreamFilterSettings): SchemaGroupDetails; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaGroupDetails.AsObject; + static toObject(includeInstance: boolean, msg: SchemaGroupDetails): SchemaGroupDetails.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaGroupDetails, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaGroupDetails; + static deserializeBinaryFromReader(message: SchemaGroupDetails, reader: jspb.BinaryReader): SchemaGroupDetails; +} + +export namespace SchemaGroupDetails { + export type AsObject = { + name: string, + description?: string, + + tagsMap: Array<[string, string]>, + autoRegistration?: AutoRegistrationSettings.AsObject, + validation?: ValidationSettings.AsObject, + compatibility?: CompatibilitySettings.AsObject, + dataFormat?: DataFormatSettings.AsObject, + streamFilter?: StreamFilterSettings.AsObject, + } +} + +export class SchemaGroup extends jspb.Message { + getGroupId(): string; + setGroupId(value: string): SchemaGroup; + + hasDetails(): boolean; + clearDetails(): void; + getDetails(): SchemaGroupDetails | undefined; + setDetails(value?: SchemaGroupDetails): SchemaGroup; + + hasCreatedAt(): boolean; + clearCreatedAt(): void; + getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): SchemaGroup; + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): SchemaGroup; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaGroup.AsObject; + static toObject(includeInstance: boolean, msg: SchemaGroup): SchemaGroup.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaGroup, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaGroup; + static deserializeBinaryFromReader(message: SchemaGroup, reader: jspb.BinaryReader): SchemaGroup; +} + +export namespace SchemaGroup { + export type AsObject = { + groupId: string, + details?: SchemaGroupDetails.AsObject, + createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class CreateSchemaGroupRequest extends jspb.Message { + + hasGroupId(): boolean; + clearGroupId(): void; + getGroupId(): string | undefined; + setGroupId(value: string): CreateSchemaGroupRequest; + + hasDetails(): boolean; + clearDetails(): void; + getDetails(): SchemaGroupDetails | undefined; + setDetails(value?: SchemaGroupDetails): CreateSchemaGroupRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateSchemaGroupRequest.AsObject; + static toObject(includeInstance: boolean, msg: CreateSchemaGroupRequest): CreateSchemaGroupRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateSchemaGroupRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateSchemaGroupRequest; + static deserializeBinaryFromReader(message: CreateSchemaGroupRequest, reader: jspb.BinaryReader): CreateSchemaGroupRequest; +} + +export namespace CreateSchemaGroupRequest { + export type AsObject = { + groupId?: string, + details?: SchemaGroupDetails.AsObject, + } +} + +export class CreateSchemaGroupResponse extends jspb.Message { + getGroupId(): string; + setGroupId(value: string): CreateSchemaGroupResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateSchemaGroupResponse.AsObject; + static toObject(includeInstance: boolean, msg: CreateSchemaGroupResponse): CreateSchemaGroupResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateSchemaGroupResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateSchemaGroupResponse; + static deserializeBinaryFromReader(message: CreateSchemaGroupResponse, reader: jspb.BinaryReader): CreateSchemaGroupResponse; +} + +export namespace CreateSchemaGroupResponse { + export type AsObject = { + groupId: string, + } +} + +export class UpdateSchemaGroupRequest extends jspb.Message { + getGroupId(): string; + setGroupId(value: string): UpdateSchemaGroupRequest; + + hasDetails(): boolean; + clearDetails(): void; + getDetails(): SchemaGroupDetails | undefined; + setDetails(value?: SchemaGroupDetails): UpdateSchemaGroupRequest; + + hasUpdateMask(): boolean; + clearUpdateMask(): void; + getUpdateMask(): google_protobuf_field_mask_pb.FieldMask | undefined; + setUpdateMask(value?: google_protobuf_field_mask_pb.FieldMask): UpdateSchemaGroupRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateSchemaGroupRequest.AsObject; + static toObject(includeInstance: boolean, msg: UpdateSchemaGroupRequest): UpdateSchemaGroupRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateSchemaGroupRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateSchemaGroupRequest; + static deserializeBinaryFromReader(message: UpdateSchemaGroupRequest, reader: jspb.BinaryReader): UpdateSchemaGroupRequest; +} + +export namespace UpdateSchemaGroupRequest { + export type AsObject = { + groupId: string, + details?: SchemaGroupDetails.AsObject, + updateMask?: google_protobuf_field_mask_pb.FieldMask.AsObject, + } +} + +export class UpdateSchemaGroupResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateSchemaGroupResponse.AsObject; + static toObject(includeInstance: boolean, msg: UpdateSchemaGroupResponse): UpdateSchemaGroupResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateSchemaGroupResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateSchemaGroupResponse; + static deserializeBinaryFromReader(message: UpdateSchemaGroupResponse, reader: jspb.BinaryReader): UpdateSchemaGroupResponse; +} + +export namespace UpdateSchemaGroupResponse { + export type AsObject = { + } +} + +export class DeleteSchemaGroupRequest extends jspb.Message { + getGroupId(): string; + setGroupId(value: string): DeleteSchemaGroupRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteSchemaGroupRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteSchemaGroupRequest): DeleteSchemaGroupRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteSchemaGroupRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteSchemaGroupRequest; + static deserializeBinaryFromReader(message: DeleteSchemaGroupRequest, reader: jspb.BinaryReader): DeleteSchemaGroupRequest; +} + +export namespace DeleteSchemaGroupRequest { + export type AsObject = { + groupId: string, + } +} + +export class DeleteSchemaGroupResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteSchemaGroupResponse.AsObject; + static toObject(includeInstance: boolean, msg: DeleteSchemaGroupResponse): DeleteSchemaGroupResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteSchemaGroupResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteSchemaGroupResponse; + static deserializeBinaryFromReader(message: DeleteSchemaGroupResponse, reader: jspb.BinaryReader): DeleteSchemaGroupResponse; +} + +export namespace DeleteSchemaGroupResponse { + export type AsObject = { + } +} + +export class GetSchemaGroupRequest extends jspb.Message { + getGroupId(): string; + setGroupId(value: string): GetSchemaGroupRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSchemaGroupRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetSchemaGroupRequest): GetSchemaGroupRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSchemaGroupRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSchemaGroupRequest; + static deserializeBinaryFromReader(message: GetSchemaGroupRequest, reader: jspb.BinaryReader): GetSchemaGroupRequest; +} + +export namespace GetSchemaGroupRequest { + export type AsObject = { + groupId: string, + } +} + +export class GetSchemaGroupResponse extends jspb.Message { + + hasGroup(): boolean; + clearGroup(): void; + getGroup(): SchemaGroup | undefined; + setGroup(value?: SchemaGroup): GetSchemaGroupResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSchemaGroupResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetSchemaGroupResponse): GetSchemaGroupResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSchemaGroupResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSchemaGroupResponse; + static deserializeBinaryFromReader(message: GetSchemaGroupResponse, reader: jspb.BinaryReader): GetSchemaGroupResponse; +} + +export namespace GetSchemaGroupResponse { + export type AsObject = { + group?: SchemaGroup.AsObject, + } +} + +export class ListSchemaGroupsRequest extends jspb.Message { + + hasGroupNamePrefix(): boolean; + clearGroupNamePrefix(): void; + getGroupNamePrefix(): google_protobuf_wrappers_pb.StringValue | undefined; + setGroupNamePrefix(value?: google_protobuf_wrappers_pb.StringValue): ListSchemaGroupsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListSchemaGroupsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListSchemaGroupsRequest): ListSchemaGroupsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListSchemaGroupsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListSchemaGroupsRequest; + static deserializeBinaryFromReader(message: ListSchemaGroupsRequest, reader: jspb.BinaryReader): ListSchemaGroupsRequest; +} + +export namespace ListSchemaGroupsRequest { + export type AsObject = { + groupNamePrefix?: google_protobuf_wrappers_pb.StringValue.AsObject, + } +} + +export class ListSchemaGroupsResponse extends jspb.Message { + clearGroupsList(): void; + getGroupsList(): Array; + setGroupsList(value: Array): ListSchemaGroupsResponse; + addGroups(value?: SchemaGroup, index?: number): SchemaGroup; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListSchemaGroupsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListSchemaGroupsResponse): ListSchemaGroupsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListSchemaGroupsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListSchemaGroupsResponse; + static deserializeBinaryFromReader(message: ListSchemaGroupsResponse, reader: jspb.BinaryReader): ListSchemaGroupsResponse; +} + +export namespace ListSchemaGroupsResponse { + export type AsObject = { + groupsList: Array, + } +} + +export enum StreamFilterType { + CONSUME_FILTER_TYPE_UNSPECIFIED = 0, + CONSUME_FILTER_TYPE_REGEX = 1, + CONSUME_FILTER_TYPE_CATEGORY = 2, +} diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_pb.js new file mode 100644 index 00000000..6bb27c7c --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_pb.js @@ -0,0 +1,3593 @@ +// source: kurrentdb/protocols/v2/registry/groups.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() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); +goog.object.extend(proto, google_protobuf_field_mask_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); +goog.object.extend(proto, google_protobuf_wrappers_pb); +var kurrentdb_protocols_v2_registry_shared_pb = require('../../../../kurrentdb/protocols/v2/registry/shared_pb.js'); +goog.object.extend(proto, kurrentdb_protocols_v2_registry_shared_pb); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CompatibilitySettings', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.DataFormatSettings', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaGroup', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.StreamFilter', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.StreamFilterSettings', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.StreamFilterType', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.ValidationSettings', 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.kurrentdb.protocol.registry.v2.AutoRegistrationSettings = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.displayName = 'proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.ValidationSettings = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.ValidationSettings, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.ValidationSettings.displayName = 'proto.kurrentdb.protocol.registry.v2.ValidationSettings'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.CompatibilitySettings = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.CompatibilitySettings, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.displayName = 'proto.kurrentdb.protocol.registry.v2.CompatibilitySettings'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.DataFormatSettings = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.DataFormatSettings, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.DataFormatSettings.displayName = 'proto.kurrentdb.protocol.registry.v2.DataFormatSettings'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.StreamFilter = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.StreamFilter, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.StreamFilter.displayName = 'proto.kurrentdb.protocol.registry.v2.StreamFilter'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.StreamFilterSettings, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.displayName = 'proto.kurrentdb.protocol.registry.v2.StreamFilterSettings'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaGroup, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaGroup.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaGroup'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.toObject = function(includeInstance, msg) { + var f, obj = { + enabled: 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.kurrentdb.protocol.registry.v2.AutoRegistrationSettings} + */ +proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings; + return proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings} + */ +proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.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.setEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnabled(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool enabled = 1; + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.prototype.getEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings} returns this + */ +proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.prototype.setEnabled = 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.kurrentdb.protocol.registry.v2.ValidationSettings.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.ValidationSettings.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.ValidationSettings} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ValidationSettings.toObject = function(includeInstance, msg) { + var f, obj = { + enabled: 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.kurrentdb.protocol.registry.v2.ValidationSettings} + */ +proto.kurrentdb.protocol.registry.v2.ValidationSettings.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.ValidationSettings; + return proto.kurrentdb.protocol.registry.v2.ValidationSettings.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.ValidationSettings} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.ValidationSettings} + */ +proto.kurrentdb.protocol.registry.v2.ValidationSettings.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.setEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.ValidationSettings.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.ValidationSettings.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.ValidationSettings} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ValidationSettings.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnabled(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool enabled = 1; + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.ValidationSettings.prototype.getEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.kurrentdb.protocol.registry.v2.ValidationSettings} returns this + */ +proto.kurrentdb.protocol.registry.v2.ValidationSettings.prototype.setEnabled = 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.kurrentdb.protocol.registry.v2.CompatibilitySettings.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.CompatibilitySettings} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.toObject = function(includeInstance, msg) { + var f, obj = { + enforce: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + mode: 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.kurrentdb.protocol.registry.v2.CompatibilitySettings} + */ +proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.CompatibilitySettings; + return proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.CompatibilitySettings} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.CompatibilitySettings} + */ +proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.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.setEnforce(value); + break; + case 2: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (reader.readEnum()); + msg.setMode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.CompatibilitySettings} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnforce(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getMode(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional bool enforce = 1; + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.prototype.getEnforce = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.kurrentdb.protocol.registry.v2.CompatibilitySettings} returns this + */ +proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.prototype.setEnforce = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional CompatibilityMode mode = 2; + * @return {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} + */ +proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.prototype.getMode = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} value + * @return {!proto.kurrentdb.protocol.registry.v2.CompatibilitySettings} returns this + */ +proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.prototype.setMode = 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.kurrentdb.protocol.registry.v2.DataFormatSettings.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.DataFormatSettings.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.DataFormatSettings} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DataFormatSettings.toObject = function(includeInstance, msg) { + var f, obj = { + enforce: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + format: 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.kurrentdb.protocol.registry.v2.DataFormatSettings} + */ +proto.kurrentdb.protocol.registry.v2.DataFormatSettings.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.DataFormatSettings; + return proto.kurrentdb.protocol.registry.v2.DataFormatSettings.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.DataFormatSettings} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.DataFormatSettings} + */ +proto.kurrentdb.protocol.registry.v2.DataFormatSettings.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.setEnforce(value); + break; + case 2: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (reader.readEnum()); + msg.setFormat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.DataFormatSettings.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.DataFormatSettings.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.DataFormatSettings} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DataFormatSettings.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnforce(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getFormat(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional bool enforce = 1; + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.DataFormatSettings.prototype.getEnforce = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.kurrentdb.protocol.registry.v2.DataFormatSettings} returns this + */ +proto.kurrentdb.protocol.registry.v2.DataFormatSettings.prototype.setEnforce = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional SchemaDataFormat format = 2; + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} + */ +proto.kurrentdb.protocol.registry.v2.DataFormatSettings.prototype.getFormat = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} value + * @return {!proto.kurrentdb.protocol.registry.v2.DataFormatSettings} returns this + */ +proto.kurrentdb.protocol.registry.v2.DataFormatSettings.prototype.setFormat = 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.kurrentdb.protocol.registry.v2.StreamFilter.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.StreamFilter.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.StreamFilter} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.StreamFilter.toObject = function(includeInstance, msg) { + var f, obj = { + filterType: jspb.Message.getFieldWithDefault(msg, 1, 0), + expression: 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.kurrentdb.protocol.registry.v2.StreamFilter} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilter.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.StreamFilter; + return proto.kurrentdb.protocol.registry.v2.StreamFilter.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.StreamFilter} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.StreamFilter} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilter.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.StreamFilterType} */ (reader.readEnum()); + msg.setFilterType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilter.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.StreamFilter.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.StreamFilter} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.StreamFilter.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFilterType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional StreamFilterType filter_type = 1; + * @return {!proto.kurrentdb.protocol.registry.v2.StreamFilterType} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilter.prototype.getFilterType = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.StreamFilterType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.StreamFilterType} value + * @return {!proto.kurrentdb.protocol.registry.v2.StreamFilter} returns this + */ +proto.kurrentdb.protocol.registry.v2.StreamFilter.prototype.setFilterType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string expression = 2; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilter.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.StreamFilter} returns this + */ +proto.kurrentdb.protocol.registry.v2.StreamFilter.prototype.setExpression = 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.kurrentdb.protocol.registry.v2.StreamFilterSettings.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.StreamFilterSettings} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.toObject = function(includeInstance, msg) { + var f, obj = { + enforce: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + filter: (f = msg.getFilter()) && proto.kurrentdb.protocol.registry.v2.StreamFilter.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.kurrentdb.protocol.registry.v2.StreamFilterSettings} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.StreamFilterSettings; + return proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.StreamFilterSettings} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.StreamFilterSettings} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.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.setEnforce(value); + break; + case 2: + var value = new proto.kurrentdb.protocol.registry.v2.StreamFilter; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.StreamFilter.deserializeBinaryFromReader); + msg.setFilter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.StreamFilterSettings} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnforce(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.kurrentdb.protocol.registry.v2.StreamFilter.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool enforce = 1; + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.prototype.getEnforce = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.kurrentdb.protocol.registry.v2.StreamFilterSettings} returns this + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.prototype.setEnforce = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional StreamFilter filter = 2; + * @return {?proto.kurrentdb.protocol.registry.v2.StreamFilter} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.prototype.getFilter = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.StreamFilter} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.StreamFilter, 2)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.StreamFilter|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.StreamFilterSettings} returns this +*/ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.prototype.setFilter = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.StreamFilterSettings} returns this + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.prototype.clearFilter = function() { + return this.setFilter(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.prototype.hasFilter = 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.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [], + autoRegistration: (f = msg.getAutoRegistration()) && proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.toObject(includeInstance, f), + validation: (f = msg.getValidation()) && proto.kurrentdb.protocol.registry.v2.ValidationSettings.toObject(includeInstance, f), + compatibility: (f = msg.getCompatibility()) && proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.toObject(includeInstance, f), + dataFormat: (f = msg.getDataFormat()) && proto.kurrentdb.protocol.registry.v2.DataFormatSettings.toObject(includeInstance, f), + streamFilter: (f = msg.getStreamFilter()) && proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.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.kurrentdb.protocol.registry.v2.SchemaGroupDetails} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails; + return proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + 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 11: + var value = new proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.deserializeBinaryFromReader); + msg.setAutoRegistration(value); + break; + case 12: + var value = new proto.kurrentdb.protocol.registry.v2.ValidationSettings; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.ValidationSettings.deserializeBinaryFromReader); + msg.setValidation(value); + break; + case 13: + var value = new proto.kurrentdb.protocol.registry.v2.CompatibilitySettings; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.deserializeBinaryFromReader); + msg.setCompatibility(value); + break; + case 14: + var value = new proto.kurrentdb.protocol.registry.v2.DataFormatSettings; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.DataFormatSettings.deserializeBinaryFromReader); + msg.setDataFormat(value); + break; + case 15: + var value = new proto.kurrentdb.protocol.registry.v2.StreamFilterSettings; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.deserializeBinaryFromReader); + msg.setStreamFilter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getAutoRegistration(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings.serializeBinaryToWriter + ); + } + f = message.getValidation(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.kurrentdb.protocol.registry.v2.ValidationSettings.serializeBinaryToWriter + ); + } + f = message.getCompatibility(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.kurrentdb.protocol.registry.v2.CompatibilitySettings.serializeBinaryToWriter + ); + } + f = message.getDataFormat(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.kurrentdb.protocol.registry.v2.DataFormatSettings.serializeBinaryToWriter + ); + } + f = message.getStreamFilter(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.kurrentdb.protocol.registry.v2.StreamFilterSettings.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.clearDescription = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.hasDescription = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * map tags = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.getTagsMap = 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.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.clearTagsMap = function() { + this.getTagsMap().clear(); + return this;}; + + +/** + * optional AutoRegistrationSettings auto_registration = 11; + * @return {?proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.getAutoRegistration = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings, 11)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.AutoRegistrationSettings|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.setAutoRegistration = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.clearAutoRegistration = function() { + return this.setAutoRegistration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.hasAutoRegistration = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ValidationSettings validation = 12; + * @return {?proto.kurrentdb.protocol.registry.v2.ValidationSettings} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.getValidation = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.ValidationSettings} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.ValidationSettings, 12)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.ValidationSettings|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.setValidation = function(value) { + return jspb.Message.setWrapperField(this, 12, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.clearValidation = function() { + return this.setValidation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.hasValidation = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional CompatibilitySettings compatibility = 13; + * @return {?proto.kurrentdb.protocol.registry.v2.CompatibilitySettings} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.getCompatibility = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.CompatibilitySettings} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.CompatibilitySettings, 13)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.CompatibilitySettings|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.setCompatibility = function(value) { + return jspb.Message.setWrapperField(this, 13, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.clearCompatibility = function() { + return this.setCompatibility(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.hasCompatibility = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional DataFormatSettings data_format = 14; + * @return {?proto.kurrentdb.protocol.registry.v2.DataFormatSettings} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.getDataFormat = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.DataFormatSettings} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.DataFormatSettings, 14)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.DataFormatSettings|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.setDataFormat = function(value) { + return jspb.Message.setWrapperField(this, 14, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.clearDataFormat = function() { + return this.setDataFormat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.hasDataFormat = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional StreamFilterSettings stream_filter = 15; + * @return {?proto.kurrentdb.protocol.registry.v2.StreamFilterSettings} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.getStreamFilter = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.StreamFilterSettings} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.StreamFilterSettings, 15)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.StreamFilterSettings|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.setStreamFilter = function(value) { + return jspb.Message.setWrapperField(this, 15, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.clearStreamFilter = function() { + return this.setStreamFilter(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.prototype.hasStreamFilter = function() { + return jspb.Message.getField(this, 15) != 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.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaGroup.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: jspb.Message.getFieldWithDefault(msg, 1, ""), + details: (f = msg.getDetails()) && proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.toObject(includeInstance, f), + createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaGroup; + return proto.kurrentdb.protocol.registry.v2.SchemaGroup.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.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.setGroupId(value); + break; + case 2: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.deserializeBinaryFromReader); + msg.setDetails(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreatedAt(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaGroup.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDetails(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.serializeBinaryToWriter + ); + } + f = message.getCreatedAt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string group_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.getGroupId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.setGroupId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional SchemaGroupDetails details = 2; + * @return {?proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.getDetails = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails, 2)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.setDetails = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.clearDetails = function() { + return this.setDetails(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.hasDetails = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Timestamp created_at = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.getCreatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.setCreatedAt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.clearCreatedAt = function() { + return this.setCreatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.hasCreatedAt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp updated_at = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.getUpdatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaGroup.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 6) != 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.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: jspb.Message.getFieldWithDefault(msg, 1, ""), + details: (f = msg.getDetails()) && proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.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.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest; + return proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.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.setGroupId(value); + break; + case 2: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.deserializeBinaryFromReader); + msg.setDetails(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getDetails(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string group_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.prototype.getGroupId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.prototype.setGroupId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.prototype.clearGroupId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.prototype.hasGroupId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional SchemaGroupDetails details = 2; + * @return {?proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.prototype.getDetails = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails, 2)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest} returns this +*/ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.prototype.setDetails = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.prototype.clearDetails = function() { + return this.setDetails(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest.prototype.hasDetails = 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.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: 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.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse; + return proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.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.setGroupId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string group_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.prototype.getGroupId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse.prototype.setGroupId = 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.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: jspb.Message.getFieldWithDefault(msg, 1, ""), + details: (f = msg.getDetails()) && proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.toObject(includeInstance, f), + updateMask: (f = msg.getUpdateMask()) && google_protobuf_field_mask_pb.FieldMask.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.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest; + return proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.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.setGroupId(value); + break; + case 2: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.deserializeBinaryFromReader); + msg.setDetails(value); + break; + case 3: + var value = new google_protobuf_field_mask_pb.FieldMask; + reader.readMessage(value,google_protobuf_field_mask_pb.FieldMask.deserializeBinaryFromReader); + msg.setUpdateMask(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDetails(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails.serializeBinaryToWriter + ); + } + f = message.getUpdateMask(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_field_mask_pb.FieldMask.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string group_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.getGroupId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.setGroupId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional SchemaGroupDetails details = 2; + * @return {?proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.getDetails = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails, 2)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.SchemaGroupDetails|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest} returns this +*/ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.setDetails = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.clearDetails = function() { + return this.setDetails(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.hasDetails = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.FieldMask update_mask = 3; + * @return {?proto.google.protobuf.FieldMask} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.getUpdateMask = function() { + return /** @type{?proto.google.protobuf.FieldMask} */ ( + jspb.Message.getWrapperField(this, google_protobuf_field_mask_pb.FieldMask, 3)); +}; + + +/** + * @param {?proto.google.protobuf.FieldMask|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest} returns this +*/ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.setUpdateMask = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.clearUpdateMask = function() { + return this.setUpdateMask(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest.prototype.hasUpdateMask = 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.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse; + return proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: 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.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest; + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.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.setGroupId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string group_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.prototype.getGroupId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest.prototype.setGroupId = 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.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse; + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.toObject = function(includeInstance, msg) { + var f, obj = { + groupId: 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.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest; + return proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.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.setGroupId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string group_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.prototype.getGroupId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupRequest.prototype.setGroupId = 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.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.toObject = function(includeInstance, msg) { + var f, obj = { + group: (f = msg.getGroup()) && proto.kurrentdb.protocol.registry.v2.SchemaGroup.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.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse; + return proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaGroup; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaGroup.deserializeBinaryFromReader); + msg.setGroup(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroup(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.SchemaGroup.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SchemaGroup group = 1; + * @return {?proto.kurrentdb.protocol.registry.v2.SchemaGroup} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.prototype.getGroup = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.SchemaGroup} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaGroup, 1)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.SchemaGroup|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.prototype.setGroup = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.prototype.clearGroup = function() { + return this.setGroup(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaGroupResponse.prototype.hasGroup = 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.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + groupNamePrefix: (f = msg.getGroupNamePrefix()) && google_protobuf_wrappers_pb.StringValue.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.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest; + return proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_wrappers_pb.StringValue; + reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader); + msg.setGroupNamePrefix(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupNamePrefix(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.StringValue group_name_prefix = 1; + * @return {?proto.google.protobuf.StringValue} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.prototype.getGroupNamePrefix = function() { + return /** @type{?proto.google.protobuf.StringValue} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 1)); +}; + + +/** + * @param {?proto.google.protobuf.StringValue|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest} returns this +*/ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.prototype.setGroupNamePrefix = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.prototype.clearGroupNamePrefix = function() { + return this.setGroupNamePrefix(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest.prototype.hasGroupNamePrefix = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.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.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + groupsList: jspb.Message.toObjectList(msg.getGroupsList(), + proto.kurrentdb.protocol.registry.v2.SchemaGroup.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.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse; + return proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaGroup; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaGroup.deserializeBinaryFromReader); + msg.addGroups(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.SchemaGroup.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SchemaGroup groups = 1; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.prototype.getGroupsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaGroup, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.prototype.setGroupsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaGroup=} opt_value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaGroup} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.prototype.addGroups = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.kurrentdb.protocol.registry.v2.SchemaGroup, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse.prototype.clearGroupsList = function() { + return this.setGroupsList([]); +}; + + +/** + * @enum {number} + */ +proto.kurrentdb.protocol.registry.v2.StreamFilterType = { + CONSUME_FILTER_TYPE_UNSPECIFIED: 0, + CONSUME_FILTER_TYPE_REGEX: 1, + CONSUME_FILTER_TYPE_CATEGORY: 2 +}; + +goog.object.extend(exports, proto.kurrentdb.protocol.registry.v2); diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_grpc_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_pb.d.ts b/packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_pb.d.ts new file mode 100644 index 00000000..50d07d3b --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_pb.d.ts @@ -0,0 +1,816 @@ +// package: kurrentdb.protocol.registry.v2 +// file: kurrentdb/protocols/v2/registry/schemas.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as kurrentdb_protocols_v2_registry_shared_pb from "../../../../kurrentdb/protocols/v2/registry/shared_pb"; + +export class SchemaDetails extends jspb.Message { + getDataFormat(): kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat; + setDataFormat(value: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat): SchemaDetails; + getCompatibility(): kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode; + setCompatibility(value: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode): SchemaDetails; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): SchemaDetails; + + getTagsMap(): jspb.Map; + clearTagsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaDetails.AsObject; + static toObject(includeInstance: boolean, msg: SchemaDetails): SchemaDetails.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaDetails, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaDetails; + static deserializeBinaryFromReader(message: SchemaDetails, reader: jspb.BinaryReader): SchemaDetails; +} + +export namespace SchemaDetails { + export type AsObject = { + dataFormat: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat, + compatibility: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode, + description?: string, + + tagsMap: Array<[string, string]>, + } +} + +export class CreateSchemaRequest extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): CreateSchemaRequest; + + hasDetails(): boolean; + clearDetails(): void; + getDetails(): SchemaDetails | undefined; + setDetails(value?: SchemaDetails): CreateSchemaRequest; + + hasSchemaDefinition(): boolean; + clearSchemaDefinition(): void; + getSchemaDefinition(): Uint8Array | string; + getSchemaDefinition_asU8(): Uint8Array; + getSchemaDefinition_asB64(): string; + setSchemaDefinition(value: Uint8Array | string): CreateSchemaRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateSchemaRequest.AsObject; + static toObject(includeInstance: boolean, msg: CreateSchemaRequest): CreateSchemaRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateSchemaRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateSchemaRequest; + static deserializeBinaryFromReader(message: CreateSchemaRequest, reader: jspb.BinaryReader): CreateSchemaRequest; +} + +export namespace CreateSchemaRequest { + export type AsObject = { + schemaName: string, + details?: SchemaDetails.AsObject, + schemaDefinition: Uint8Array | string, + } +} + +export class CreateSchemaResponse extends jspb.Message { + getSchemaVersionId(): string; + setSchemaVersionId(value: string): CreateSchemaResponse; + getVersionNumber(): number; + setVersionNumber(value: number): CreateSchemaResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateSchemaResponse.AsObject; + static toObject(includeInstance: boolean, msg: CreateSchemaResponse): CreateSchemaResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateSchemaResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateSchemaResponse; + static deserializeBinaryFromReader(message: CreateSchemaResponse, reader: jspb.BinaryReader): CreateSchemaResponse; +} + +export namespace CreateSchemaResponse { + export type AsObject = { + schemaVersionId: string, + versionNumber: number, + } +} + +export class UpdateSchemaRequest extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): UpdateSchemaRequest; + + hasDetails(): boolean; + clearDetails(): void; + getDetails(): SchemaDetails | undefined; + setDetails(value?: SchemaDetails): UpdateSchemaRequest; + + hasUpdateMask(): boolean; + clearUpdateMask(): void; + getUpdateMask(): google_protobuf_field_mask_pb.FieldMask | undefined; + setUpdateMask(value?: google_protobuf_field_mask_pb.FieldMask): UpdateSchemaRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateSchemaRequest.AsObject; + static toObject(includeInstance: boolean, msg: UpdateSchemaRequest): UpdateSchemaRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateSchemaRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateSchemaRequest; + static deserializeBinaryFromReader(message: UpdateSchemaRequest, reader: jspb.BinaryReader): UpdateSchemaRequest; +} + +export namespace UpdateSchemaRequest { + export type AsObject = { + schemaName: string, + details?: SchemaDetails.AsObject, + updateMask?: google_protobuf_field_mask_pb.FieldMask.AsObject, + } +} + +export class UpdateSchemaResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateSchemaResponse.AsObject; + static toObject(includeInstance: boolean, msg: UpdateSchemaResponse): UpdateSchemaResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateSchemaResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateSchemaResponse; + static deserializeBinaryFromReader(message: UpdateSchemaResponse, reader: jspb.BinaryReader): UpdateSchemaResponse; +} + +export namespace UpdateSchemaResponse { + export type AsObject = { + } +} + +export class DeleteSchemaRequest extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): DeleteSchemaRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteSchemaRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteSchemaRequest): DeleteSchemaRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteSchemaRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteSchemaRequest; + static deserializeBinaryFromReader(message: DeleteSchemaRequest, reader: jspb.BinaryReader): DeleteSchemaRequest; +} + +export namespace DeleteSchemaRequest { + export type AsObject = { + schemaName: string, + } +} + +export class DeleteSchemaResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteSchemaResponse.AsObject; + static toObject(includeInstance: boolean, msg: DeleteSchemaResponse): DeleteSchemaResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteSchemaResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteSchemaResponse; + static deserializeBinaryFromReader(message: DeleteSchemaResponse, reader: jspb.BinaryReader): DeleteSchemaResponse; +} + +export namespace DeleteSchemaResponse { + export type AsObject = { + } +} + +export class Schema extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): Schema; + + hasDetails(): boolean; + clearDetails(): void; + getDetails(): SchemaDetails | undefined; + setDetails(value?: SchemaDetails): Schema; + getLatestSchemaVersion(): number; + setLatestSchemaVersion(value: number): Schema; + + hasCreatedAt(): boolean; + clearCreatedAt(): void; + getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): Schema; + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): Schema; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Schema.AsObject; + static toObject(includeInstance: boolean, msg: Schema): Schema.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Schema, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Schema; + static deserializeBinaryFromReader(message: Schema, reader: jspb.BinaryReader): Schema; +} + +export namespace Schema { + export type AsObject = { + schemaName: string, + details?: SchemaDetails.AsObject, + latestSchemaVersion: number, + createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class GetSchemaRequest extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): GetSchemaRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSchemaRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetSchemaRequest): GetSchemaRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSchemaRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSchemaRequest; + static deserializeBinaryFromReader(message: GetSchemaRequest, reader: jspb.BinaryReader): GetSchemaRequest; +} + +export namespace GetSchemaRequest { + export type AsObject = { + schemaName: string, + } +} + +export class GetSchemaResponse extends jspb.Message { + + hasSchema(): boolean; + clearSchema(): void; + getSchema(): Schema | undefined; + setSchema(value?: Schema): GetSchemaResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSchemaResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetSchemaResponse): GetSchemaResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSchemaResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSchemaResponse; + static deserializeBinaryFromReader(message: GetSchemaResponse, reader: jspb.BinaryReader): GetSchemaResponse; +} + +export namespace GetSchemaResponse { + export type AsObject = { + schema?: Schema.AsObject, + } +} + +export class ListSchemasRequest extends jspb.Message { + + hasSchemaNamePrefix(): boolean; + clearSchemaNamePrefix(): void; + getSchemaNamePrefix(): string | undefined; + setSchemaNamePrefix(value: string): ListSchemasRequest; + + getSchemaTagsMap(): jspb.Map; + clearSchemaTagsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListSchemasRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListSchemasRequest): ListSchemasRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListSchemasRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListSchemasRequest; + static deserializeBinaryFromReader(message: ListSchemasRequest, reader: jspb.BinaryReader): ListSchemasRequest; +} + +export namespace ListSchemasRequest { + export type AsObject = { + schemaNamePrefix?: string, + + schemaTagsMap: Array<[string, string]>, + } +} + +export class ListSchemasResponse extends jspb.Message { + clearSchemasList(): void; + getSchemasList(): Array; + setSchemasList(value: Array): ListSchemasResponse; + addSchemas(value?: Schema, index?: number): Schema; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListSchemasResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListSchemasResponse): ListSchemasResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListSchemasResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListSchemasResponse; + static deserializeBinaryFromReader(message: ListSchemasResponse, reader: jspb.BinaryReader): ListSchemasResponse; +} + +export namespace ListSchemasResponse { + export type AsObject = { + schemasList: Array, + } +} + +export class LookupSchemaNameRequest extends jspb.Message { + getSchemaVersionId(): string; + setSchemaVersionId(value: string): LookupSchemaNameRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LookupSchemaNameRequest.AsObject; + static toObject(includeInstance: boolean, msg: LookupSchemaNameRequest): LookupSchemaNameRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LookupSchemaNameRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LookupSchemaNameRequest; + static deserializeBinaryFromReader(message: LookupSchemaNameRequest, reader: jspb.BinaryReader): LookupSchemaNameRequest; +} + +export namespace LookupSchemaNameRequest { + export type AsObject = { + schemaVersionId: string, + } +} + +export class LookupSchemaNameResponse extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): LookupSchemaNameResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LookupSchemaNameResponse.AsObject; + static toObject(includeInstance: boolean, msg: LookupSchemaNameResponse): LookupSchemaNameResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LookupSchemaNameResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LookupSchemaNameResponse; + static deserializeBinaryFromReader(message: LookupSchemaNameResponse, reader: jspb.BinaryReader): LookupSchemaNameResponse; +} + +export namespace LookupSchemaNameResponse { + export type AsObject = { + schemaName: string, + } +} + +export class RegisterSchemaVersionRequest extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): RegisterSchemaVersionRequest; + getSchemaDefinition(): Uint8Array | string; + getSchemaDefinition_asU8(): Uint8Array; + getSchemaDefinition_asB64(): string; + setSchemaDefinition(value: Uint8Array | string): RegisterSchemaVersionRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegisterSchemaVersionRequest.AsObject; + static toObject(includeInstance: boolean, msg: RegisterSchemaVersionRequest): RegisterSchemaVersionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RegisterSchemaVersionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegisterSchemaVersionRequest; + static deserializeBinaryFromReader(message: RegisterSchemaVersionRequest, reader: jspb.BinaryReader): RegisterSchemaVersionRequest; +} + +export namespace RegisterSchemaVersionRequest { + export type AsObject = { + schemaName: string, + schemaDefinition: Uint8Array | string, + } +} + +export class RegisterSchemaVersionResponse extends jspb.Message { + getSchemaVersionId(): string; + setSchemaVersionId(value: string): RegisterSchemaVersionResponse; + getVersionNumber(): number; + setVersionNumber(value: number): RegisterSchemaVersionResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegisterSchemaVersionResponse.AsObject; + static toObject(includeInstance: boolean, msg: RegisterSchemaVersionResponse): RegisterSchemaVersionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RegisterSchemaVersionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegisterSchemaVersionResponse; + static deserializeBinaryFromReader(message: RegisterSchemaVersionResponse, reader: jspb.BinaryReader): RegisterSchemaVersionResponse; +} + +export namespace RegisterSchemaVersionResponse { + export type AsObject = { + schemaVersionId: string, + versionNumber: number, + } +} + +export class DeleteSchemaVersionsRequest extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): DeleteSchemaVersionsRequest; + clearVersionsList(): void; + getVersionsList(): Array; + setVersionsList(value: Array): DeleteSchemaVersionsRequest; + addVersions(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteSchemaVersionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteSchemaVersionsRequest): DeleteSchemaVersionsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteSchemaVersionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteSchemaVersionsRequest; + static deserializeBinaryFromReader(message: DeleteSchemaVersionsRequest, reader: jspb.BinaryReader): DeleteSchemaVersionsRequest; +} + +export namespace DeleteSchemaVersionsRequest { + export type AsObject = { + schemaName: string, + versionsList: Array, + } +} + +export class DeleteSchemaVersionsResponse extends jspb.Message { + clearErrorsList(): void; + getErrorsList(): Array; + setErrorsList(value: Array): DeleteSchemaVersionsResponse; + addErrors(value?: DeleteSchemaVersionsResponse.SchemaVersionError, index?: number): DeleteSchemaVersionsResponse.SchemaVersionError; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteSchemaVersionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: DeleteSchemaVersionsResponse): DeleteSchemaVersionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteSchemaVersionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteSchemaVersionsResponse; + static deserializeBinaryFromReader(message: DeleteSchemaVersionsResponse, reader: jspb.BinaryReader): DeleteSchemaVersionsResponse; +} + +export namespace DeleteSchemaVersionsResponse { + export type AsObject = { + errorsList: Array, + } + + + export class SchemaVersionError extends jspb.Message { + getVersionNumber(): number; + setVersionNumber(value: number): SchemaVersionError; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaVersionError.AsObject; + static toObject(includeInstance: boolean, msg: SchemaVersionError): SchemaVersionError.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaVersionError, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaVersionError; + static deserializeBinaryFromReader(message: SchemaVersionError, reader: jspb.BinaryReader): SchemaVersionError; + } + + export namespace SchemaVersionError { + export type AsObject = { + versionNumber: number, + } + } + +} + +export class SchemaVersion extends jspb.Message { + getSchemaVersionId(): string; + setSchemaVersionId(value: string): SchemaVersion; + getVersionNumber(): number; + setVersionNumber(value: number): SchemaVersion; + getSchemaDefinition(): Uint8Array | string; + getSchemaDefinition_asU8(): Uint8Array; + getSchemaDefinition_asB64(): string; + setSchemaDefinition(value: Uint8Array | string): SchemaVersion; + getDataFormat(): kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat; + setDataFormat(value: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat): SchemaVersion; + + hasRegisteredAt(): boolean; + clearRegisteredAt(): void; + getRegisteredAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setRegisteredAt(value?: google_protobuf_timestamp_pb.Timestamp): SchemaVersion; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaVersion.AsObject; + static toObject(includeInstance: boolean, msg: SchemaVersion): SchemaVersion.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaVersion, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaVersion; + static deserializeBinaryFromReader(message: SchemaVersion, reader: jspb.BinaryReader): SchemaVersion; +} + +export namespace SchemaVersion { + export type AsObject = { + schemaVersionId: string, + versionNumber: number, + schemaDefinition: Uint8Array | string, + dataFormat: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat, + registeredAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class GetSchemaVersionByIdRequest extends jspb.Message { + getSchemaVersionId(): string; + setSchemaVersionId(value: string): GetSchemaVersionByIdRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSchemaVersionByIdRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetSchemaVersionByIdRequest): GetSchemaVersionByIdRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSchemaVersionByIdRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSchemaVersionByIdRequest; + static deserializeBinaryFromReader(message: GetSchemaVersionByIdRequest, reader: jspb.BinaryReader): GetSchemaVersionByIdRequest; +} + +export namespace GetSchemaVersionByIdRequest { + export type AsObject = { + schemaVersionId: string, + } +} + +export class GetSchemaVersionByIdResponse extends jspb.Message { + + hasVersion(): boolean; + clearVersion(): void; + getVersion(): SchemaVersion | undefined; + setVersion(value?: SchemaVersion): GetSchemaVersionByIdResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSchemaVersionByIdResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetSchemaVersionByIdResponse): GetSchemaVersionByIdResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSchemaVersionByIdResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSchemaVersionByIdResponse; + static deserializeBinaryFromReader(message: GetSchemaVersionByIdResponse, reader: jspb.BinaryReader): GetSchemaVersionByIdResponse; +} + +export namespace GetSchemaVersionByIdResponse { + export type AsObject = { + version?: SchemaVersion.AsObject, + } +} + +export class GetSchemaVersionRequest extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): GetSchemaVersionRequest; + + hasVersionNumber(): boolean; + clearVersionNumber(): void; + getVersionNumber(): number | undefined; + setVersionNumber(value: number): GetSchemaVersionRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSchemaVersionRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetSchemaVersionRequest): GetSchemaVersionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSchemaVersionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSchemaVersionRequest; + static deserializeBinaryFromReader(message: GetSchemaVersionRequest, reader: jspb.BinaryReader): GetSchemaVersionRequest; +} + +export namespace GetSchemaVersionRequest { + export type AsObject = { + schemaName: string, + versionNumber?: number, + } +} + +export class GetSchemaVersionResponse extends jspb.Message { + + hasVersion(): boolean; + clearVersion(): void; + getVersion(): SchemaVersion | undefined; + setVersion(value?: SchemaVersion): GetSchemaVersionResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSchemaVersionResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetSchemaVersionResponse): GetSchemaVersionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSchemaVersionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSchemaVersionResponse; + static deserializeBinaryFromReader(message: GetSchemaVersionResponse, reader: jspb.BinaryReader): GetSchemaVersionResponse; +} + +export namespace GetSchemaVersionResponse { + export type AsObject = { + version?: SchemaVersion.AsObject, + } +} + +export class ListSchemaVersionsRequest extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): ListSchemaVersionsRequest; + getIncludeDefinition(): boolean; + setIncludeDefinition(value: boolean): ListSchemaVersionsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListSchemaVersionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListSchemaVersionsRequest): ListSchemaVersionsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListSchemaVersionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListSchemaVersionsRequest; + static deserializeBinaryFromReader(message: ListSchemaVersionsRequest, reader: jspb.BinaryReader): ListSchemaVersionsRequest; +} + +export namespace ListSchemaVersionsRequest { + export type AsObject = { + schemaName: string, + includeDefinition: boolean, + } +} + +export class ListSchemaVersionsResponse extends jspb.Message { + clearVersionsList(): void; + getVersionsList(): Array; + setVersionsList(value: Array): ListSchemaVersionsResponse; + addVersions(value?: SchemaVersion, index?: number): SchemaVersion; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListSchemaVersionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListSchemaVersionsResponse): ListSchemaVersionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListSchemaVersionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListSchemaVersionsResponse; + static deserializeBinaryFromReader(message: ListSchemaVersionsResponse, reader: jspb.BinaryReader): ListSchemaVersionsResponse; +} + +export namespace ListSchemaVersionsResponse { + export type AsObject = { + versionsList: Array, + } +} + +export class RegisteredSchema extends jspb.Message { + getSchemaName(): string; + setSchemaName(value: string): RegisteredSchema; + getSchemaVersionId(): string; + setSchemaVersionId(value: string): RegisteredSchema; + getVersionNumber(): number; + setVersionNumber(value: number): RegisteredSchema; + getSchemaDefinition(): Uint8Array | string; + getSchemaDefinition_asU8(): Uint8Array; + getSchemaDefinition_asB64(): string; + setSchemaDefinition(value: Uint8Array | string): RegisteredSchema; + getDataFormat(): kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat; + setDataFormat(value: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat): RegisteredSchema; + getCompatibility(): kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode; + setCompatibility(value: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode): RegisteredSchema; + + getTagsMap(): jspb.Map; + clearTagsMap(): void; + + hasRegisteredAt(): boolean; + clearRegisteredAt(): void; + getRegisteredAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setRegisteredAt(value?: google_protobuf_timestamp_pb.Timestamp): RegisteredSchema; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegisteredSchema.AsObject; + static toObject(includeInstance: boolean, msg: RegisteredSchema): RegisteredSchema.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RegisteredSchema, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegisteredSchema; + static deserializeBinaryFromReader(message: RegisteredSchema, reader: jspb.BinaryReader): RegisteredSchema; +} + +export namespace RegisteredSchema { + export type AsObject = { + schemaName: string, + schemaVersionId: string, + versionNumber: number, + schemaDefinition: Uint8Array | string, + dataFormat: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat, + compatibility: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode, + + tagsMap: Array<[string, string]>, + registeredAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class ListRegisteredSchemasRequest extends jspb.Message { + + hasSchemaVersionId(): boolean; + clearSchemaVersionId(): void; + getSchemaVersionId(): string | undefined; + setSchemaVersionId(value: string): ListRegisteredSchemasRequest; + + hasSchemaNamePrefix(): boolean; + clearSchemaNamePrefix(): void; + getSchemaNamePrefix(): string | undefined; + setSchemaNamePrefix(value: string): ListRegisteredSchemasRequest; + + getSchemaTagsMap(): jspb.Map; + clearSchemaTagsMap(): void; + getIncludeDefinition(): boolean; + setIncludeDefinition(value: boolean): ListRegisteredSchemasRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListRegisteredSchemasRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListRegisteredSchemasRequest): ListRegisteredSchemasRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListRegisteredSchemasRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListRegisteredSchemasRequest; + static deserializeBinaryFromReader(message: ListRegisteredSchemasRequest, reader: jspb.BinaryReader): ListRegisteredSchemasRequest; +} + +export namespace ListRegisteredSchemasRequest { + export type AsObject = { + schemaVersionId?: string, + schemaNamePrefix?: string, + + schemaTagsMap: Array<[string, string]>, + includeDefinition: boolean, + } +} + +export class ListRegisteredSchemasResponse extends jspb.Message { + clearSchemasList(): void; + getSchemasList(): Array; + setSchemasList(value: Array): ListRegisteredSchemasResponse; + addSchemas(value?: RegisteredSchema, index?: number): RegisteredSchema; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListRegisteredSchemasResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListRegisteredSchemasResponse): ListRegisteredSchemasResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListRegisteredSchemasResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListRegisteredSchemasResponse; + static deserializeBinaryFromReader(message: ListRegisteredSchemasResponse, reader: jspb.BinaryReader): ListRegisteredSchemasResponse; +} + +export namespace ListRegisteredSchemasResponse { + export type AsObject = { + schemasList: Array, + } +} + +export class BulkRegisterSchemasRequest extends jspb.Message { + clearRequestsList(): void; + getRequestsList(): Array; + setRequestsList(value: Array): BulkRegisterSchemasRequest; + addRequests(value?: CreateSchemaRequest, index?: number): CreateSchemaRequest; + getKeepOrder(): boolean; + setKeepOrder(value: boolean): BulkRegisterSchemasRequest; + getStopOnError(): boolean; + setStopOnError(value: boolean): BulkRegisterSchemasRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BulkRegisterSchemasRequest.AsObject; + static toObject(includeInstance: boolean, msg: BulkRegisterSchemasRequest): BulkRegisterSchemasRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BulkRegisterSchemasRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BulkRegisterSchemasRequest; + static deserializeBinaryFromReader(message: BulkRegisterSchemasRequest, reader: jspb.BinaryReader): BulkRegisterSchemasRequest; +} + +export namespace BulkRegisterSchemasRequest { + export type AsObject = { + requestsList: Array, + keepOrder: boolean, + stopOnError: boolean, + } +} + +export class BulkRegisterSchemasResponse extends jspb.Message { + + hasDuration(): boolean; + clearDuration(): void; + getDuration(): google_protobuf_duration_pb.Duration | undefined; + setDuration(value?: google_protobuf_duration_pb.Duration): BulkRegisterSchemasResponse; + clearResponsesList(): void; + getResponsesList(): Array; + setResponsesList(value: Array): BulkRegisterSchemasResponse; + addResponses(value?: CreateSchemaResponse, index?: number): CreateSchemaResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BulkRegisterSchemasResponse.AsObject; + static toObject(includeInstance: boolean, msg: BulkRegisterSchemasResponse): BulkRegisterSchemasResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BulkRegisterSchemasResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BulkRegisterSchemasResponse; + static deserializeBinaryFromReader(message: BulkRegisterSchemasResponse, reader: jspb.BinaryReader): BulkRegisterSchemasResponse; +} + +export namespace BulkRegisterSchemasResponse { + export type AsObject = { + duration?: google_protobuf_duration_pb.Duration.AsObject, + responsesList: Array, + } +} diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_pb.js new file mode 100644 index 00000000..9aa6c857 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_pb.js @@ -0,0 +1,6412 @@ +// source: kurrentdb/protocols/v2/registry/schemas.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() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); +goog.object.extend(proto, google_protobuf_field_mask_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var kurrentdb_protocols_v2_registry_shared_pb = require('../../../../kurrentdb/protocols/v2/registry/shared_pb.js'); +goog.object.extend(proto, kurrentdb_protocols_v2_registry_shared_pb); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.GetSchemaRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.GetSchemaResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.ListSchemasRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.ListSchemasResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.RegisteredSchema', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.Schema', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaDetails', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaVersion', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse', 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.kurrentdb.protocol.registry.v2.SchemaDetails = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaDetails, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaDetails.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaDetails'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.Schema = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.Schema, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.Schema.displayName = 'proto.kurrentdb.protocol.registry.v2.Schema'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.GetSchemaRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.GetSchemaRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.GetSchemaResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.GetSchemaResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.ListSchemasRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.ListSchemasRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.ListSchemasResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.ListSchemasResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.displayName = 'proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaVersion, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaVersion.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaVersion'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.RegisteredSchema, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.RegisteredSchema.displayName = 'proto.kurrentdb.protocol.registry.v2.RegisteredSchema'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaDetails.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDetails} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.toObject = function(includeInstance, msg) { + var f, obj = { + dataFormat: jspb.Message.getFieldWithDefault(msg, 1, 0), + compatibility: jspb.Message.getFieldWithDefault(msg, 2, 0), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + tagsMap: (f = msg.getTagsMap()) ? 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.kurrentdb.protocol.registry.v2.SchemaDetails} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaDetails; + return proto.kurrentdb.protocol.registry.v2.SchemaDetails.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDetails} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDetails} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (reader.readEnum()); + msg.setDataFormat(value); + break; + case 2: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (reader.readEnum()); + msg.setCompatibility(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaDetails.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDetails} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataFormat(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getCompatibility(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = message.getTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional SchemaDataFormat data_format = 1; + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.getDataFormat = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.setDataFormat = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional CompatibilityMode compatibility = 2; + * @return {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.getCompatibility = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.setCompatibility = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.clearDescription = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.hasDescription = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * map tags = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.getTagsMap = 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.kurrentdb.protocol.registry.v2.SchemaDetails} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaDetails.prototype.clearTagsMap = function() { + this.getTagsMap().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.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + details: (f = msg.getDetails()) && proto.kurrentdb.protocol.registry.v2.SchemaDetails.toObject(includeInstance, f), + schemaDefinition: msg.getSchemaDefinition_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.kurrentdb.protocol.registry.v2.CreateSchemaRequest} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest; + return proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.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.setSchemaName(value); + break; + case 2: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaDetails; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaDetails.deserializeBinaryFromReader); + msg.setDetails(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSchemaDefinition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDetails(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.kurrentdb.protocol.registry.v2.SchemaDetails.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional SchemaDetails details = 2; + * @return {?proto.kurrentdb.protocol.registry.v2.SchemaDetails} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.getDetails = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.SchemaDetails} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaDetails, 2)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.SchemaDetails|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest} returns this +*/ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.setDetails = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.clearDetails = function() { + return this.setDetails(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.hasDetails = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes schema_definition = 3; + * @return {!(string|Uint8Array)} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.getSchemaDefinition = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes schema_definition = 3; + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.getSchemaDefinition_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSchemaDefinition())); +}; + + +/** + * optional bytes schema_definition = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.getSchemaDefinition_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSchemaDefinition())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.setSchemaDefinition = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.clearSchemaDefinition = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.prototype.hasSchemaDefinition = 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.kurrentdb.protocol.registry.v2.CreateSchemaResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.toObject = function(includeInstance, msg) { + var f, obj = { + schemaVersionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + versionNumber: 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.kurrentdb.protocol.registry.v2.CreateSchemaResponse} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse; + return proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.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.setSchemaVersionId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersionNumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersionNumber(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional string schema_version_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 version_number = 2; + * @return {number} + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.prototype.getVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.prototype.setVersionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + details: (f = msg.getDetails()) && proto.kurrentdb.protocol.registry.v2.SchemaDetails.toObject(includeInstance, f), + updateMask: (f = msg.getUpdateMask()) && google_protobuf_field_mask_pb.FieldMask.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.kurrentdb.protocol.registry.v2.UpdateSchemaRequest} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest; + return proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.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.setSchemaName(value); + break; + case 2: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaDetails; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaDetails.deserializeBinaryFromReader); + msg.setDetails(value); + break; + case 3: + var value = new google_protobuf_field_mask_pb.FieldMask; + reader.readMessage(value,google_protobuf_field_mask_pb.FieldMask.deserializeBinaryFromReader); + msg.setUpdateMask(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDetails(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.kurrentdb.protocol.registry.v2.SchemaDetails.serializeBinaryToWriter + ); + } + f = message.getUpdateMask(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_field_mask_pb.FieldMask.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional SchemaDetails details = 2; + * @return {?proto.kurrentdb.protocol.registry.v2.SchemaDetails} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.getDetails = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.SchemaDetails} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaDetails, 2)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.SchemaDetails|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest} returns this +*/ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.setDetails = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.clearDetails = function() { + return this.setDetails(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.hasDetails = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.FieldMask update_mask = 3; + * @return {?proto.google.protobuf.FieldMask} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.getUpdateMask = function() { + return /** @type{?proto.google.protobuf.FieldMask} */ ( + jspb.Message.getWrapperField(this, google_protobuf_field_mask_pb.FieldMask, 3)); +}; + + +/** + * @param {?proto.google.protobuf.FieldMask|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest} returns this +*/ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.setUpdateMask = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.clearUpdateMask = function() { + return this.setUpdateMask(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaRequest.prototype.hasUpdateMask = 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.kurrentdb.protocol.registry.v2.UpdateSchemaResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse; + return proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.UpdateSchemaResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: 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.kurrentdb.protocol.registry.v2.DeleteSchemaRequest} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest; + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.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.setSchemaName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaRequest.prototype.setSchemaName = 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.kurrentdb.protocol.registry.v2.DeleteSchemaResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse; + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.Schema.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.Schema} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.Schema.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + details: (f = msg.getDetails()) && proto.kurrentdb.protocol.registry.v2.SchemaDetails.toObject(includeInstance, f), + latestSchemaVersion: jspb.Message.getFieldWithDefault(msg, 4, 0), + createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} + */ +proto.kurrentdb.protocol.registry.v2.Schema.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.Schema; + return proto.kurrentdb.protocol.registry.v2.Schema.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.Schema} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} + */ +proto.kurrentdb.protocol.registry.v2.Schema.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.setSchemaName(value); + break; + case 2: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaDetails; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaDetails.deserializeBinaryFromReader); + msg.setDetails(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLatestSchemaVersion(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreatedAt(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.Schema.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.Schema} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.Schema.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDetails(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.kurrentdb.protocol.registry.v2.SchemaDetails.serializeBinaryToWriter + ); + } + f = message.getLatestSchemaVersion(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getCreatedAt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} returns this + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional SchemaDetails details = 2; + * @return {?proto.kurrentdb.protocol.registry.v2.SchemaDetails} + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.getDetails = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.SchemaDetails} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaDetails, 2)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.SchemaDetails|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} returns this +*/ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.setDetails = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} returns this + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.clearDetails = function() { + return this.setDetails(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.hasDetails = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int32 latest_schema_version = 4; + * @return {number} + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.getLatestSchemaVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} returns this + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.setLatestSchemaVersion = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp created_at = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.getCreatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} returns this +*/ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.setCreatedAt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} returns this + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.clearCreatedAt = function() { + return this.setCreatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.hasCreatedAt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp updated_at = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.getUpdatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} returns this +*/ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} returns this + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.Schema.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 6) != 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.kurrentdb.protocol.registry.v2.GetSchemaRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: 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.kurrentdb.protocol.registry.v2.GetSchemaRequest} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.GetSchemaRequest; + return proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaRequest} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.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.setSchemaName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaRequest.prototype.setSchemaName = 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.kurrentdb.protocol.registry.v2.GetSchemaResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.toObject = function(includeInstance, msg) { + var f, obj = { + schema: (f = msg.getSchema()) && proto.kurrentdb.protocol.registry.v2.Schema.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.kurrentdb.protocol.registry.v2.GetSchemaResponse} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.GetSchemaResponse; + return proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaResponse} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.Schema; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.Schema.deserializeBinaryFromReader); + msg.setSchema(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchema(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.Schema.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Schema schema = 1; + * @return {?proto.kurrentdb.protocol.registry.v2.Schema} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.prototype.getSchema = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.Schema} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.Schema, 1)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.Schema|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.prototype.setSchema = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.prototype.clearSchema = function() { + return this.setSchema(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaResponse.prototype.hasSchema = 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.kurrentdb.protocol.registry.v2.ListSchemasRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemasRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaNamePrefix: jspb.Message.getFieldWithDefault(msg, 1, ""), + schemaTagsMap: (f = msg.getSchemaTagsMap()) ? 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.kurrentdb.protocol.registry.v2.ListSchemasRequest} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.ListSchemasRequest; + return proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemasRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemasRequest} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.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.setSchemaNamePrefix(value); + break; + case 2: + var value = msg.getSchemaTagsMap(); + 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.kurrentdb.protocol.registry.v2.ListSchemasRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemasRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getSchemaTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string schema_name_prefix = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.prototype.getSchemaNamePrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.prototype.setSchemaNamePrefix = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.prototype.clearSchemaNamePrefix = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.prototype.hasSchemaNamePrefix = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * map schema_tags = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.prototype.getSchemaTagsMap = 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.kurrentdb.protocol.registry.v2.ListSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasRequest.prototype.clearSchemaTagsMap = function() { + this.getSchemaTagsMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.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.kurrentdb.protocol.registry.v2.ListSchemasResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemasResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.toObject = function(includeInstance, msg) { + var f, obj = { + schemasList: jspb.Message.toObjectList(msg.getSchemasList(), + proto.kurrentdb.protocol.registry.v2.Schema.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.kurrentdb.protocol.registry.v2.ListSchemasResponse} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.ListSchemasResponse; + return proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemasResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemasResponse} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.Schema; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.Schema.deserializeBinaryFromReader); + msg.addSchemas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemasResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemasList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.Schema.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Schema schemas = 1; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.prototype.getSchemasList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.Schema, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemasResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.prototype.setSchemasList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.Schema=} opt_value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.Schema} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.prototype.addSchemas = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.kurrentdb.protocol.registry.v2.Schema, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemasResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListSchemasResponse.prototype.clearSchemasList = function() { + return this.setSchemasList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaVersionId: 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.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest} + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest; + return proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest} + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.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.setSchemaVersionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema_version_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameRequest.prototype.setSchemaVersionId = 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.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: 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.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse} + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse; + return proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse} + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.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.setSchemaName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.LookupSchemaNameResponse.prototype.setSchemaName = 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.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + schemaDefinition: msg.getSchemaDefinition_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.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest; + return proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.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.setSchemaName(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSchemaDefinition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSchemaDefinition_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes schema_definition = 2; + * @return {!(string|Uint8Array)} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.prototype.getSchemaDefinition = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes schema_definition = 2; + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.prototype.getSchemaDefinition_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSchemaDefinition())); +}; + + +/** + * optional bytes schema_definition = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.prototype.getSchemaDefinition_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSchemaDefinition())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest.prototype.setSchemaDefinition = function(value) { + return jspb.Message.setProto3BytesField(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.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + schemaVersionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + versionNumber: 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.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse; + return proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.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.setSchemaVersionId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersionNumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersionNumber(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional string schema_version_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 version_number = 2; + * @return {number} + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.prototype.getVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse.prototype.setVersionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.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.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + versionsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest; + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.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.setSchemaName(value); + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addVersions(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersionsList(); + if (f.length > 0) { + writer.writePackedInt32( + 2, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated int32 versions = 2; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.prototype.getVersionsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.prototype.setVersionsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.prototype.addVersions = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest.prototype.clearVersionsList = function() { + return this.setVersionsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.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.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + errorsList: jspb.Message.toObjectList(msg.getErrorsList(), + proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.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.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse; + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.deserializeBinaryFromReader); + msg.addErrors(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getErrorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.toObject = function(includeInstance, msg) { + var f, obj = { + versionNumber: 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.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError; + return proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersionNumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersionNumber(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 version_number = 1; + * @return {number} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.prototype.getVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError} returns this + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError.prototype.setVersionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated SchemaVersionError errors = 1; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.prototype.getErrorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.prototype.setErrorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError=} opt_value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError} + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.prototype.addErrors = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.SchemaVersionError, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse.prototype.clearErrorsList = function() { + return this.setErrorsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaVersion.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.toObject = function(includeInstance, msg) { + var f, obj = { + schemaVersionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + versionNumber: jspb.Message.getFieldWithDefault(msg, 2, 0), + schemaDefinition: msg.getSchemaDefinition_asB64(), + dataFormat: jspb.Message.getFieldWithDefault(msg, 4, 0), + registeredAt: (f = msg.getRegisteredAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaVersion; + return proto.kurrentdb.protocol.registry.v2.SchemaVersion.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.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.setSchemaVersionId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersionNumber(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSchemaDefinition(value); + break; + case 4: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (reader.readEnum()); + msg.setDataFormat(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setRegisteredAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaVersion.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersionNumber(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getSchemaDefinition_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getDataFormat(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getRegisteredAt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_version_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 version_number = 2; + * @return {number} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.getVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.setVersionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes schema_definition = 3; + * @return {!(string|Uint8Array)} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.getSchemaDefinition = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes schema_definition = 3; + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.getSchemaDefinition_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSchemaDefinition())); +}; + + +/** + * optional bytes schema_definition = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.getSchemaDefinition_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSchemaDefinition())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.setSchemaDefinition = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional SchemaDataFormat data_format = 4; + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.getDataFormat = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.setDataFormat = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp registered_at = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.getRegisteredAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.setRegisteredAt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.clearRegisteredAt = function() { + return this.setRegisteredAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaVersion.prototype.hasRegisteredAt = 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.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaVersionId: 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.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest; + return proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.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.setSchemaVersionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema_version_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest.prototype.setSchemaVersionId = 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.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.toObject = function(includeInstance, msg) { + var f, obj = { + version: (f = msg.getVersion()) && proto.kurrentdb.protocol.registry.v2.SchemaVersion.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.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse; + return proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaVersion; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaVersion.deserializeBinaryFromReader); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.SchemaVersion.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SchemaVersion version = 1; + * @return {?proto.kurrentdb.protocol.registry.v2.SchemaVersion} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.prototype.getVersion = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.SchemaVersion} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaVersion, 1)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.SchemaVersion|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse.prototype.hasVersion = 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.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + versionNumber: 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.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest; + return proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.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.setSchemaName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersionNumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 version_number = 2; + * @return {number} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.prototype.getVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.prototype.setVersionNumber = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.prototype.clearVersionNumber = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionRequest.prototype.hasVersionNumber = 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.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + version: (f = msg.getVersion()) && proto.kurrentdb.protocol.registry.v2.SchemaVersion.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.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse; + return proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaVersion; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaVersion.deserializeBinaryFromReader); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.SchemaVersion.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SchemaVersion version = 1; + * @return {?proto.kurrentdb.protocol.registry.v2.SchemaVersion} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.prototype.getVersion = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.SchemaVersion} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaVersion, 1)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.SchemaVersion|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.GetSchemaVersionResponse.prototype.hasVersion = 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.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + includeDefinition: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest; + return proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.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.setSchemaName(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeDefinition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIncludeDefinition(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool include_definition = 2; + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.prototype.getIncludeDefinition = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest.prototype.setIncludeDefinition = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.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.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + versionsList: jspb.Message.toObjectList(msg.getVersionsList(), + proto.kurrentdb.protocol.registry.v2.SchemaVersion.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.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse; + return proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaVersion; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaVersion.deserializeBinaryFromReader); + msg.addVersions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.SchemaVersion.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SchemaVersion versions = 1; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.prototype.getVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaVersion, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.prototype.setVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaVersion=} opt_value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaVersion} + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.prototype.addVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.kurrentdb.protocol.registry.v2.SchemaVersion, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse.prototype.clearVersionsList = function() { + return this.setVersionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.RegisteredSchema.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + schemaVersionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + versionNumber: jspb.Message.getFieldWithDefault(msg, 3, 0), + schemaDefinition: msg.getSchemaDefinition_asB64(), + dataFormat: jspb.Message.getFieldWithDefault(msg, 5, 0), + compatibility: jspb.Message.getFieldWithDefault(msg, 6, 0), + tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [], + registeredAt: (f = msg.getRegisteredAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.RegisteredSchema; + return proto.kurrentdb.protocol.registry.v2.RegisteredSchema.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.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.setSchemaName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSchemaVersionId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersionNumber(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSchemaDefinition(value); + break; + case 5: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (reader.readEnum()); + msg.setDataFormat(value); + break; + case 6: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (reader.readEnum()); + msg.setCompatibility(value); + break; + case 7: + 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 8: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setRegisteredAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.RegisteredSchema.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersionNumber(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getSchemaDefinition_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getDataFormat(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = message.getCompatibility(); + if (f !== 0.0) { + writer.writeEnum( + 6, + f + ); + } + f = message.getTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getRegisteredAt(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.setSchemaName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string schema_version_id = 2; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int32 version_number = 3; + * @return {number} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.getVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.setVersionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes schema_definition = 4; + * @return {!(string|Uint8Array)} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.getSchemaDefinition = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes schema_definition = 4; + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.getSchemaDefinition_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSchemaDefinition())); +}; + + +/** + * optional bytes schema_definition = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.getSchemaDefinition_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSchemaDefinition())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.setSchemaDefinition = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional SchemaDataFormat data_format = 5; + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.getDataFormat = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.setDataFormat = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + +/** + * optional CompatibilityMode compatibility = 6; + * @return {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.getCompatibility = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.setCompatibility = function(value) { + return jspb.Message.setProto3EnumField(this, 6, value); +}; + + +/** + * map tags = 7; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.getTagsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 7, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.clearTagsMap = function() { + this.getTagsMap().clear(); + return this;}; + + +/** + * optional google.protobuf.Timestamp registered_at = 8; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.getRegisteredAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} returns this +*/ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.setRegisteredAt = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} returns this + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.clearRegisteredAt = function() { + return this.setRegisteredAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.RegisteredSchema.prototype.hasRegisteredAt = function() { + return jspb.Message.getField(this, 8) != 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.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaVersionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + schemaNamePrefix: jspb.Message.getFieldWithDefault(msg, 2, ""), + schemaTagsMap: (f = msg.getSchemaTagsMap()) ? f.toObject(includeInstance, undefined) : [], + includeDefinition: jspb.Message.getBooleanFieldWithDefault(msg, 4, 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.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest; + return proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.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.setSchemaVersionId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSchemaNamePrefix(value); + break; + case 3: + var value = msg.getSchemaTagsMap(); + 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 {boolean} */ (reader.readBool()); + msg.setIncludeDefinition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getSchemaTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getIncludeDefinition(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional string schema_version_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.clearSchemaVersionId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.hasSchemaVersionId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string schema_name_prefix = 2; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.getSchemaNamePrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.setSchemaNamePrefix = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.clearSchemaNamePrefix = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.hasSchemaNamePrefix = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * map schema_tags = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.getSchemaTagsMap = 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.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.clearSchemaTagsMap = function() { + this.getSchemaTagsMap().clear(); + return this;}; + + +/** + * optional bool include_definition = 4; + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.getIncludeDefinition = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest.prototype.setIncludeDefinition = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.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.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.toObject = function(includeInstance, msg) { + var f, obj = { + schemasList: jspb.Message.toObjectList(msg.getSchemasList(), + proto.kurrentdb.protocol.registry.v2.RegisteredSchema.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.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse; + return proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.RegisteredSchema; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.RegisteredSchema.deserializeBinaryFromReader); + msg.addSchemas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemasList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.RegisteredSchema.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated RegisteredSchema schemas = 1; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.prototype.getSchemasList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.RegisteredSchema, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.prototype.setSchemasList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema=} opt_value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.RegisteredSchema} + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.prototype.addSchemas = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.kurrentdb.protocol.registry.v2.RegisteredSchema, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse.prototype.clearSchemasList = function() { + return this.setSchemasList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.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.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestsList: jspb.Message.toObjectList(msg.getRequestsList(), + proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.toObject, includeInstance), + keepOrder: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + stopOnError: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest; + return proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.deserializeBinaryFromReader); + msg.addRequests(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setKeepOrder(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStopOnError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest.serializeBinaryToWriter + ); + } + f = message.getKeepOrder(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getStopOnError(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * repeated CreateSchemaRequest requests = 1; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.prototype.getRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest} returns this +*/ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.prototype.setRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.prototype.addRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.kurrentdb.protocol.registry.v2.CreateSchemaRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.prototype.clearRequestsList = function() { + return this.setRequestsList([]); +}; + + +/** + * optional bool keep_order = 2; + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.prototype.getKeepOrder = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.prototype.setKeepOrder = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bool stop_on_error = 3; + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.prototype.getStopOnError = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest.prototype.setStopOnError = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.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.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.toObject = function(includeInstance, msg) { + var f, obj = { + duration: (f = msg.getDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + responsesList: jspb.Message.toObjectList(msg.getResponsesList(), + proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.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.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse; + return proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setDuration(value); + break; + case 2: + var value = new proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.deserializeBinaryFromReader); + msg.addResponses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDuration(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Duration duration = 1; + * @return {?proto.google.protobuf.Duration} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.prototype.getDuration = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.prototype.setDuration = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.prototype.clearDuration = function() { + return this.setDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.prototype.hasDuration = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated CreateSchemaResponse responses = 2; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.prototype.getResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.prototype.setResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse} + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.prototype.addResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.kurrentdb.protocol.registry.v2.CreateSchemaResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse.prototype.clearResponsesList = function() { + return this.setResponsesList([]); +}; + + +goog.object.extend(exports, proto.kurrentdb.protocol.registry.v2); diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.d.ts b/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.d.ts new file mode 100644 index 00000000..7744e3fa --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.d.ts @@ -0,0 +1,350 @@ +// package: kurrentdb.protocol.registry.v2 +// file: kurrentdb/protocols/v2/registry/service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import * as kurrentdb_protocols_v2_registry_service_pb from "../../../../kurrentdb/protocols/v2/registry/service_pb"; +import * as kurrentdb_protocols_v2_registry_groups_pb from "../../../../kurrentdb/protocols/v2/registry/groups_pb"; +import * as kurrentdb_protocols_v2_registry_schemas_pb from "../../../../kurrentdb/protocols/v2/registry/schemas_pb"; +import * as kurrentdb_protocols_v2_registry_validation_pb from "../../../../kurrentdb/protocols/v2/registry/validation_pb"; + +interface ISchemaRegistryServiceService extends grpc.ServiceDefinition { + createSchemaGroup: ISchemaRegistryServiceService_ICreateSchemaGroup; + updateSchemaGroup: ISchemaRegistryServiceService_IUpdateSchemaGroup; + deleteSchemaGroup: ISchemaRegistryServiceService_IDeleteSchemaGroup; + getSchemaGroup: ISchemaRegistryServiceService_IGetSchemaGroup; + listSchemaGroups: ISchemaRegistryServiceService_IListSchemaGroups; + createSchema: ISchemaRegistryServiceService_ICreateSchema; + updateSchema: ISchemaRegistryServiceService_IUpdateSchema; + deleteSchema: ISchemaRegistryServiceService_IDeleteSchema; + getSchema: ISchemaRegistryServiceService_IGetSchema; + listSchemas: ISchemaRegistryServiceService_IListSchemas; + lookupSchemaName: ISchemaRegistryServiceService_ILookupSchemaName; + registerSchemaVersion: ISchemaRegistryServiceService_IRegisterSchemaVersion; + deleteSchemaVersions: ISchemaRegistryServiceService_IDeleteSchemaVersions; + getSchemaVersion: ISchemaRegistryServiceService_IGetSchemaVersion; + getSchemaVersionById: ISchemaRegistryServiceService_IGetSchemaVersionById; + listSchemaVersions: ISchemaRegistryServiceService_IListSchemaVersions; + listRegisteredSchemas: ISchemaRegistryServiceService_IListRegisteredSchemas; + bulkRegisterSchemas: ISchemaRegistryServiceService_IBulkRegisterSchemas; + checkSchemaCompatibility: ISchemaRegistryServiceService_ICheckSchemaCompatibility; +} + +interface ISchemaRegistryServiceService_ICreateSchemaGroup extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/CreateSchemaGroup"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IUpdateSchemaGroup extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/UpdateSchemaGroup"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IDeleteSchemaGroup extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/DeleteSchemaGroup"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IGetSchemaGroup extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/GetSchemaGroup"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IListSchemaGroups extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/ListSchemaGroups"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_ICreateSchema extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/CreateSchema"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IUpdateSchema extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/UpdateSchema"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IDeleteSchema extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/DeleteSchema"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IGetSchema extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/GetSchema"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IListSchemas extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/ListSchemas"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_ILookupSchemaName extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/LookupSchemaName"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IRegisterSchemaVersion extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/RegisterSchemaVersion"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IDeleteSchemaVersions extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/DeleteSchemaVersions"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IGetSchemaVersion extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/GetSchemaVersion"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IGetSchemaVersionById extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/GetSchemaVersionById"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IListSchemaVersions extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/ListSchemaVersions"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IListRegisteredSchemas extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/ListRegisteredSchemas"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_IBulkRegisterSchemas extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/BulkRegisterSchemas"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ISchemaRegistryServiceService_ICheckSchemaCompatibility extends grpc.MethodDefinition { + path: "/kurrentdb.protocol.registry.v2.SchemaRegistryService/CheckSchemaCompatibility"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const SchemaRegistryServiceService: ISchemaRegistryServiceService; + +export interface ISchemaRegistryServiceServer extends grpc.UntypedServiceImplementation { + createSchemaGroup: grpc.handleUnaryCall; + updateSchemaGroup: grpc.handleUnaryCall; + deleteSchemaGroup: grpc.handleUnaryCall; + getSchemaGroup: grpc.handleUnaryCall; + listSchemaGroups: grpc.handleUnaryCall; + createSchema: grpc.handleUnaryCall; + updateSchema: grpc.handleUnaryCall; + deleteSchema: grpc.handleUnaryCall; + getSchema: grpc.handleUnaryCall; + listSchemas: grpc.handleUnaryCall; + lookupSchemaName: grpc.handleUnaryCall; + registerSchemaVersion: grpc.handleUnaryCall; + deleteSchemaVersions: grpc.handleUnaryCall; + getSchemaVersion: grpc.handleUnaryCall; + getSchemaVersionById: grpc.handleUnaryCall; + listSchemaVersions: grpc.handleUnaryCall; + listRegisteredSchemas: grpc.handleUnaryCall; + bulkRegisterSchemas: grpc.handleUnaryCall; + checkSchemaCompatibility: grpc.handleUnaryCall; +} + +export interface ISchemaRegistryServiceClient { + createSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + createSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + createSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + updateSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + updateSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + updateSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + deleteSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupResponse) => void): grpc.ClientUnaryCall; + deleteSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupResponse) => void): grpc.ClientUnaryCall; + deleteSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupResponse) => void): grpc.ClientUnaryCall; + getSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupResponse) => void): grpc.ClientUnaryCall; + getSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupResponse) => void): grpc.ClientUnaryCall; + getSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupResponse) => void): grpc.ClientUnaryCall; + listSchemaGroups(request: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsResponse) => void): grpc.ClientUnaryCall; + listSchemaGroups(request: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsResponse) => void): grpc.ClientUnaryCall; + listSchemaGroups(request: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsResponse) => void): grpc.ClientUnaryCall; + createSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaResponse) => void): grpc.ClientUnaryCall; + createSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaResponse) => void): grpc.ClientUnaryCall; + createSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaResponse) => void): grpc.ClientUnaryCall; + updateSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaResponse) => void): grpc.ClientUnaryCall; + updateSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaResponse) => void): grpc.ClientUnaryCall; + updateSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaResponse) => void): grpc.ClientUnaryCall; + deleteSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaResponse) => void): grpc.ClientUnaryCall; + deleteSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaResponse) => void): grpc.ClientUnaryCall; + deleteSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaResponse) => void): grpc.ClientUnaryCall; + getSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaResponse) => void): grpc.ClientUnaryCall; + getSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaResponse) => void): grpc.ClientUnaryCall; + getSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaResponse) => void): grpc.ClientUnaryCall; + listSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasResponse) => void): grpc.ClientUnaryCall; + listSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasResponse) => void): grpc.ClientUnaryCall; + listSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasResponse) => void): grpc.ClientUnaryCall; + lookupSchemaName(request: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameResponse) => void): grpc.ClientUnaryCall; + lookupSchemaName(request: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameResponse) => void): grpc.ClientUnaryCall; + lookupSchemaName(request: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameResponse) => void): grpc.ClientUnaryCall; + registerSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionResponse) => void): grpc.ClientUnaryCall; + registerSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionResponse) => void): grpc.ClientUnaryCall; + registerSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionResponse) => void): grpc.ClientUnaryCall; + deleteSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + deleteSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + deleteSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + getSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionResponse) => void): grpc.ClientUnaryCall; + getSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionResponse) => void): grpc.ClientUnaryCall; + getSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionResponse) => void): grpc.ClientUnaryCall; + getSchemaVersionById(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdResponse) => void): grpc.ClientUnaryCall; + getSchemaVersionById(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdResponse) => void): grpc.ClientUnaryCall; + getSchemaVersionById(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdResponse) => void): grpc.ClientUnaryCall; + listSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + listSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + listSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + listRegisteredSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasResponse) => void): grpc.ClientUnaryCall; + listRegisteredSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasResponse) => void): grpc.ClientUnaryCall; + listRegisteredSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasResponse) => void): grpc.ClientUnaryCall; + bulkRegisterSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse) => void): grpc.ClientUnaryCall; + bulkRegisterSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse) => void): grpc.ClientUnaryCall; + bulkRegisterSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse) => void): grpc.ClientUnaryCall; + checkSchemaCompatibility(request: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityResponse) => void): grpc.ClientUnaryCall; + checkSchemaCompatibility(request: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityResponse) => void): grpc.ClientUnaryCall; + checkSchemaCompatibility(request: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityResponse) => void): grpc.ClientUnaryCall; +} + +export class SchemaRegistryServiceClient extends grpc.Client implements ISchemaRegistryServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public createSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public createSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public createSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public updateSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public updateSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public updateSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public deleteSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public deleteSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public deleteSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public getSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public getSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public getSchemaGroup(request: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupResponse) => void): grpc.ClientUnaryCall; + public listSchemaGroups(request: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsResponse) => void): grpc.ClientUnaryCall; + public listSchemaGroups(request: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsResponse) => void): grpc.ClientUnaryCall; + public listSchemaGroups(request: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsResponse) => void): grpc.ClientUnaryCall; + public createSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaResponse) => void): grpc.ClientUnaryCall; + public createSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaResponse) => void): grpc.ClientUnaryCall; + public createSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaResponse) => void): grpc.ClientUnaryCall; + public updateSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaResponse) => void): grpc.ClientUnaryCall; + public updateSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaResponse) => void): grpc.ClientUnaryCall; + public updateSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaResponse) => void): grpc.ClientUnaryCall; + public deleteSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaResponse) => void): grpc.ClientUnaryCall; + public deleteSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaResponse) => void): grpc.ClientUnaryCall; + public deleteSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaResponse) => void): grpc.ClientUnaryCall; + public getSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaResponse) => void): grpc.ClientUnaryCall; + public getSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaResponse) => void): grpc.ClientUnaryCall; + public getSchema(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaResponse) => void): grpc.ClientUnaryCall; + public listSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasResponse) => void): grpc.ClientUnaryCall; + public listSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasResponse) => void): grpc.ClientUnaryCall; + public listSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasResponse) => void): grpc.ClientUnaryCall; + public lookupSchemaName(request: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameResponse) => void): grpc.ClientUnaryCall; + public lookupSchemaName(request: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameResponse) => void): grpc.ClientUnaryCall; + public lookupSchemaName(request: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameResponse) => void): grpc.ClientUnaryCall; + public registerSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionResponse) => void): grpc.ClientUnaryCall; + public registerSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionResponse) => void): grpc.ClientUnaryCall; + public registerSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionResponse) => void): grpc.ClientUnaryCall; + public deleteSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + public deleteSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + public deleteSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + public getSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionResponse) => void): grpc.ClientUnaryCall; + public getSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionResponse) => void): grpc.ClientUnaryCall; + public getSchemaVersion(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionResponse) => void): grpc.ClientUnaryCall; + public getSchemaVersionById(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdResponse) => void): grpc.ClientUnaryCall; + public getSchemaVersionById(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdResponse) => void): grpc.ClientUnaryCall; + public getSchemaVersionById(request: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdResponse) => void): grpc.ClientUnaryCall; + public listSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + public listSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + public listSchemaVersions(request: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsResponse) => void): grpc.ClientUnaryCall; + public listRegisteredSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasResponse) => void): grpc.ClientUnaryCall; + public listRegisteredSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasResponse) => void): grpc.ClientUnaryCall; + public listRegisteredSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasResponse) => void): grpc.ClientUnaryCall; + public bulkRegisterSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse) => void): grpc.ClientUnaryCall; + public bulkRegisterSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse) => void): grpc.ClientUnaryCall; + public bulkRegisterSchemas(request: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse) => void): grpc.ClientUnaryCall; + public checkSchemaCompatibility(request: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityRequest, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityResponse) => void): grpc.ClientUnaryCall; + public checkSchemaCompatibility(request: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityResponse) => void): grpc.ClientUnaryCall; + public checkSchemaCompatibility(request: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityResponse) => void): grpc.ClientUnaryCall; +} diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.js new file mode 100644 index 00000000..0402c6be --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.js @@ -0,0 +1,654 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var kurrentdb_protocols_v2_registry_groups_pb = require('../../../../kurrentdb/protocols/v2/registry/groups_pb.js'); +var kurrentdb_protocols_v2_registry_schemas_pb = require('../../../../kurrentdb/protocols/v2/registry/schemas_pb.js'); +var kurrentdb_protocols_v2_registry_validation_pb = require('../../../../kurrentdb/protocols/v2/registry/validation_pb.js'); + +function serialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_CheckSchemaCompatibilityRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_CheckSchemaCompatibilityRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_CheckSchemaCompatibilityResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_CheckSchemaCompatibilityResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_CreateSchemaGroupRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.CreateSchemaGroupRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_CreateSchemaGroupRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_CreateSchemaGroupResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.CreateSchemaGroupResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_CreateSchemaGroupResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_CreateSchemaRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.CreateSchemaRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_CreateSchemaRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_CreateSchemaResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.CreateSchemaResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_CreateSchemaResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_DeleteSchemaGroupRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.DeleteSchemaGroupRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaGroupRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_DeleteSchemaGroupResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.DeleteSchemaGroupResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaGroupResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_DeleteSchemaRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.DeleteSchemaRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_DeleteSchemaResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.DeleteSchemaResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_DeleteSchemaVersionsRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.DeleteSchemaVersionsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaVersionsRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_DeleteSchemaVersionsResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.DeleteSchemaVersionsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaVersionsResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_GetSchemaGroupRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.GetSchemaGroupRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_GetSchemaGroupRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_GetSchemaGroupResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.GetSchemaGroupResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_GetSchemaGroupResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_GetSchemaRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.GetSchemaRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_GetSchemaRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_GetSchemaResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.GetSchemaResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_GetSchemaResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_GetSchemaVersionByIdRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.GetSchemaVersionByIdRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_GetSchemaVersionByIdRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_GetSchemaVersionByIdResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.GetSchemaVersionByIdResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_GetSchemaVersionByIdResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_GetSchemaVersionRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.GetSchemaVersionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_GetSchemaVersionRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_GetSchemaVersionResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.GetSchemaVersionResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_GetSchemaVersionResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_ListRegisteredSchemasRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.ListRegisteredSchemasRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_ListRegisteredSchemasRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_ListRegisteredSchemasResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.ListRegisteredSchemasResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_ListRegisteredSchemasResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_ListSchemaGroupsRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.ListSchemaGroupsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_ListSchemaGroupsRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_ListSchemaGroupsResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.ListSchemaGroupsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_ListSchemaGroupsResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_ListSchemaVersionsRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.ListSchemaVersionsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_ListSchemaVersionsRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_ListSchemaVersionsResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.ListSchemaVersionsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_ListSchemaVersionsResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_ListSchemasRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.ListSchemasRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_ListSchemasRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_ListSchemasResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.ListSchemasResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_ListSchemasResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_LookupSchemaNameRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.LookupSchemaNameRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_LookupSchemaNameRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_LookupSchemaNameResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.LookupSchemaNameResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_LookupSchemaNameResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_RegisterSchemaVersionRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.RegisterSchemaVersionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_RegisterSchemaVersionRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_RegisterSchemaVersionResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.RegisterSchemaVersionResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_RegisterSchemaVersionResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_UpdateSchemaGroupRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.UpdateSchemaGroupRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_UpdateSchemaGroupRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_UpdateSchemaGroupResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.UpdateSchemaGroupResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_UpdateSchemaGroupResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_UpdateSchemaRequest(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaRequest)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.UpdateSchemaRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_UpdateSchemaRequest(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_kurrentdb_protocol_registry_v2_UpdateSchemaResponse(arg) { + if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaResponse)) { + throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.UpdateSchemaResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_kurrentdb_protocol_registry_v2_UpdateSchemaResponse(buffer_arg) { + return kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var SchemaRegistryServiceService = exports.SchemaRegistryServiceService = { + createSchemaGroup: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/CreateSchemaGroup', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupRequest, + responseType: kurrentdb_protocols_v2_registry_groups_pb.CreateSchemaGroupResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_CreateSchemaGroupRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_CreateSchemaGroupRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_CreateSchemaGroupResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_CreateSchemaGroupResponse, + }, + updateSchemaGroup: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/UpdateSchemaGroup', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupRequest, + responseType: kurrentdb_protocols_v2_registry_groups_pb.UpdateSchemaGroupResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_UpdateSchemaGroupRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_UpdateSchemaGroupRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_UpdateSchemaGroupResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_UpdateSchemaGroupResponse, + }, + deleteSchemaGroup: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/DeleteSchemaGroup', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupRequest, + responseType: kurrentdb_protocols_v2_registry_groups_pb.DeleteSchemaGroupResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_DeleteSchemaGroupRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaGroupRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_DeleteSchemaGroupResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaGroupResponse, + }, + getSchemaGroup: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/GetSchemaGroup', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupRequest, + responseType: kurrentdb_protocols_v2_registry_groups_pb.GetSchemaGroupResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_GetSchemaGroupRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_GetSchemaGroupRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_GetSchemaGroupResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_GetSchemaGroupResponse, + }, + listSchemaGroups: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/ListSchemaGroups', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsRequest, + responseType: kurrentdb_protocols_v2_registry_groups_pb.ListSchemaGroupsResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_ListSchemaGroupsRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_ListSchemaGroupsRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_ListSchemaGroupsResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_ListSchemaGroupsResponse, + }, + // =================================================================== +// Schema Management +// =================================================================== +// +createSchema: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/CreateSchema', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.CreateSchemaResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_CreateSchemaRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_CreateSchemaRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_CreateSchemaResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_CreateSchemaResponse, + }, + // produce +updateSchema: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/UpdateSchema', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.UpdateSchemaResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_UpdateSchemaRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_UpdateSchemaRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_UpdateSchemaResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_UpdateSchemaResponse, + }, + deleteSchema: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/DeleteSchema', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_DeleteSchemaRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_DeleteSchemaResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaResponse, + }, + getSchema: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/GetSchema', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_GetSchemaRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_GetSchemaRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_GetSchemaResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_GetSchemaResponse, + }, + listSchemas: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/ListSchemas', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemasResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_ListSchemasRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_ListSchemasRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_ListSchemasResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_ListSchemasResponse, + }, + lookupSchemaName: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/LookupSchemaName', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.LookupSchemaNameResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_LookupSchemaNameRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_LookupSchemaNameRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_LookupSchemaNameResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_LookupSchemaNameResponse, + }, + registerSchemaVersion: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/RegisterSchemaVersion', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.RegisterSchemaVersionResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_RegisterSchemaVersionRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_RegisterSchemaVersionRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_RegisterSchemaVersionResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_RegisterSchemaVersionResponse, + }, + deleteSchemaVersions: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/DeleteSchemaVersions', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.DeleteSchemaVersionsResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_DeleteSchemaVersionsRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaVersionsRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_DeleteSchemaVersionsResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_DeleteSchemaVersionsResponse, + }, + getSchemaVersion: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/GetSchemaVersion', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_GetSchemaVersionRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_GetSchemaVersionRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_GetSchemaVersionResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_GetSchemaVersionResponse, + }, + // produce +getSchemaVersionById: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/GetSchemaVersionById', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.GetSchemaVersionByIdResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_GetSchemaVersionByIdRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_GetSchemaVersionByIdRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_GetSchemaVersionByIdResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_GetSchemaVersionByIdResponse, + }, + listSchemaVersions: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/ListSchemaVersions', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.ListSchemaVersionsResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_ListSchemaVersionsRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_ListSchemaVersionsRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_ListSchemaVersionsResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_ListSchemaVersionsResponse, + }, + listRegisteredSchemas: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/ListRegisteredSchemas', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.ListRegisteredSchemasResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_ListRegisteredSchemasRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_ListRegisteredSchemasRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_ListRegisteredSchemasResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_ListRegisteredSchemasResponse, + }, + bulkRegisterSchemas: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/BulkRegisterSchemas', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest, + responseType: kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasResponse, + }, + // =================================================================== +// Schema Compatibility & Validation +// =================================================================== +// +checkSchemaCompatibility: { + path: '/kurrentdb.protocol.registry.v2.SchemaRegistryService/CheckSchemaCompatibility', + requestStream: false, + responseStream: false, + requestType: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityRequest, + responseType: kurrentdb_protocols_v2_registry_validation_pb.CheckSchemaCompatibilityResponse, + requestSerialize: serialize_kurrentdb_protocol_registry_v2_CheckSchemaCompatibilityRequest, + requestDeserialize: deserialize_kurrentdb_protocol_registry_v2_CheckSchemaCompatibilityRequest, + responseSerialize: serialize_kurrentdb_protocol_registry_v2_CheckSchemaCompatibilityResponse, + responseDeserialize: deserialize_kurrentdb_protocol_registry_v2_CheckSchemaCompatibilityResponse, + }, + // consume +}; + +exports.SchemaRegistryServiceClient = grpc.makeGenericClientConstructor(SchemaRegistryServiceService, 'SchemaRegistryService'); +// =================================================================== +// Schema Group Management +// =================================================================== diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_pb.d.ts b/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_pb.d.ts new file mode 100644 index 00000000..24190ffc --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_pb.d.ts @@ -0,0 +1,10 @@ +// package: kurrentdb.protocol.registry.v2 +// file: kurrentdb/protocols/v2/registry/service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as kurrentdb_protocols_v2_registry_groups_pb from "../../../../kurrentdb/protocols/v2/registry/groups_pb"; +import * as kurrentdb_protocols_v2_registry_schemas_pb from "../../../../kurrentdb/protocols/v2/registry/schemas_pb"; +import * as kurrentdb_protocols_v2_registry_validation_pb from "../../../../kurrentdb/protocols/v2/registry/validation_pb"; diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_pb.js new file mode 100644 index 00000000..f69e3806 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/service_pb.js @@ -0,0 +1,29 @@ +// source: kurrentdb/protocols/v2/registry/service.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() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var kurrentdb_protocols_v2_registry_groups_pb = require('../../../../kurrentdb/protocols/v2/registry/groups_pb.js'); +goog.object.extend(proto, kurrentdb_protocols_v2_registry_groups_pb); +var kurrentdb_protocols_v2_registry_schemas_pb = require('../../../../kurrentdb/protocols/v2/registry/schemas_pb.js'); +goog.object.extend(proto, kurrentdb_protocols_v2_registry_schemas_pb); +var kurrentdb_protocols_v2_registry_validation_pb = require('../../../../kurrentdb/protocols/v2/registry/validation_pb.js'); +goog.object.extend(proto, kurrentdb_protocols_v2_registry_validation_pb); diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_grpc_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_pb.d.ts b/packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_pb.d.ts new file mode 100644 index 00000000..442b1065 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_pb.d.ts @@ -0,0 +1,26 @@ +// package: kurrentdb.protocol.registry.v2 +// file: kurrentdb/protocols/v2/registry/shared.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export enum SchemaDataFormat { + SCHEMA_DATA_FORMAT_UNSPECIFIED = 0, + SCHEMA_DATA_FORMAT_JSON = 1, + SCHEMA_DATA_FORMAT_PROTOBUF = 2, + SCHEMA_DATA_FORMAT_AVRO = 3, + SCHEMA_DATA_FORMAT_BYTES = 4, +} + +export enum CompatibilityMode { + COMPATIBILITY_MODE_UNSPECIFIED = 0, + COMPATIBILITY_MODE_BACKWARD = 1, + COMPATIBILITY_MODE_FORWARD = 2, + COMPATIBILITY_MODE_FULL = 3, + COMPATIBILITY_MODE_BACKWARD_ALL = 4, + COMPATIBILITY_MODE_FORWARD_ALL = 5, + COMPATIBILITY_MODE_FULL_ALL = 6, + COMPATIBILITY_MODE_NONE = 7, +} diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_pb.js new file mode 100644 index 00000000..c0a6a8a3 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_pb.js @@ -0,0 +1,51 @@ +// source: kurrentdb/protocols/v2/registry/shared.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() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CompatibilityMode', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaDataFormat', null, global); +/** + * @enum {number} + */ +proto.kurrentdb.protocol.registry.v2.SchemaDataFormat = { + SCHEMA_DATA_FORMAT_UNSPECIFIED: 0, + SCHEMA_DATA_FORMAT_JSON: 1, + SCHEMA_DATA_FORMAT_PROTOBUF: 2, + SCHEMA_DATA_FORMAT_AVRO: 3, + SCHEMA_DATA_FORMAT_BYTES: 4 +}; + +/** + * @enum {number} + */ +proto.kurrentdb.protocol.registry.v2.CompatibilityMode = { + COMPATIBILITY_MODE_UNSPECIFIED: 0, + COMPATIBILITY_MODE_BACKWARD: 1, + COMPATIBILITY_MODE_FORWARD: 2, + COMPATIBILITY_MODE_FULL: 3, + COMPATIBILITY_MODE_BACKWARD_ALL: 4, + COMPATIBILITY_MODE_FORWARD_ALL: 5, + COMPATIBILITY_MODE_FULL_ALL: 6, + COMPATIBILITY_MODE_NONE: 7 +}; + +goog.object.extend(exports, proto.kurrentdb.protocol.registry.v2); diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_grpc_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_pb.d.ts b/packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_pb.d.ts new file mode 100644 index 00000000..b8cd81e2 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_pb.d.ts @@ -0,0 +1,247 @@ +// package: kurrentdb.protocol.registry.v2 +// file: kurrentdb/protocols/v2/registry/validation.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as kurrentdb_protocols_v2_registry_shared_pb from "../../../../kurrentdb/protocols/v2/registry/shared_pb"; + +export class SchemaCompatibilityError extends jspb.Message { + getKind(): SchemaCompatibilityErrorKind; + setKind(value: SchemaCompatibilityErrorKind): SchemaCompatibilityError; + getDetails(): string; + setDetails(value: string): SchemaCompatibilityError; + + hasPropertyPath(): boolean; + clearPropertyPath(): void; + getPropertyPath(): string | undefined; + setPropertyPath(value: string): SchemaCompatibilityError; + + hasOriginalType(): boolean; + clearOriginalType(): void; + getOriginalType(): string | undefined; + setOriginalType(value: string): SchemaCompatibilityError; + + hasNewType(): boolean; + clearNewType(): void; + getNewType(): string | undefined; + setNewType(value: string): SchemaCompatibilityError; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaCompatibilityError.AsObject; + static toObject(includeInstance: boolean, msg: SchemaCompatibilityError): SchemaCompatibilityError.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaCompatibilityError, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaCompatibilityError; + static deserializeBinaryFromReader(message: SchemaCompatibilityError, reader: jspb.BinaryReader): SchemaCompatibilityError; +} + +export namespace SchemaCompatibilityError { + export type AsObject = { + kind: SchemaCompatibilityErrorKind, + details: string, + propertyPath?: string, + originalType?: string, + newType?: string, + } +} + +export class SchemaCompatibilityResult extends jspb.Message { + getIsCompatible(): boolean; + setIsCompatible(value: boolean): SchemaCompatibilityResult; + getSchemaVersionId(): string; + setSchemaVersionId(value: string): SchemaCompatibilityResult; + clearErrorsList(): void; + getErrorsList(): Array; + setErrorsList(value: Array): SchemaCompatibilityResult; + addErrors(value?: SchemaCompatibilityError, index?: number): SchemaCompatibilityError; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaCompatibilityResult.AsObject; + static toObject(includeInstance: boolean, msg: SchemaCompatibilityResult): SchemaCompatibilityResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaCompatibilityResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaCompatibilityResult; + static deserializeBinaryFromReader(message: SchemaCompatibilityResult, reader: jspb.BinaryReader): SchemaCompatibilityResult; +} + +export namespace SchemaCompatibilityResult { + export type AsObject = { + isCompatible: boolean, + schemaVersionId: string, + errorsList: Array, + } +} + +export class CheckSchemaCompatibilityRequest extends jspb.Message { + + hasSchemaName(): boolean; + clearSchemaName(): void; + getSchemaName(): string; + setSchemaName(value: string): CheckSchemaCompatibilityRequest; + + hasSchemaVersionId(): boolean; + clearSchemaVersionId(): void; + getSchemaVersionId(): string; + setSchemaVersionId(value: string): CheckSchemaCompatibilityRequest; + getDefinition(): Uint8Array | string; + getDefinition_asU8(): Uint8Array; + getDefinition_asB64(): string; + setDefinition(value: Uint8Array | string): CheckSchemaCompatibilityRequest; + getDataFormat(): kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat; + setDataFormat(value: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat): CheckSchemaCompatibilityRequest; + + getSchemaIdentifierCase(): CheckSchemaCompatibilityRequest.SchemaIdentifierCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckSchemaCompatibilityRequest.AsObject; + static toObject(includeInstance: boolean, msg: CheckSchemaCompatibilityRequest): CheckSchemaCompatibilityRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CheckSchemaCompatibilityRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckSchemaCompatibilityRequest; + static deserializeBinaryFromReader(message: CheckSchemaCompatibilityRequest, reader: jspb.BinaryReader): CheckSchemaCompatibilityRequest; +} + +export namespace CheckSchemaCompatibilityRequest { + export type AsObject = { + schemaName: string, + schemaVersionId: string, + definition: Uint8Array | string, + dataFormat: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat, + } + + export enum SchemaIdentifierCase { + SCHEMA_IDENTIFIER_NOT_SET = 0, + SCHEMA_NAME = 1, + SCHEMA_VERSION_ID = 2, + } + +} + +export class CheckSchemaCompatibilityResponse extends jspb.Message { + + hasSuccess(): boolean; + clearSuccess(): void; + getSuccess(): CheckSchemaCompatibilityResponse.Success | undefined; + setSuccess(value?: CheckSchemaCompatibilityResponse.Success): CheckSchemaCompatibilityResponse; + + hasFailure(): boolean; + clearFailure(): void; + getFailure(): CheckSchemaCompatibilityResponse.Failure | undefined; + setFailure(value?: CheckSchemaCompatibilityResponse.Failure): CheckSchemaCompatibilityResponse; + + getResultCase(): CheckSchemaCompatibilityResponse.ResultCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckSchemaCompatibilityResponse.AsObject; + static toObject(includeInstance: boolean, msg: CheckSchemaCompatibilityResponse): CheckSchemaCompatibilityResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CheckSchemaCompatibilityResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckSchemaCompatibilityResponse; + static deserializeBinaryFromReader(message: CheckSchemaCompatibilityResponse, reader: jspb.BinaryReader): CheckSchemaCompatibilityResponse; +} + +export namespace CheckSchemaCompatibilityResponse { + export type AsObject = { + success?: CheckSchemaCompatibilityResponse.Success.AsObject, + failure?: CheckSchemaCompatibilityResponse.Failure.AsObject, + } + + + export class Success extends jspb.Message { + getSchemaVersionId(): string; + setSchemaVersionId(value: string): Success; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Success.AsObject; + static toObject(includeInstance: boolean, msg: Success): Success.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Success, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Success; + static deserializeBinaryFromReader(message: Success, reader: jspb.BinaryReader): Success; + } + + export namespace Success { + export type AsObject = { + schemaVersionId: string, + } + } + + export class Failure extends jspb.Message { + clearErrorsList(): void; + getErrorsList(): Array; + setErrorsList(value: Array): Failure; + addErrors(value?: SchemaCompatibilityError, index?: number): SchemaCompatibilityError; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Failure.AsObject; + static toObject(includeInstance: boolean, msg: Failure): Failure.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Failure, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Failure; + static deserializeBinaryFromReader(message: Failure, reader: jspb.BinaryReader): Failure; + } + + export namespace Failure { + export type AsObject = { + errorsList: Array, + } + } + + + export enum ResultCase { + RESULT_NOT_SET = 0, + SUCCESS = 1, + FAILURE = 2, + } + +} + +export class SchemaValidationInfo extends jspb.Message { + getSchemaVersionId(): string; + setSchemaVersionId(value: string): SchemaValidationInfo; + getSchemaDefinition(): Uint8Array | string; + getSchemaDefinition_asU8(): Uint8Array; + getSchemaDefinition_asB64(): string; + setSchemaDefinition(value: Uint8Array | string): SchemaValidationInfo; + getDataFormat(): kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat; + setDataFormat(value: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat): SchemaValidationInfo; + getCompatibility(): kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode; + setCompatibility(value: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode): SchemaValidationInfo; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SchemaValidationInfo.AsObject; + static toObject(includeInstance: boolean, msg: SchemaValidationInfo): SchemaValidationInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SchemaValidationInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SchemaValidationInfo; + static deserializeBinaryFromReader(message: SchemaValidationInfo, reader: jspb.BinaryReader): SchemaValidationInfo; +} + +export namespace SchemaValidationInfo { + export type AsObject = { + schemaVersionId: string, + schemaDefinition: Uint8Array | string, + dataFormat: kurrentdb_protocols_v2_registry_shared_pb.SchemaDataFormat, + compatibility: kurrentdb_protocols_v2_registry_shared_pb.CompatibilityMode, + } +} + +export enum SchemaCompatibilityErrorKind { + SCHEMA_COMPATIBILITY_ERROR_KIND_UNSPECIFIED = 0, + SCHEMA_COMPATIBILITY_ERROR_KIND_MISSING_REQUIRED_PROPERTY = 1, + SCHEMA_COMPATIBILITY_ERROR_KIND_INCOMPATIBLE_TYPE_CHANGE = 2, + SCHEMA_COMPATIBILITY_ERROR_KIND_OPTIONAL_TO_REQUIRED = 3, + SCHEMA_COMPATIBILITY_ERROR_KIND_NEW_REQUIRED_PROPERTY = 4, + SCHEMA_COMPATIBILITY_ERROR_KIND_REMOVED_PROPERTY = 5, + SCHEMA_COMPATIBILITY_ERROR_KIND_ARRAY_TYPE_INCOMPATIBILITY = 6, + SCHEMA_COMPATIBILITY_ERROR_KIND_DATA_FORMAT_MISMATCH = 7, +} diff --git a/packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_pb.js b/packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_pb.js new file mode 100644 index 00000000..7e04e691 --- /dev/null +++ b/packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_pb.js @@ -0,0 +1,1789 @@ +// source: kurrentdb/protocols/v2/registry/validation.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() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var kurrentdb_protocols_v2_registry_shared_pb = require('../../../../kurrentdb/protocols/v2/registry/shared_pb.js'); +goog.object.extend(proto, kurrentdb_protocols_v2_registry_shared_pb); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.SchemaIdentifierCase', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.ResultCase', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult', null, global); +goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo', 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.kurrentdb.protocol.registry.v2.SchemaCompatibilityError = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.oneofGroups_); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.displayName = 'proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.repeatedFields_, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.displayName = 'proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, 0), + details: jspb.Message.getFieldWithDefault(msg, 2, ""), + propertyPath: jspb.Message.getFieldWithDefault(msg, 3, ""), + originalType: jspb.Message.getFieldWithDefault(msg, 4, ""), + newType: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError; + return proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind} */ (reader.readEnum()); + msg.setKind(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDetails(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPropertyPath(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOriginalType(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setNewType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getDetails(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional SchemaCompatibilityErrorKind kind = 1; + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.getKind = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.setKind = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string details = 2; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.getDetails = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.setDetails = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string property_path = 3; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.getPropertyPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.setPropertyPath = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.clearPropertyPath = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.hasPropertyPath = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string original_type = 4; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.getOriginalType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.setOriginalType = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.clearOriginalType = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.hasOriginalType = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string new_type = 5; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.getNewType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.setNewType = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.clearNewType = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.hasNewType = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.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.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.toObject = function(includeInstance, msg) { + var f, obj = { + isCompatible: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + schemaVersionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + errorsList: jspb.Message.toObjectList(msg.getErrorsList(), + proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.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.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult; + return proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.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.setIsCompatible(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSchemaVersionId(value); + break; + case 3: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.deserializeBinaryFromReader); + msg.addErrors(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIsCompatible(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getErrorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool is_compatible = 1; + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.getIsCompatible = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.setIsCompatible = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional string schema_version_id = 2; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated SchemaCompatibilityError errors = 3; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.getErrorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} returns this +*/ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.setErrorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError=} opt_value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.addErrors = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.clearErrorsList = function() { + return this.setErrorsList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.SchemaIdentifierCase = { + SCHEMA_IDENTIFIER_NOT_SET: 0, + SCHEMA_NAME: 1, + SCHEMA_VERSION_ID: 2 +}; + +/** + * @return {proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.SchemaIdentifierCase} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getSchemaIdentifierCase = function() { + return /** @type {proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.SchemaIdentifierCase} */(jspb.Message.computeOneofCase(this, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""), + schemaVersionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + definition: msg.getDefinition_asB64(), + dataFormat: 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.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest; + return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.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.setSchemaName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSchemaVersionId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDefinition(value); + break; + case 4: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (reader.readEnum()); + msg.setDataFormat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getDefinition_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getDataFormat(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.setSchemaName = function(value) { + return jspb.Message.setOneofField(this, 1, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.clearSchemaName = function() { + return jspb.Message.setOneofField(this, 1, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.hasSchemaName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string schema_version_id = 2; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setOneofField(this, 2, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.clearSchemaVersionId = function() { + return jspb.Message.setOneofField(this, 2, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.hasSchemaVersionId = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes definition = 3; + * @return {!(string|Uint8Array)} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getDefinition = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes definition = 3; + * This is a type-conversion wrapper around `getDefinition()` + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getDefinition_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDefinition())); +}; + + +/** + * optional bytes definition = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDefinition()` + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getDefinition_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDefinition())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.setDefinition = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional SchemaDataFormat data_format = 4; + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getDataFormat = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} value + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.setDataFormat = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.ResultCase = { + RESULT_NOT_SET: 0, + SUCCESS: 1, + FAILURE: 2 +}; + +/** + * @return {proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.ResultCase} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.getResultCase = function() { + return /** @type {proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.ResultCase} */(jspb.Message.computeOneofCase(this, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: (f = msg.getSuccess()) && proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.toObject(includeInstance, f), + failure: (f = msg.getFailure()) && proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.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.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse; + return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.deserializeBinaryFromReader); + msg.setSuccess(value); + break; + case 2: + var value = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.deserializeBinaryFromReader); + msg.setFailure(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.serializeBinaryToWriter + ); + } + f = message.getFailure(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.toObject = function(includeInstance, msg) { + var f, obj = { + schemaVersionId: 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.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success; + return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSchemaVersionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string schema_version_id = 2; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} returns this + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.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.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.toObject = function(includeInstance, msg) { + var f, obj = { + errorsList: jspb.Message.toObjectList(msg.getErrorsList(), + proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.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.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure; + return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = new proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError; + reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.deserializeBinaryFromReader); + msg.addErrors(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getErrorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SchemaCompatibilityError errors = 3; + * @return {!Array} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.getErrorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} returns this +*/ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.setErrorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError=} opt_value + * @param {number=} opt_index + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.addErrors = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} returns this + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.clearErrorsList = function() { + return this.setErrorsList([]); +}; + + +/** + * optional Success success = 1; + * @return {?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.getSuccess = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success, 1)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.setSuccess = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.clearSuccess = function() { + return this.setSuccess(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.hasSuccess = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Failure failure = 2; + * @return {?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.getFailure = function() { + return /** @type{?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} */ ( + jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure, 2)); +}; + + +/** + * @param {?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure|undefined} value + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} returns this +*/ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.setFailure = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} returns this + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.clearFailure = function() { + return this.setFailure(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.hasFailure = 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.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.toObject = function(opt_includeInstance) { + return proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.toObject = function(includeInstance, msg) { + var f, obj = { + schemaVersionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + schemaDefinition: msg.getSchemaDefinition_asB64(), + dataFormat: jspb.Message.getFieldWithDefault(msg, 3, 0), + compatibility: 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.kurrentdb.protocol.registry.v2.SchemaValidationInfo} + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo; + return proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.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.setSchemaVersionId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSchemaDefinition(value); + break; + case 3: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (reader.readEnum()); + msg.setDataFormat(value); + break; + case 4: + var value = /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (reader.readEnum()); + msg.setCompatibility(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaVersionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSchemaDefinition_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getDataFormat(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getCompatibility(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } +}; + + +/** + * optional string schema_version_id = 1; + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getSchemaVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.setSchemaVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes schema_definition = 2; + * @return {!(string|Uint8Array)} + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getSchemaDefinition = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes schema_definition = 2; + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {string} + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getSchemaDefinition_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSchemaDefinition())); +}; + + +/** + * optional bytes schema_definition = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSchemaDefinition()` + * @return {!Uint8Array} + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getSchemaDefinition_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSchemaDefinition())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.setSchemaDefinition = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional SchemaDataFormat data_format = 3; + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getDataFormat = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.setDataFormat = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional CompatibilityMode compatibility = 4; + * @return {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getCompatibility = function() { + return /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} value + * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} returns this + */ +proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.setCompatibility = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * @enum {number} + */ +proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind = { + SCHEMA_COMPATIBILITY_ERROR_KIND_UNSPECIFIED: 0, + SCHEMA_COMPATIBILITY_ERROR_KIND_MISSING_REQUIRED_PROPERTY: 1, + SCHEMA_COMPATIBILITY_ERROR_KIND_INCOMPATIBLE_TYPE_CHANGE: 2, + SCHEMA_COMPATIBILITY_ERROR_KIND_OPTIONAL_TO_REQUIRED: 3, + SCHEMA_COMPATIBILITY_ERROR_KIND_NEW_REQUIRED_PROPERTY: 4, + SCHEMA_COMPATIBILITY_ERROR_KIND_REMOVED_PROPERTY: 5, + SCHEMA_COMPATIBILITY_ERROR_KIND_ARRAY_TYPE_INCOMPATIBILITY: 6, + SCHEMA_COMPATIBILITY_ERROR_KIND_DATA_FORMAT_MISMATCH: 7 +}; + +goog.object.extend(exports, proto.kurrentdb.protocol.registry.v2); diff --git a/packages/db-client/protos/kurrentdb/protocols/v2/registry/errors.proto b/packages/db-client/protos/kurrentdb/protocols/v2/registry/errors.proto new file mode 100644 index 00000000..63ba24f7 --- /dev/null +++ b/packages/db-client/protos/kurrentdb/protocols/v2/registry/errors.proto @@ -0,0 +1,48 @@ +// ****************************************************************************************** +// This protocol is UNSTABLE in the sense of being subject to change. +// ****************************************************************************************** + +syntax = "proto3"; + +package kurrentdb.protocol.v2.registry.errors; + +option csharp_namespace = "KurrentDB.Protocol.V2.Registry.Errors"; + +import "kurrentdb/protocols/v2/rpc.proto"; + +// Error codes specific to the Schema Registry API. +enum RegistryError { + // Default value. This value is not used. + // An error code MUST always be set to a non-zero value. + // If an error code is not explicitly set, it MUST be treated as + // an internal server error (INTERNAL). + UNSPECIFIED = 0; + + SCHEMA_NOT_FOUND = 1 [(kurrent.rpc.error) = { + status_code: NOT_FOUND, + has_details: true, + }]; + + SCHEMA_ALREADY_EXISTS = 2 [(kurrent.rpc.error) = { + status_code: ALREADY_EXISTS, + has_details: true + }]; + + SCHEMA_DELETED = 3 [(kurrent.rpc.error) = { + status_code: FAILED_PRECONDITION, + has_details: true + }]; + +} + +message SchemaNotFoundErrorDetails { + string schema = 1; +} + +message SchemaAlreadyExistsErrorDetails { + string schema = 1; +} + +message SchemaDeletedErrorDetails { + string schema = 1; +} diff --git a/packages/db-client/protos/kurrentdb/protocols/v2/registry/events.proto b/packages/db-client/protos/kurrentdb/protocols/v2/registry/events.proto new file mode 100644 index 00000000..fb48e11f --- /dev/null +++ b/packages/db-client/protos/kurrentdb/protocols/v2/registry/events.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; + +package kurrentdb.protocol.registry.v2; + +option csharp_namespace = "KurrentDB.SchemaRegistry.Protocol.Schemas.Events"; +// option csharp_namespace = "KurrentDB.Protocol.Registry.V2"; + +import "google/protobuf/timestamp.proto"; +import "kurrentdb/protocols/v2/registry/shared.proto"; + +message SchemaCreated { + string schema_name = 1; + optional string description = 2; + SchemaDataFormat data_format = 3; + CompatibilityMode compatibility = 4; + map tags = 5; + string schema_version_id = 6; + bytes schema_definition = 7; + int32 version_number = 8; + google.protobuf.Timestamp created_at = 9; +} + +message SchemaVersionRegistered { + string schema_version_id = 1; + bytes schema_definition = 2; + int32 version_number = 3; + string schema_name = 4; + SchemaDataFormat data_format = 5; + google.protobuf.Timestamp registered_at = 6; +} + +message SchemaVersionsDeleted { + // The unique name of the schema. + string schema_name = 1; + // The list of schema version IDs to be deleted. + repeated string versions = 2; + // The unique identifier of the latest schema version. + string latest_schema_version_id = 3; + // The version number of the latest schema version. + int32 latest_schema_version_number = 4; + // When the schema versions were deleted. + google.protobuf.Timestamp deleted_at = 5; +} + +message SchemaDeleted { + // The unique name of the schema. + string schema_name = 1; + // When the schema was deleted. + google.protobuf.Timestamp deleted_at = 2; +} + +message SchemaCompatibilityModeChanged { + // The unique name of the schema. + string schema_name = 1; + // The new compatibility mode. + CompatibilityMode compatibility = 2; + // When the compatibility mode was changed. + google.protobuf.Timestamp changed_at = 3; +} + +message SchemaTagsUpdated { + // The unique name of the schema. + string schema_name = 1; + // The new tags for the schema. + map tags = 2; + // When the tags were updated. + google.protobuf.Timestamp updated_at = 3; +} + +message SchemaDescriptionUpdated { + // The unique name of the schema. + string schema_name = 1; + // The new description for the schema. + string description = 2; + // When the description was updated. + google.protobuf.Timestamp updated_at = 3; +} diff --git a/packages/db-client/protos/kurrentdb/protocols/v2/registry/groups.proto b/packages/db-client/protos/kurrentdb/protocols/v2/registry/groups.proto new file mode 100644 index 00000000..f220cf26 --- /dev/null +++ b/packages/db-client/protos/kurrentdb/protocols/v2/registry/groups.proto @@ -0,0 +1,125 @@ +syntax = "proto3"; + +package kurrentdb.protocol.registry.v2; + +option csharp_namespace = "KurrentDB.Protocol.V2.Registry"; + +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "kurrentdb/protocols/v2/registry/shared.proto"; + +message AutoRegistrationSettings { + bool enabled = 1; +} + +message ValidationSettings { + bool enabled = 1; +} + +message CompatibilitySettings { + bool enforce = 1; + CompatibilityMode mode = 2; +} + +message DataFormatSettings { + bool enforce = 1; + SchemaDataFormat format = 2; +} + +enum StreamFilterType { + CONSUME_FILTER_TYPE_UNSPECIFIED = 0; + CONSUME_FILTER_TYPE_REGEX = 1; + CONSUME_FILTER_TYPE_CATEGORY = 2; +} + +message StreamFilter { + StreamFilterType filter_type = 1; + string expression = 2; +} + +message StreamFilterSettings { + bool enforce = 1; + StreamFilter filter = 2; +} + +message SchemaGroupDetails { + string name = 1; + optional string description = 2; + map tags = 3; + + // bool disable_auto_registration = 4; // Controls automatic registration for the schema group + // bool disable_validation = 5; // Controls validation for the schema group + // bool enforce_data_format = 6; // Controls data format enforcement for the schema group + // bool enforce_compatibility = 7; // Controls compatibility enforcement for the schema group + // SchemaFormat data_format = 8; // Format of all schemas in the group + // CompatibilityMode compatibility = 9; // Compatibility mode enforced for all schemas in the group + // StreamFilter stream_filter = 10; // Filter that restricts the schemas to a specific set of streams + + AutoRegistrationSettings auto_registration = 11; // Settings for automatic registration + ValidationSettings validation = 12; // Settings for schema validation + CompatibilitySettings compatibility = 13; // Settings for compatibility mode + DataFormatSettings data_format = 14; // Settings for data format enforcement + StreamFilterSettings stream_filter = 15; // Settings for stream filtering +} + +message SchemaGroup { + // Unique identifier of the schema group + string group_id = 1; + // Details of the schema group + SchemaGroupDetails details = 2; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp updated_at = 6; +} + +// Command to create a new schema group with optional identifier and required configuration +message CreateSchemaGroupRequest { + optional string group_id = 1; // Unique identifier of the schema group + SchemaGroupDetails details = 2; // Details of the schema group to be created +} + +// Response returned after successful schema group creation +message CreateSchemaGroupResponse { + string group_id = 1; // Unique identifier of the schema group +} + +// Command to update an existing schema group's details with field masking support +message UpdateSchemaGroupRequest { + // Unique identifier of the schema group + string group_id = 1; + // Details of the schema group to be updated + SchemaGroupDetails details = 2; + // Specifies which fields to update. See https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask + google.protobuf.FieldMask update_mask = 3; +} + +// Response returned after successful schema group details update +message UpdateSchemaGroupResponse {} + +// Command to remove an existing schema group by identifier +message DeleteSchemaGroupRequest { + string group_id = 1; // Unique identifier of the schema group +} + +// Empty response returned after successful schema group deletion +message DeleteSchemaGroupResponse {} + +// Query to retrieve a specific schema group by identifier +message GetSchemaGroupRequest { + string group_id = 1; +} + +// Response containing the details of the requested schema group +message GetSchemaGroupResponse { + SchemaGroup group = 1; +} + +// Query to list schema groups with optional name prefix filter +message ListSchemaGroupsRequest { + google.protobuf.StringValue group_name_prefix = 1; +} + +// Response containing a list of schema groups matching the query +message ListSchemaGroupsResponse { + repeated SchemaGroup groups = 1; +} \ No newline at end of file diff --git a/packages/db-client/protos/kurrentdb/protocols/v2/registry/schemas.proto b/packages/db-client/protos/kurrentdb/protocols/v2/registry/schemas.proto new file mode 100644 index 00000000..aa88bb1a --- /dev/null +++ b/packages/db-client/protos/kurrentdb/protocols/v2/registry/schemas.proto @@ -0,0 +1,192 @@ +syntax = "proto3"; + +package kurrentdb.protocol.registry.v2; + +option csharp_namespace = "KurrentDB.Protocol.V2.Registry"; + +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; + +import "kurrentdb/protocols/v2/registry/shared.proto"; + +message SchemaDetails { + SchemaDataFormat data_format = 1; + CompatibilityMode compatibility = 2; + optional string description = 3; + map tags = 4; +} + +message CreateSchemaRequest { + string schema_name = 1; + SchemaDetails details = 2; + optional bytes schema_definition = 3; +} + +message CreateSchemaResponse { + string schema_version_id = 1; + int32 version_number = 2; +} + +message UpdateSchemaRequest { + // The name of the schema to update. + string schema_name = 1; + // description and tags only + SchemaDetails details = 2; + // Specifies which fields to update. See https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask + google.protobuf.FieldMask update_mask = 3; +} + +message UpdateSchemaResponse {} + +message DeleteSchemaRequest { + string schema_name = 1; +} + +message DeleteSchemaResponse {} + +message Schema { + string schema_name = 1; + SchemaDetails details = 2; + int32 latest_schema_version = 4; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp updated_at = 6; +} + +message GetSchemaRequest { + string schema_name = 1; +} + +message GetSchemaResponse { + Schema schema = 1; +} + +// message SchemaListItem { +// string schema_name = 1; +// SchemaFormat data_format = 2; +// CompatibilityMode compatibility = 3; +// optional string description = 4; +// repeated string tags = 5; +// int32 latest_schema_version = 6; +// google.protobuf.Timestamp created_at = 7; +// google.protobuf.Timestamp updated_at = 8; // should update time use the registered_at of the version? +// } + +message ListSchemasRequest { + // The prefix of the schema name. If specified, only schemas with the specified prefix are returned. + optional string schema_name_prefix = 1; + // The tags to filter the schemas. If specified, only schemas with the specified tags are returned. + map schema_tags = 2; +} + +message ListSchemasResponse { + repeated Schema schemas = 1; +} + +message LookupSchemaNameRequest { + string schema_version_id = 1; +} + +message LookupSchemaNameResponse { + string schema_name = 1; +} + +message RegisterSchemaVersionRequest { + string schema_name = 1; + bytes schema_definition = 2; +} + +message RegisterSchemaVersionResponse { + string schema_version_id = 1; + int32 version_number = 2; +} + +message DeleteSchemaVersionsRequest { + string schema_name = 1; + repeated int32 versions = 2; +} + +message DeleteSchemaVersionsResponse { + repeated SchemaVersionError errors = 1; + + message SchemaVersionError { + int32 version_number = 1; + // ErrorDetails error = 2; + } +} + +message SchemaVersion { + string schema_version_id = 1; + int32 version_number = 2; + bytes schema_definition = 3; + SchemaDataFormat data_format = 4; + google.protobuf.Timestamp registered_at = 5; +} + +message GetSchemaVersionByIdRequest { + string schema_version_id = 1; +} + +message GetSchemaVersionByIdResponse { + SchemaVersion version = 1; +} + +message GetSchemaVersionRequest { + string schema_name = 1; + optional int32 version_number = 2; // without this field, the latest version will be returned +} + +message GetSchemaVersionResponse { + SchemaVersion version = 1; +} + +message ListSchemaVersionsRequest { + string schema_name = 1; + bool include_definition = 2; +} + +message ListSchemaVersionsResponse { + repeated SchemaVersion versions = 1; +} + +// This message represents the latest registered schema version for a specific schema. +message RegisteredSchema { + string schema_name = 1; + string schema_version_id = 2; + int32 version_number = 3; + bytes schema_definition = 4; + SchemaDataFormat data_format = 5; + CompatibilityMode compatibility = 6; + map tags = 7; + google.protobuf.Timestamp registered_at = 8; +} + +// This message is used to request a list of registered schemas. +message ListRegisteredSchemasRequest { + // The unique identifier of the schema version. If specified, only the schema with the specified version ID is + // returned. + optional string schema_version_id = 1; + // The prefix of the schema name. If specified, only schemas with the specified prefix are returned. + optional string schema_name_prefix = 2; + // The tags to filter the schemas. If specified, only schemas with the specified tags are returned. + map schema_tags = 3; + // If true, the schema definition will be included in the response. + bool include_definition = 4; +} + +message ListRegisteredSchemasResponse { + repeated RegisteredSchema schemas = 1; +} + +message BulkRegisterSchemasRequest { + repeated CreateSchemaRequest requests = 1; + + bool keep_order = 2; + bool stop_on_error = 3; +} + +message BulkRegisterSchemasResponse { + google.protobuf.Duration duration = 1; + + repeated CreateSchemaResponse responses = 2; +} \ No newline at end of file diff --git a/packages/db-client/protos/kurrentdb/protocols/v2/registry/service.proto b/packages/db-client/protos/kurrentdb/protocols/v2/registry/service.proto new file mode 100644 index 00000000..09dcd87b --- /dev/null +++ b/packages/db-client/protos/kurrentdb/protocols/v2/registry/service.proto @@ -0,0 +1,61 @@ +syntax = "proto3"; + +package kurrentdb.protocol.registry.v2; + +option csharp_namespace = "KurrentDB.Protocol.V2.Registry"; + +import "kurrentdb/protocols/v2/registry/groups.proto"; +import "kurrentdb/protocols/v2/registry/schemas.proto"; +import "kurrentdb/protocols/v2/registry/validation.proto"; + +service SchemaRegistryService { + //=================================================================== + // Schema Group Management + //=================================================================== + + rpc CreateSchemaGroup(CreateSchemaGroupRequest) returns (CreateSchemaGroupResponse); + + rpc UpdateSchemaGroup(UpdateSchemaGroupRequest) returns (UpdateSchemaGroupResponse); + + rpc DeleteSchemaGroup(DeleteSchemaGroupRequest) returns (DeleteSchemaGroupResponse); + + rpc GetSchemaGroup(GetSchemaGroupRequest) returns (GetSchemaGroupResponse); + + rpc ListSchemaGroups(ListSchemaGroupsRequest) returns (ListSchemaGroupsResponse); + + //=================================================================== + // Schema Management + //=================================================================== + + rpc CreateSchema(CreateSchemaRequest) returns (CreateSchemaResponse); // produce + + rpc UpdateSchema(UpdateSchemaRequest) returns (UpdateSchemaResponse); + + rpc DeleteSchema(DeleteSchemaRequest) returns (DeleteSchemaResponse); + + rpc GetSchema(GetSchemaRequest) returns (GetSchemaResponse); + + rpc ListSchemas(ListSchemasRequest) returns (ListSchemasResponse); + + rpc LookupSchemaName(LookupSchemaNameRequest) returns (LookupSchemaNameResponse); + + rpc RegisterSchemaVersion(RegisterSchemaVersionRequest) returns (RegisterSchemaVersionResponse); + + rpc DeleteSchemaVersions(DeleteSchemaVersionsRequest) returns (DeleteSchemaVersionsResponse); + + rpc GetSchemaVersion(GetSchemaVersionRequest) returns (GetSchemaVersionResponse); // produce + + rpc GetSchemaVersionById(GetSchemaVersionByIdRequest) returns (GetSchemaVersionByIdResponse); + + rpc ListSchemaVersions(ListSchemaVersionsRequest) returns (ListSchemaVersionsResponse); + + rpc ListRegisteredSchemas(ListRegisteredSchemasRequest) returns (ListRegisteredSchemasResponse); + + rpc BulkRegisterSchemas(BulkRegisterSchemasRequest) returns (BulkRegisterSchemasResponse); + + //=================================================================== + // Schema Compatibility & Validation + //=================================================================== + + rpc CheckSchemaCompatibility(CheckSchemaCompatibilityRequest) returns (CheckSchemaCompatibilityResponse); // consume +} diff --git a/packages/db-client/protos/kurrentdb/protocols/v2/registry/shared.proto b/packages/db-client/protos/kurrentdb/protocols/v2/registry/shared.proto new file mode 100644 index 00000000..4e61f30a --- /dev/null +++ b/packages/db-client/protos/kurrentdb/protocols/v2/registry/shared.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; + +package kurrentdb.protocol.registry.v2; + +option csharp_namespace = "KurrentDB.Protocol.V2.Registry"; + +enum SchemaDataFormat { + // Default value, should not be used. + SCHEMA_DATA_FORMAT_UNSPECIFIED = 0; + SCHEMA_DATA_FORMAT_JSON = 1; // application/json + SCHEMA_DATA_FORMAT_PROTOBUF = 2; // application/vnd.google.protobuf + SCHEMA_DATA_FORMAT_AVRO = 3; // application/vnd.apache.avro+json + SCHEMA_DATA_FORMAT_BYTES = 4; // application/octet-stream +} + +// Schema compatibility modes define how schema changes are validated against previous versions. +enum CompatibilityMode { + // Default value, should not be used. + COMPATIBILITY_MODE_UNSPECIFIED = 0; + + // Backward compatibility allows new schemas to be used with data written by previous schemas. + // Example: If schema version 1 has a field "name" and schema version 2 adds a new field "age", + // data written with schema version 1 can still be read using schema version 2. + // Example of invalid schema: If schema version 1 has a field "name" and schema version 2 removes the "name" field, + // data written with schema version 1 cannot be read using schema version 2. + COMPATIBILITY_MODE_BACKWARD = 1; + + // Forward compatibility allows data written by new schemas to be read by previous schemas. + // Example: If schema version 1 has a field "name" and schema version 2 adds a new field "age", + // data written with schema version 2 can still be read using schema version 1, ignoring the "age" field. + // Example of invalid schema: If schema version 1 has a field "name" and schema version 2 changes the "name" field type, + // data written with schema version 2 cannot be read using schema version 1. + COMPATIBILITY_MODE_FORWARD = 2; + + // Full compatibility ensures both backward and forward compatibility. + // This mode guarantees that new schemas can read data written by old schemas, + // and old schemas can read data written by new schemas. + COMPATIBILITY_MODE_FULL = 3; + + // Backward All compatibility ensures new schemas can read data written by ALL previous schema versions, + // not just the immediately preceding one. + COMPATIBILITY_MODE_BACKWARD_ALL = 4; + + // Forward All compatibility ensures ALL previous schema versions can read data written by new schemas. + // This provides stronger guarantees than regular forward compatibility. + COMPATIBILITY_MODE_FORWARD_ALL = 5; + + // Full All compatibility combines backward all and forward all compatibility modes. + // This ensures complete compatibility across all schema versions, providing the strongest compatibility guarantees. + COMPATIBILITY_MODE_FULL_ALL = 6; + + // Disables compatibility checks, allowing any kind of schema change. + // This mode should be used with caution, as it may lead to compatibility issues. + COMPATIBILITY_MODE_NONE = 7; +} diff --git a/packages/db-client/protos/kurrentdb/protocols/v2/registry/validation.proto b/packages/db-client/protos/kurrentdb/protocols/v2/registry/validation.proto new file mode 100644 index 00000000..66981b2b --- /dev/null +++ b/packages/db-client/protos/kurrentdb/protocols/v2/registry/validation.proto @@ -0,0 +1,76 @@ +syntax = "proto3"; + +package kurrentdb.protocol.registry.v2; + +option csharp_namespace = "KurrentDB.Protocol.V2.Registry"; + +import "kurrentdb/protocols/v2/registry/shared.proto"; + +// Represents a schema compatibility error. +message SchemaCompatibilityError { + SchemaCompatibilityErrorKind kind = 1; // The type of compatibility error. + string details = 2; // The error message + + optional string property_path = 3; // The path to the property where the compatibility error occurred. + optional string original_type = 4; // The type of property in the registered schema (e.g. array, bool, number, object) + optional string new_type = 5; // The type of property in the schema being validated (e.g. array, bool, number, object) +} + +// Represents the result of schema compatibility, containing a list of compatibility errors. +message SchemaCompatibilityResult { + // Indicates whether the schema is compatible with the registered schema. + bool is_compatible = 1; + // The schema identifier of the schema being validated. + string schema_version_id = 2; + // A list of schema compatibility errors. + repeated SchemaCompatibilityError errors = 3; +} + +message CheckSchemaCompatibilityRequest { + oneof schema_identifier { + string schema_name = 1; + string schema_version_id = 2; + } + + bytes definition = 3; + SchemaDataFormat data_format = 4; +} + +message CheckSchemaCompatibilityResponse { + //SchemaCompatibilityResult result = 1; + oneof result { + Success success = 1; + Failure failure = 2; + } + + // Indicates whether the schema is compatible with the registered schema. + message Success { + // The schema identifier of the schema being validated. + string schema_version_id = 2; + } + + message Failure { + // A list of schema compatibility errors. + repeated SchemaCompatibilityError errors = 3; + } +} + +// Enum representing different kinds of compatibility errors. +enum SchemaCompatibilityErrorKind { + SCHEMA_COMPATIBILITY_ERROR_KIND_UNSPECIFIED = 0; // Default value, do not use. + SCHEMA_COMPATIBILITY_ERROR_KIND_MISSING_REQUIRED_PROPERTY = 1; // Backward compatibility: Required property from old schema missing in new schema + SCHEMA_COMPATIBILITY_ERROR_KIND_INCOMPATIBLE_TYPE_CHANGE = 2; // Backward compatibility: Property type changed incompatibly + SCHEMA_COMPATIBILITY_ERROR_KIND_OPTIONAL_TO_REQUIRED = 3; // Backward compatibility: Property changed from optional to required + SCHEMA_COMPATIBILITY_ERROR_KIND_NEW_REQUIRED_PROPERTY = 4; // Forward compatibility: New required property added + SCHEMA_COMPATIBILITY_ERROR_KIND_REMOVED_PROPERTY = 5; // Forward compatibility: Property removed from schema + SCHEMA_COMPATIBILITY_ERROR_KIND_ARRAY_TYPE_INCOMPATIBILITY = 6; // Issues with array item types + SCHEMA_COMPATIBILITY_ERROR_KIND_DATA_FORMAT_MISMATCH = 7; // Data format mismatch between schemas +} + +// Represents the information necessary to check schema compatibility or validate a schema. +message SchemaValidationInfo { + string schema_version_id = 1; + bytes schema_definition = 2; + SchemaDataFormat data_format = 3; + CompatibilityMode compatibility = 4; +} diff --git a/packages/db-client/src/index.ts b/packages/db-client/src/index.ts index 6821dcd6..b85be2fd 100644 --- a/packages/db-client/src/index.ts +++ b/packages/db-client/src/index.ts @@ -1,5 +1,6 @@ export * from "./persistentSubscription"; export * from "./projections"; +export * from "./schemaRegistry"; export * from "./streams"; export { diff --git a/packages/db-client/src/schemaRegistry/checkSchemaCompatibility.ts b/packages/db-client/src/schemaRegistry/checkSchemaCompatibility.ts new file mode 100644 index 00000000..6e59f204 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/checkSchemaCompatibility.ts @@ -0,0 +1,105 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { CheckSchemaCompatibilityRequest } from "../../generated/kurrentdb/protocols/v2/registry/validation_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { + CheckSchemaCompatibilityOptions, + CheckSchemaCompatibilityResult, +} from "./types"; +import { + mapSchemaDataFormatToGrpc, + mapGrpcSchemaCompatibilityError, + toSchemaDefinitionBytes, +} from "./utils/mappers"; + +declare module "../Client" { + interface Client { + /** + * Checks if a schema definition is compatible with an existing schema. + * @param schemaDefinition - The schema definition to check. + * @param options - Options specifying the schema or version to check against, and the data format. + * @returns The compatibility result including any errors. + */ + checkSchemaCompatibility( + schemaDefinition: string | Uint8Array, + options: CheckSchemaCompatibilityOptions + ): Promise; + } +} + +Client.prototype.checkSchemaCompatibility = async function ( + this: Client, + schemaDefinition: string | Uint8Array, + options: CheckSchemaCompatibilityOptions +): Promise { + const { schemaName, schemaVersionId, dataFormat, ...baseOptions } = options; + + if (!schemaName && !schemaVersionId) { + throw new Error( + "Either schemaName or schemaVersionId must be provided in options" + ); + } + + const req = new CheckSchemaCompatibilityRequest(); + req.setDefinition(toSchemaDefinitionBytes(schemaDefinition)); + req.setDataFormat(mapSchemaDataFormatToGrpc(dataFormat)); + + if (schemaName !== undefined) { + req.setSchemaName(schemaName); + } else if (schemaVersionId !== undefined) { + req.setSchemaVersionId(schemaVersionId); + } + + debug.command("checkSchemaCompatibility: %O", { + schemaName, + schemaVersionId, + dataFormat, + definitionLength: + typeof schemaDefinition === "string" + ? schemaDefinition.length + : schemaDefinition.byteLength, + options: baseOptions, + }); + debug.command_grpc("checkSchemaCompatibility: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "checkSchemaCompatibility", + (client) => + new Promise((resolve, reject) => { + client.checkSchemaCompatibility( + req, + ...this.callArguments(baseOptions), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + + const success = response?.getSuccess(); + if (success) { + return resolve({ + isCompatible: true, + schemaVersionId: success.getSchemaVersionId(), + }); + } + + const failure = response?.getFailure(); + if (failure) { + return resolve({ + isCompatible: false, + errors: failure + .getErrorsList() + .map(mapGrpcSchemaCompatibilityError), + }); + } + + // Default to incompatible with no errors if response is empty + return resolve({ + isCompatible: false, + errors: [], + }); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/createSchema.ts b/packages/db-client/src/schemaRegistry/createSchema.ts new file mode 100644 index 00000000..f3c74d46 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/createSchema.ts @@ -0,0 +1,79 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { CreateSchemaRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { + CreateSchemaOptions, + CreateSchemaResult, + SchemaDetails, +} from "./types"; +import { + createGrpcSchemaDetails, + toSchemaDefinitionBytes, +} from "./utils/mappers"; + +declare module "../Client" { + interface Client { + /** + * Creates a new schema in the schema registry. + * @param schemaName - The name of the schema to create. + * @param details - The schema details including data format and compatibility mode. + * @param options - Optional settings including initial schema definition. + * @returns The result containing schema version ID and version number if a definition was provided. + */ + createSchema( + schemaName: string, + details: SchemaDetails, + options?: CreateSchemaOptions + ): Promise; + } +} + +Client.prototype.createSchema = async function ( + this: Client, + schemaName: string, + details: SchemaDetails, + options: CreateSchemaOptions = {} +): Promise { + const { schemaDefinition, ...baseOptions } = options; + + const req = new CreateSchemaRequest(); + req.setSchemaName(schemaName); + req.setDetails(createGrpcSchemaDetails(details)); + + if (schemaDefinition !== undefined) { + req.setSchemaDefinition(toSchemaDefinitionBytes(schemaDefinition)); + } + + debug.command("createSchema: %O", { + schemaName, + details, + hasDefinition: schemaDefinition !== undefined, + options: baseOptions, + }); + debug.command_grpc("createSchema: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "createSchema", + (client) => + new Promise((resolve, reject) => { + client.createSchema( + req, + ...this.callArguments(baseOptions), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + + const result: CreateSchemaResult = {}; + if (schemaDefinition !== undefined && response) { + result.schemaVersionId = response.getSchemaVersionId(); + result.versionNumber = response.getVersionNumber(); + } + return resolve(result); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/deleteSchema.ts b/packages/db-client/src/schemaRegistry/deleteSchema.ts new file mode 100644 index 00000000..058ccf55 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/deleteSchema.ts @@ -0,0 +1,48 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { DeleteSchemaRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { DeleteSchemaOptions } from "./types"; + +declare module "../Client" { + interface Client { + /** + * Deletes a schema and all its versions from the registry. + * @param schemaName - The name of the schema to delete. + * @param options - Command options. + */ + deleteSchema( + schemaName: string, + options?: DeleteSchemaOptions + ): Promise; + } +} + +Client.prototype.deleteSchema = async function ( + this: Client, + schemaName: string, + options: DeleteSchemaOptions = {} +): Promise { + const req = new DeleteSchemaRequest(); + req.setSchemaName(schemaName); + + debug.command("deleteSchema: %O", { + schemaName, + options, + }); + debug.command_grpc("deleteSchema: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "deleteSchema", + (client) => + new Promise((resolve, reject) => { + client.deleteSchema(req, ...this.callArguments(options), (error) => { + if (error) return reject(convertToCommandError(error)); + return resolve(); + }); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/deleteSchemaVersions.ts b/packages/db-client/src/schemaRegistry/deleteSchemaVersions.ts new file mode 100644 index 00000000..dfe723a4 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/deleteSchemaVersions.ts @@ -0,0 +1,66 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { DeleteSchemaVersionsRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; +import { mapGrpcSchemaVersionError } from "./utils/mappers"; + +import type { + DeleteSchemaVersionsOptions, + DeleteSchemaVersionsResult, +} from "./types"; + +declare module "../Client" { + interface Client { + /** + * Deletes specific versions of a schema. + * @param schemaName - The name of the schema. + * @param versions - The version numbers to delete. + * @param options - Command options. + * @returns Any errors that occurred during deletion. + */ + deleteSchemaVersions( + schemaName: string, + versions: number[], + options?: DeleteSchemaVersionsOptions + ): Promise; + } +} + +Client.prototype.deleteSchemaVersions = async function ( + this: Client, + schemaName: string, + versions: number[], + options: DeleteSchemaVersionsOptions = {} +): Promise { + const req = new DeleteSchemaVersionsRequest(); + req.setSchemaName(schemaName); + req.setVersionsList(versions); + + debug.command("deleteSchemaVersions: %O", { + schemaName, + versions, + options, + }); + debug.command_grpc("deleteSchemaVersions: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "deleteSchemaVersions", + (client) => + new Promise((resolve, reject) => { + client.deleteSchemaVersions( + req, + ...this.callArguments(options), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + + const errors = response?.getErrorsList() ?? []; + return resolve({ + errors: errors.map(mapGrpcSchemaVersionError), + }); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/getSchema.ts b/packages/db-client/src/schemaRegistry/getSchema.ts new file mode 100644 index 00000000..629e4c28 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/getSchema.ts @@ -0,0 +1,57 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { GetSchemaRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { GetSchemaOptions, Schema } from "./types"; +import { mapGrpcSchema } from "./utils/mappers"; + +declare module "../Client" { + interface Client { + /** + * Retrieves schema metadata by name. + * @param schemaName - The name of the schema to retrieve. + * @param options - Command options. + * @returns The schema metadata. + */ + getSchema(schemaName: string, options?: GetSchemaOptions): Promise; + } +} + +Client.prototype.getSchema = async function ( + this: Client, + schemaName: string, + options: GetSchemaOptions = {} +): Promise { + const req = new GetSchemaRequest(); + req.setSchemaName(schemaName); + + debug.command("getSchema: %O", { + schemaName, + options, + }); + debug.command_grpc("getSchema: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "getSchema", + (client) => + new Promise((resolve, reject) => { + client.getSchema( + req, + ...this.callArguments(options), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + + const grpcSchema = response?.getSchema(); + if (!grpcSchema) { + return reject(new Error("Schema not found in response")); + } + + return resolve(mapGrpcSchema(grpcSchema)); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/getSchemaVersion.ts b/packages/db-client/src/schemaRegistry/getSchemaVersion.ts new file mode 100644 index 00000000..b4f93191 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/getSchemaVersion.ts @@ -0,0 +1,67 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { GetSchemaVersionRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { GetSchemaVersionOptions, SchemaVersion } from "./types"; +import { mapGrpcSchemaVersion } from "./utils/mappers"; + +declare module "../Client" { + interface Client { + /** + * Retrieves a schema version by schema name and optional version number. + * @param schemaName - The name of the schema. + * @param options - Options including specific version number. If not provided, returns the latest version. + * @returns The schema version details. + */ + getSchemaVersion( + schemaName: string, + options?: GetSchemaVersionOptions + ): Promise; + } +} + +Client.prototype.getSchemaVersion = async function ( + this: Client, + schemaName: string, + options: GetSchemaVersionOptions = {} +): Promise { + const { versionNumber, ...baseOptions } = options; + + const req = new GetSchemaVersionRequest(); + req.setSchemaName(schemaName); + + if (versionNumber !== undefined) { + req.setVersionNumber(versionNumber); + } + + debug.command("getSchemaVersion: %O", { + schemaName, + versionNumber, + options: baseOptions, + }); + debug.command_grpc("getSchemaVersion: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "getSchemaVersion", + (client) => + new Promise((resolve, reject) => { + client.getSchemaVersion( + req, + ...this.callArguments(baseOptions), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + + const version = response?.getVersion(); + if (!version) { + return reject(new Error("Schema version not found in response")); + } + + return resolve(mapGrpcSchemaVersion(version)); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/getSchemaVersionById.ts b/packages/db-client/src/schemaRegistry/getSchemaVersionById.ts new file mode 100644 index 00000000..b3ff12f6 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/getSchemaVersionById.ts @@ -0,0 +1,60 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { GetSchemaVersionByIdRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { GetSchemaVersionByIdOptions, SchemaVersion } from "./types"; +import { mapGrpcSchemaVersion } from "./utils/mappers"; + +declare module "../Client" { + interface Client { + /** + * Retrieves a schema version by its unique version ID. + * @param schemaVersionId - The unique identifier of the schema version. + * @param options - Command options. + * @returns The schema version details. + */ + getSchemaVersionById( + schemaVersionId: string, + options?: GetSchemaVersionByIdOptions + ): Promise; + } +} + +Client.prototype.getSchemaVersionById = async function ( + this: Client, + schemaVersionId: string, + options: GetSchemaVersionByIdOptions = {} +): Promise { + const req = new GetSchemaVersionByIdRequest(); + req.setSchemaVersionId(schemaVersionId); + + debug.command("getSchemaVersionById: %O", { + schemaVersionId, + options, + }); + debug.command_grpc("getSchemaVersionById: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "getSchemaVersionById", + (client) => + new Promise((resolve, reject) => { + client.getSchemaVersionById( + req, + ...this.callArguments(options), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + + const version = response?.getVersion(); + if (!version) { + return reject(new Error("Schema version not found in response")); + } + + return resolve(mapGrpcSchemaVersion(version)); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/index.ts b/packages/db-client/src/schemaRegistry/index.ts new file mode 100644 index 00000000..4b50142e --- /dev/null +++ b/packages/db-client/src/schemaRegistry/index.ts @@ -0,0 +1,21 @@ +// Schema Management +export * from "./createSchema"; +export * from "./updateSchema"; +export * from "./deleteSchema"; +export * from "./getSchema"; +export * from "./listSchemas"; +export * from "./lookupSchemaName"; + +// Schema Version Management +export * from "./registerSchemaVersion"; +export * from "./deleteSchemaVersions"; +export * from "./getSchemaVersion"; +export * from "./getSchemaVersionById"; +export * from "./listSchemaVersions"; +export * from "./listRegisteredSchemas"; + +// Schema Compatibility +export * from "./checkSchemaCompatibility"; + +// Types +export * from "./types"; diff --git a/packages/db-client/src/schemaRegistry/listRegisteredSchemas.ts b/packages/db-client/src/schemaRegistry/listRegisteredSchemas.ts new file mode 100644 index 00000000..649eef24 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/listRegisteredSchemas.ts @@ -0,0 +1,80 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { ListRegisteredSchemasRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { ListRegisteredSchemasOptions, RegisteredSchema } from "./types"; +import { mapGrpcRegisteredSchema } from "./utils/mappers"; + +declare module "../Client" { + interface Client { + /** + * Lists schemas with their latest version information. + * @param options - Filter and command options. + * @returns An array of registered schemas with their latest versions. + */ + listRegisteredSchemas( + options?: ListRegisteredSchemasOptions + ): Promise; + } +} + +Client.prototype.listRegisteredSchemas = async function ( + this: Client, + options: ListRegisteredSchemasOptions = {} +): Promise { + const { + schemaVersionId, + schemaNamePrefix, + schemaTags, + includeDefinition = false, + ...baseOptions + } = options; + + const req = new ListRegisteredSchemasRequest(); + + if (schemaVersionId !== undefined) { + req.setSchemaVersionId(schemaVersionId); + } + + if (schemaNamePrefix !== undefined) { + req.setSchemaNamePrefix(schemaNamePrefix); + } + + if (schemaTags !== undefined) { + const tagsMap = req.getSchemaTagsMap(); + for (const [key, value] of Object.entries(schemaTags)) { + tagsMap.set(key, value); + } + } + + req.setIncludeDefinition(includeDefinition); + + debug.command("listRegisteredSchemas: %O", { + schemaVersionId, + schemaNamePrefix, + schemaTags, + includeDefinition, + options: baseOptions, + }); + debug.command_grpc("listRegisteredSchemas: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "listRegisteredSchemas", + (client) => + new Promise((resolve, reject) => { + client.listRegisteredSchemas( + req, + ...this.callArguments(baseOptions), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + + const schemas = response?.getSchemasList() ?? []; + return resolve(schemas.map(mapGrpcRegisteredSchema)); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/listSchemaVersions.ts b/packages/db-client/src/schemaRegistry/listSchemaVersions.ts new file mode 100644 index 00000000..53bb4e6e --- /dev/null +++ b/packages/db-client/src/schemaRegistry/listSchemaVersions.ts @@ -0,0 +1,60 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { ListSchemaVersionsRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { ListSchemaVersionsOptions, SchemaVersion } from "./types"; +import { mapGrpcSchemaVersion } from "./utils/mappers"; + +declare module "../Client" { + interface Client { + /** + * Lists all versions of a schema. + * @param schemaName - The name of the schema. + * @param options - Options including whether to include schema definitions. + * @returns An array of schema versions. + */ + listSchemaVersions( + schemaName: string, + options?: ListSchemaVersionsOptions + ): Promise; + } +} + +Client.prototype.listSchemaVersions = async function ( + this: Client, + schemaName: string, + options: ListSchemaVersionsOptions = {} +): Promise { + const { includeDefinition = false, ...baseOptions } = options; + + const req = new ListSchemaVersionsRequest(); + req.setSchemaName(schemaName); + req.setIncludeDefinition(includeDefinition); + + debug.command("listSchemaVersions: %O", { + schemaName, + includeDefinition, + options: baseOptions, + }); + debug.command_grpc("listSchemaVersions: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "listSchemaVersions", + (client) => + new Promise((resolve, reject) => { + client.listSchemaVersions( + req, + ...this.callArguments(baseOptions), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + + const versions = response?.getVersionsList() ?? []; + return resolve(versions.map(mapGrpcSchemaVersion)); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/listSchemas.ts b/packages/db-client/src/schemaRegistry/listSchemas.ts new file mode 100644 index 00000000..2667f83d --- /dev/null +++ b/packages/db-client/src/schemaRegistry/listSchemas.ts @@ -0,0 +1,64 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { ListSchemasRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { ListSchemasOptions, Schema } from "./types"; +import { mapGrpcSchema } from "./utils/mappers"; + +declare module "../Client" { + interface Client { + /** + * Lists schemas with optional filtering. + * @param options - Filter and command options. + * @returns An array of schemas matching the filters. + */ + listSchemas(options?: ListSchemasOptions): Promise; + } +} + +Client.prototype.listSchemas = async function ( + this: Client, + options: ListSchemasOptions = {} +): Promise { + const { schemaNamePrefix, schemaTags, ...baseOptions } = options; + + const req = new ListSchemasRequest(); + + if (schemaNamePrefix !== undefined) { + req.setSchemaNamePrefix(schemaNamePrefix); + } + + if (schemaTags !== undefined) { + const tagsMap = req.getSchemaTagsMap(); + for (const [key, value] of Object.entries(schemaTags)) { + tagsMap.set(key, value); + } + } + + debug.command("listSchemas: %O", { + schemaNamePrefix, + schemaTags, + options: baseOptions, + }); + debug.command_grpc("listSchemas: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "listSchemas", + (client) => + new Promise((resolve, reject) => { + client.listSchemas( + req, + ...this.callArguments(baseOptions), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + + const schemas = response?.getSchemasList() ?? []; + return resolve(schemas.map(mapGrpcSchema)); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/lookupSchemaName.ts b/packages/db-client/src/schemaRegistry/lookupSchemaName.ts new file mode 100644 index 00000000..17142ea7 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/lookupSchemaName.ts @@ -0,0 +1,53 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { LookupSchemaNameRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { LookupSchemaNameOptions } from "./types"; + +declare module "../Client" { + interface Client { + /** + * Looks up the schema name by a schema version ID. + * @param schemaVersionId - The schema version ID to look up. + * @param options - Command options. + * @returns The schema name that owns the specified version. + */ + lookupSchemaName( + schemaVersionId: string, + options?: LookupSchemaNameOptions + ): Promise; + } +} + +Client.prototype.lookupSchemaName = async function ( + this: Client, + schemaVersionId: string, + options: LookupSchemaNameOptions = {} +): Promise { + const req = new LookupSchemaNameRequest(); + req.setSchemaVersionId(schemaVersionId); + + debug.command("lookupSchemaName: %O", { + schemaVersionId, + options, + }); + debug.command_grpc("lookupSchemaName: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "lookupSchemaName", + (client) => + new Promise((resolve, reject) => { + client.lookupSchemaName( + req, + ...this.callArguments(options), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + return resolve(response?.getSchemaName() ?? ""); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/registerSchemaVersion.ts b/packages/db-client/src/schemaRegistry/registerSchemaVersion.ts new file mode 100644 index 00000000..9bb79ef0 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/registerSchemaVersion.ts @@ -0,0 +1,69 @@ +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { RegisterSchemaVersionRequest } from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { + RegisterSchemaVersionOptions, + RegisterSchemaVersionResult, +} from "./types"; +import { toSchemaDefinitionBytes } from "./utils/mappers"; + +declare module "../Client" { + interface Client { + /** + * Registers a new version for an existing schema. + * @param schemaName - The name of the schema to add a version to. + * @param schemaDefinition - The schema definition for the new version. + * @param options - Command options. + * @returns The registered schema version ID and version number. + */ + registerSchemaVersion( + schemaName: string, + schemaDefinition: string | Uint8Array, + options?: RegisterSchemaVersionOptions + ): Promise; + } +} + +Client.prototype.registerSchemaVersion = async function ( + this: Client, + schemaName: string, + schemaDefinition: string | Uint8Array, + options: RegisterSchemaVersionOptions = {} +): Promise { + const req = new RegisterSchemaVersionRequest(); + req.setSchemaName(schemaName); + req.setSchemaDefinition(toSchemaDefinitionBytes(schemaDefinition)); + + debug.command("registerSchemaVersion: %O", { + schemaName, + definitionLength: + typeof schemaDefinition === "string" + ? schemaDefinition.length + : schemaDefinition.byteLength, + options, + }); + debug.command_grpc("registerSchemaVersion: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "registerSchemaVersion", + (client) => + new Promise((resolve, reject) => { + client.registerSchemaVersion( + req, + ...this.callArguments(options), + (error, response) => { + if (error) return reject(convertToCommandError(error)); + + return resolve({ + schemaVersionId: response?.getSchemaVersionId() ?? "", + versionNumber: response?.getVersionNumber() ?? 0, + }); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/types.ts b/packages/db-client/src/schemaRegistry/types.ts new file mode 100644 index 00000000..c55ad4a5 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/types.ts @@ -0,0 +1,394 @@ +import type { BaseOptions } from "../types"; + +/** + * Schema data format types supported by the schema registry. + */ +export type SchemaDataFormat = "json" | "protobuf" | "avro" | "bytes"; + +/** + * Schema compatibility modes for version validation. + */ +export type CompatibilityMode = + | "backward" + | "forward" + | "full" + | "backward-all" + | "forward-all" + | "full-all" + | "none"; + +/** + * Schema details for creating or updating a schema. + */ +export interface SchemaDetails { + /** + * The data format of the schema. + */ + dataFormat: SchemaDataFormat; + /** + * The compatibility mode for schema versions. + */ + compatibility: CompatibilityMode; + /** + * Optional description of the schema. + */ + description?: string; + /** + * Optional tags for the schema. + */ + tags?: Record; +} + +/** + * Represents a schema in the registry. + */ +export interface Schema { + /** + * The name of the schema. + */ + schemaName: string; + /** + * The schema details. + */ + details: SchemaDetails; + /** + * The latest version number of the schema. + */ + latestSchemaVersion: number; + /** + * When the schema was created. + */ + createdAt?: Date; + /** + * When the schema was last updated. + */ + updatedAt?: Date; +} + +/** + * Represents a version of a schema. + */ +export interface SchemaVersion { + /** + * The unique identifier for this schema version. + */ + schemaVersionId: string; + /** + * The version number. + */ + versionNumber: number; + /** + * The schema definition bytes. + */ + schemaDefinition: Uint8Array; + /** + * The data format of the schema. + */ + dataFormat: SchemaDataFormat; + /** + * When the version was registered. + */ + registeredAt?: Date; +} + +/** + * Represents a registered schema with its latest version information. + */ +export interface RegisteredSchema { + /** + * The name of the schema. + */ + schemaName: string; + /** + * The unique identifier for the schema version. + */ + schemaVersionId: string; + /** + * The version number. + */ + versionNumber: number; + /** + * The schema definition bytes. + */ + schemaDefinition?: Uint8Array; + /** + * The data format of the schema. + */ + dataFormat: SchemaDataFormat; + /** + * The compatibility mode for schema versions. + */ + compatibility: CompatibilityMode; + /** + * Tags associated with the schema. + */ + tags: Record; + /** + * When the version was registered. + */ + registeredAt?: Date; +} + +/** + * Error details for a schema version operation. + */ +export interface SchemaVersionError { + /** + * The version number that had an error. + */ + versionNumber: number; + /** + * The error details. + */ + error?: { + code: string; + message: string; + }; +} + +/** + * Schema compatibility error information. + */ +export interface SchemaCompatibilityError { + /** + * The kind of compatibility error. + */ + kind: SchemaCompatibilityErrorKind; + /** + * Detailed description of the error. + */ + details: string; + /** + * The property path where the error occurred. + */ + propertyPath?: string; + /** + * The original type before the change. + */ + originalType?: string; + /** + * The new type after the change. + */ + newType?: string; +} + +/** + * Types of schema compatibility errors. + */ +export type SchemaCompatibilityErrorKind = + | "unspecified" + | "missing-required-property" + | "incompatible-type-change" + | "optional-to-required" + | "new-required-property" + | "removed-property" + | "array-type-incompatibility" + | "data-format-mismatch"; + +// ============================================================================ +// Request/Response Options +// ============================================================================ + +/** + * Options for creating a schema. + */ +export interface CreateSchemaOptions extends BaseOptions { + /** + * Optional initial schema definition. If provided, the schema will be created + * with version 1 containing this definition. + */ + schemaDefinition?: string | Uint8Array; +} + +/** + * Result of creating a schema. + */ +export interface CreateSchemaResult { + /** + * The schema version ID (only present if schemaDefinition was provided). + */ + schemaVersionId?: string; + /** + * The version number (only present if schemaDefinition was provided). + */ + versionNumber?: number; +} + +/** + * Options for updating a schema. + */ +export interface UpdateSchemaOptions extends BaseOptions { + /** + * The data format of the schema (must match existing schema). + */ + dataFormat: SchemaDataFormat; + /** + * The compatibility mode (must match existing schema). + */ + compatibility: CompatibilityMode; + /** + * Updated description for the schema. + */ + description?: string; + /** + * Updated tags for the schema. + */ + tags?: Record; +} + +/** + * Options for deleting a schema. + */ +export type DeleteSchemaOptions = BaseOptions; + +/** + * Options for getting a schema. + */ +export type GetSchemaOptions = BaseOptions; + +/** + * Options for listing schemas. + */ +export interface ListSchemasOptions extends BaseOptions { + /** + * Filter schemas by name prefix. + */ + schemaNamePrefix?: string; + /** + * Filter schemas by tags. + */ + schemaTags?: Record; +} + +/** + * Options for looking up a schema name. + */ +export type LookupSchemaNameOptions = BaseOptions; + +/** + * Options for registering a schema version. + */ +export type RegisterSchemaVersionOptions = BaseOptions; + +/** + * Result of registering a schema version. + */ +export interface RegisterSchemaVersionResult { + /** + * The unique identifier for the registered schema version. + */ + schemaVersionId: string; + /** + * The version number assigned to the registration. + */ + versionNumber: number; +} + +/** + * Options for deleting schema versions. + */ +export type DeleteSchemaVersionsOptions = BaseOptions; + +/** + * Result of deleting schema versions. + */ +export interface DeleteSchemaVersionsResult { + /** + * Errors that occurred during deletion, if any. + */ + errors: SchemaVersionError[]; +} + +/** + * Options for getting a schema version. + */ +export interface GetSchemaVersionOptions extends BaseOptions { + /** + * The specific version number to retrieve. If not provided, returns the latest version. + */ + versionNumber?: number; +} + +/** + * Options for getting a schema version by ID. + */ +export type GetSchemaVersionByIdOptions = BaseOptions; + +/** + * Options for listing schema versions. + */ +export interface ListSchemaVersionsOptions extends BaseOptions { + /** + * Whether to include the schema definition in the response. + * @defaultValue false + */ + includeDefinition?: boolean; +} + +/** + * Options for listing registered schemas. + */ +export interface ListRegisteredSchemasOptions extends BaseOptions { + /** + * Filter by a specific schema version ID. + */ + schemaVersionId?: string; + /** + * Filter schemas by name prefix. + */ + schemaNamePrefix?: string; + /** + * Filter schemas by tags. + */ + schemaTags?: Record; + /** + * Whether to include the schema definition in the response. + * @defaultValue false + */ + includeDefinition?: boolean; +} + +/** + * Options for checking schema compatibility. + */ +export interface CheckSchemaCompatibilityOptions extends BaseOptions { + /** + * The schema name to check compatibility against. + * Either schemaName or schemaVersionId must be provided. + */ + schemaName?: string; + /** + * The specific schema version ID to check compatibility against. + * Either schemaName or schemaVersionId must be provided. + */ + schemaVersionId?: string; + /** + * The data format of the schema definition being checked. + */ + dataFormat: SchemaDataFormat; +} + +/** + * Result of checking schema compatibility. + */ +export type CheckSchemaCompatibilityResult = + | { + /** + * Whether the schema is compatible. + */ + isCompatible: true; + /** + * The schema version ID that was checked against. + */ + schemaVersionId: string; + } + | { + /** + * Whether the schema is compatible. + */ + isCompatible: false; + /** + * The compatibility errors found. + */ + errors: SchemaCompatibilityError[]; + }; diff --git a/packages/db-client/src/schemaRegistry/updateSchema.ts b/packages/db-client/src/schemaRegistry/updateSchema.ts new file mode 100644 index 00000000..84094b5d --- /dev/null +++ b/packages/db-client/src/schemaRegistry/updateSchema.ts @@ -0,0 +1,92 @@ +import { FieldMask } from "google-protobuf/google/protobuf/field_mask_pb"; + +import { SchemaRegistryServiceClient } from "../../generated/kurrentdb/protocols/v2/registry/service_grpc_pb"; +import { + UpdateSchemaRequest, + SchemaDetails as GrpcSchemaDetails, +} from "../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; + +import { Client } from "../Client"; +import { debug, convertToCommandError } from "../utils"; + +import type { UpdateSchemaOptions } from "./types"; +import { mapCompatibilityModeToGrpc, mapSchemaDataFormatToGrpc } from "./utils"; + +declare module "../Client" { + interface Client { + /** + * Updates schema metadata (description and/or tags). + * @param schemaName - The name of the schema to update. + * @param options - The update options including description and tags to update. + */ + updateSchema( + schemaName: string, + options?: UpdateSchemaOptions + ): Promise; + } +} + +Client.prototype.updateSchema = async function ( + this: Client, + schemaName: string, + options: UpdateSchemaOptions +): Promise { + const { description, tags, dataFormat, compatibility, ...baseOptions } = + options; + + const req = new UpdateSchemaRequest(); + req.setSchemaName(schemaName); + + const details = new GrpcSchemaDetails(); + const updatePaths: string[] = []; + + // dataFormat and compatibility are required fields but not updated via field mask + details.setDataFormat(mapSchemaDataFormatToGrpc(dataFormat)); + details.setCompatibility(mapCompatibilityModeToGrpc(compatibility)); + + if (description !== undefined) { + details.setDescription(description); + updatePaths.push("details.description"); + } + + if (tags !== undefined) { + const tagsMap = details.getTagsMap(); + for (const [key, value] of Object.entries(tags)) { + tagsMap.set(key, value); + } + updatePaths.push("details.tags"); + } + + req.setDetails(details); + + if (updatePaths.length > 0) { + const fieldMask = new FieldMask(); + fieldMask.setPathsList(updatePaths); + req.setUpdateMask(fieldMask); + } + + debug.command("updateSchema: %O", { + schemaName, + description, + tags, + updatePaths, + options: baseOptions, + }); + debug.command_grpc("updateSchema: %g", req); + + return this.execute( + SchemaRegistryServiceClient, + "updateSchema", + (client) => + new Promise((resolve, reject) => { + client.updateSchema( + req, + ...this.callArguments(baseOptions), + (error) => { + if (error) return reject(convertToCommandError(error)); + return resolve(); + } + ); + }) + ); +}; diff --git a/packages/db-client/src/schemaRegistry/utils/index.ts b/packages/db-client/src/schemaRegistry/utils/index.ts new file mode 100644 index 00000000..c7468d98 --- /dev/null +++ b/packages/db-client/src/schemaRegistry/utils/index.ts @@ -0,0 +1 @@ +export * from "./mappers"; diff --git a/packages/db-client/src/schemaRegistry/utils/mappers.ts b/packages/db-client/src/schemaRegistry/utils/mappers.ts new file mode 100644 index 00000000..e0c1682d --- /dev/null +++ b/packages/db-client/src/schemaRegistry/utils/mappers.ts @@ -0,0 +1,281 @@ +import { Timestamp } from "google-protobuf/google/protobuf/timestamp_pb"; + +import { + SchemaDataFormat as GrpcSchemaDataFormat, + CompatibilityMode as GrpcCompatibilityMode, +} from "../../../generated/kurrentdb/protocols/v2/registry/shared_pb"; +import { + Schema as GrpcSchema, + SchemaDetails as GrpcSchemaDetails, + SchemaVersion as GrpcSchemaVersion, + RegisteredSchema as GrpcRegisteredSchema, + DeleteSchemaVersionsResponse, +} from "../../../generated/kurrentdb/protocols/v2/registry/schemas_pb"; +import { + SchemaCompatibilityError as GrpcSchemaCompatibilityError, + SchemaCompatibilityErrorKind as GrpcSchemaCompatibilityErrorKind, +} from "../../../generated/kurrentdb/protocols/v2/registry/validation_pb"; + +import type { + SchemaDataFormat, + CompatibilityMode, + Schema, + SchemaDetails, + SchemaVersion, + RegisteredSchema, + SchemaVersionError, + SchemaCompatibilityError, + SchemaCompatibilityErrorKind, +} from "../types"; + +// ============================================================================ +// Enum Mappers +// ============================================================================ + +const schemaDataFormatToGrpc: Record = { + json: GrpcSchemaDataFormat.SCHEMA_DATA_FORMAT_JSON, + protobuf: GrpcSchemaDataFormat.SCHEMA_DATA_FORMAT_PROTOBUF, + avro: GrpcSchemaDataFormat.SCHEMA_DATA_FORMAT_AVRO, + bytes: GrpcSchemaDataFormat.SCHEMA_DATA_FORMAT_BYTES, +}; + +const grpcSchemaDataFormatMap: Record = + { + [GrpcSchemaDataFormat.SCHEMA_DATA_FORMAT_UNSPECIFIED]: "bytes", + [GrpcSchemaDataFormat.SCHEMA_DATA_FORMAT_JSON]: "json", + [GrpcSchemaDataFormat.SCHEMA_DATA_FORMAT_PROTOBUF]: "protobuf", + [GrpcSchemaDataFormat.SCHEMA_DATA_FORMAT_AVRO]: "avro", + [GrpcSchemaDataFormat.SCHEMA_DATA_FORMAT_BYTES]: "bytes", + }; + +const compatibilityModeToGrpc: Record< + CompatibilityMode, + GrpcCompatibilityMode +> = { + backward: GrpcCompatibilityMode.COMPATIBILITY_MODE_BACKWARD, + forward: GrpcCompatibilityMode.COMPATIBILITY_MODE_FORWARD, + full: GrpcCompatibilityMode.COMPATIBILITY_MODE_FULL, + "backward-all": GrpcCompatibilityMode.COMPATIBILITY_MODE_BACKWARD_ALL, + "forward-all": GrpcCompatibilityMode.COMPATIBILITY_MODE_FORWARD_ALL, + "full-all": GrpcCompatibilityMode.COMPATIBILITY_MODE_FULL_ALL, + none: GrpcCompatibilityMode.COMPATIBILITY_MODE_NONE, +}; + +const grpcCompatibilityModeMap: Record< + GrpcCompatibilityMode, + CompatibilityMode +> = { + [GrpcCompatibilityMode.COMPATIBILITY_MODE_UNSPECIFIED]: "none", + [GrpcCompatibilityMode.COMPATIBILITY_MODE_BACKWARD]: "backward", + [GrpcCompatibilityMode.COMPATIBILITY_MODE_FORWARD]: "forward", + [GrpcCompatibilityMode.COMPATIBILITY_MODE_FULL]: "full", + [GrpcCompatibilityMode.COMPATIBILITY_MODE_BACKWARD_ALL]: "backward-all", + [GrpcCompatibilityMode.COMPATIBILITY_MODE_FORWARD_ALL]: "forward-all", + [GrpcCompatibilityMode.COMPATIBILITY_MODE_FULL_ALL]: "full-all", + [GrpcCompatibilityMode.COMPATIBILITY_MODE_NONE]: "none", +}; + +const grpcSchemaCompatibilityErrorKindMap: Record< + GrpcSchemaCompatibilityErrorKind, + SchemaCompatibilityErrorKind +> = { + [GrpcSchemaCompatibilityErrorKind.SCHEMA_COMPATIBILITY_ERROR_KIND_UNSPECIFIED]: + "unspecified", + [GrpcSchemaCompatibilityErrorKind.SCHEMA_COMPATIBILITY_ERROR_KIND_MISSING_REQUIRED_PROPERTY]: + "missing-required-property", + [GrpcSchemaCompatibilityErrorKind.SCHEMA_COMPATIBILITY_ERROR_KIND_INCOMPATIBLE_TYPE_CHANGE]: + "incompatible-type-change", + [GrpcSchemaCompatibilityErrorKind.SCHEMA_COMPATIBILITY_ERROR_KIND_OPTIONAL_TO_REQUIRED]: + "optional-to-required", + [GrpcSchemaCompatibilityErrorKind.SCHEMA_COMPATIBILITY_ERROR_KIND_NEW_REQUIRED_PROPERTY]: + "new-required-property", + [GrpcSchemaCompatibilityErrorKind.SCHEMA_COMPATIBILITY_ERROR_KIND_REMOVED_PROPERTY]: + "removed-property", + [GrpcSchemaCompatibilityErrorKind.SCHEMA_COMPATIBILITY_ERROR_KIND_ARRAY_TYPE_INCOMPATIBILITY]: + "array-type-incompatibility", + [GrpcSchemaCompatibilityErrorKind.SCHEMA_COMPATIBILITY_ERROR_KIND_DATA_FORMAT_MISMATCH]: + "data-format-mismatch", +}; + +// ============================================================================ +// Export Enum Conversion Functions +// ============================================================================ + +export function mapSchemaDataFormatToGrpc( + format: SchemaDataFormat +): GrpcSchemaDataFormat { + return schemaDataFormatToGrpc[format]; +} + +export function mapGrpcSchemaDataFormat( + format: GrpcSchemaDataFormat +): SchemaDataFormat { + return grpcSchemaDataFormatMap[format]; +} + +export function mapCompatibilityModeToGrpc( + mode: CompatibilityMode +): GrpcCompatibilityMode { + return compatibilityModeToGrpc[mode]; +} + +export function mapGrpcCompatibilityMode( + mode: GrpcCompatibilityMode +): CompatibilityMode { + return grpcCompatibilityModeMap[mode]; +} + +// ============================================================================ +// Timestamp Mapper +// ============================================================================ + +export function mapGrpcTimestamp( + timestamp: Timestamp | undefined +): Date | undefined { + if (!timestamp) return undefined; + const seconds = timestamp.getSeconds(); + const nanos = timestamp.getNanos(); + return new Date(seconds * 1000 + Math.floor(nanos / 1_000_000)); +} + +// ============================================================================ +// Map Utilities +// ============================================================================ + +function mapToRecord( + map: Array<[K, V]> | Map +): Record { + const result: Record = {}; + if (Array.isArray(map)) { + for (const [key, value] of map) { + result[key] = value; + } + } else { + map.forEach((value, key) => { + result[key] = value; + }); + } + return result; +} + +// ============================================================================ +// Message Mappers +// ============================================================================ + +export function mapGrpcSchemaDetails( + details: GrpcSchemaDetails | undefined +): SchemaDetails { + if (!details) { + return { + dataFormat: "bytes", + compatibility: "none", + }; + } + + return { + dataFormat: mapGrpcSchemaDataFormat(details.getDataFormat()), + compatibility: mapGrpcCompatibilityMode(details.getCompatibility()), + description: details.getDescription(), + tags: mapToRecord(details.getTagsMap().toArray()), + }; +} + +export function mapGrpcSchema(grpcSchema: GrpcSchema): Schema { + return { + schemaName: grpcSchema.getSchemaName(), + details: mapGrpcSchemaDetails(grpcSchema.getDetails()), + latestSchemaVersion: grpcSchema.getLatestSchemaVersion(), + createdAt: mapGrpcTimestamp(grpcSchema.getCreatedAt()), + updatedAt: mapGrpcTimestamp(grpcSchema.getUpdatedAt()), + }; +} + +export function mapGrpcSchemaVersion( + grpcVersion: GrpcSchemaVersion +): SchemaVersion { + return { + schemaVersionId: grpcVersion.getSchemaVersionId(), + versionNumber: grpcVersion.getVersionNumber(), + schemaDefinition: grpcVersion.getSchemaDefinition_asU8(), + dataFormat: mapGrpcSchemaDataFormat(grpcVersion.getDataFormat()), + registeredAt: mapGrpcTimestamp(grpcVersion.getRegisteredAt()), + }; +} + +export function mapGrpcRegisteredSchema( + grpcSchema: GrpcRegisteredSchema +): RegisteredSchema { + const definition = grpcSchema.getSchemaDefinition_asU8(); + return { + schemaName: grpcSchema.getSchemaName(), + schemaVersionId: grpcSchema.getSchemaVersionId(), + versionNumber: grpcSchema.getVersionNumber(), + schemaDefinition: definition.length > 0 ? definition : undefined, + dataFormat: mapGrpcSchemaDataFormat(grpcSchema.getDataFormat()), + compatibility: mapGrpcCompatibilityMode(grpcSchema.getCompatibility()), + tags: mapToRecord(grpcSchema.getTagsMap().toArray()), + registeredAt: mapGrpcTimestamp(grpcSchema.getRegisteredAt()), + }; +} + +export function mapGrpcSchemaVersionError( + error: DeleteSchemaVersionsResponse.SchemaVersionError +): SchemaVersionError { + return { + versionNumber: error.getVersionNumber(), + }; +} + +export function mapGrpcSchemaCompatibilityError( + error: GrpcSchemaCompatibilityError +): SchemaCompatibilityError { + return { + kind: grpcSchemaCompatibilityErrorKindMap[error.getKind()], + details: error.getDetails(), + propertyPath: error.getPropertyPath() || undefined, + originalType: error.getOriginalType() || undefined, + newType: error.getNewType() || undefined, + }; +} + +// ============================================================================ +// Input Conversion Utilities +// ============================================================================ + +/** + * Converts a string or Uint8Array schema definition to Uint8Array. + */ +export function toSchemaDefinitionBytes( + definition: string | Uint8Array +): Uint8Array { + if (typeof definition === "string") { + return new TextEncoder().encode(definition); + } + return definition; +} + +/** + * Creates a GrpcSchemaDetails from the input parameters. + */ +export function createGrpcSchemaDetails( + details: SchemaDetails +): GrpcSchemaDetails { + const grpcDetails = new GrpcSchemaDetails(); + grpcDetails.setDataFormat(mapSchemaDataFormatToGrpc(details.dataFormat)); + grpcDetails.setCompatibility( + mapCompatibilityModeToGrpc(details.compatibility) + ); + + if (details.description !== undefined) { + grpcDetails.setDescription(details.description); + } + + if (details.tags) { + const tagsMap = grpcDetails.getTagsMap(); + for (const [key, value] of Object.entries(details.tags)) { + tagsMap.set(key, value); + } + } + + return grpcDetails; +} diff --git a/packages/test/src/schemaRegistry/checkSchemaCompatibility.test.ts b/packages/test/src/schemaRegistry/checkSchemaCompatibility.test.ts new file mode 100644 index 00000000..33fbcfda --- /dev/null +++ b/packages/test/src/schemaRegistry/checkSchemaCompatibility.test.ts @@ -0,0 +1,271 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + delay, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("checkSchemaCompatibility", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("check by schema name", () => { + test("compatible definition returns success", async () => { + const schemaName = generateSchemaName(); + + // Create schema with backward compatibility + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "backward", + }, + { + schemaDefinition: JSON.stringify({ + type: "object", + properties: { + name: { type: "string" }, + }, + required: ["name"], + }), + } + ); + + // Ensure any eventual consistency + await delay(100); + + // Check backward compatible definition (adding optional field) + const result = await client.checkSchemaCompatibility( + JSON.stringify({ + type: "object", + properties: { + name: { type: "string" }, + age: { type: "number" }, + }, + required: ["name"], + }), + { schemaName, dataFormat: "json" } + ); + + expect(result.isCompatible).toBe(true); + if (!result.isCompatible) { + expect(result.errors.length).toBe(0); + } + }); + + test("incompatible definition returns errors", async () => { + const schemaName = generateSchemaName(); + + // Create schema with full compatibility + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "full", + }, + { + schemaDefinition: JSON.stringify({ + type: "object", + properties: { + name: { type: "string" }, + }, + required: ["name"], + }), + } + ); + + // Ensure any eventual consistency + await delay(100); + + // Check incompatible definition (changing required field type) + const result = await client.checkSchemaCompatibility( + JSON.stringify({ + type: "object", + properties: { + name: { type: "number" }, + }, + required: ["name"], + }), + { schemaName, dataFormat: "json" } + ); + + expect(result.isCompatible).toBe(false); + if (!result.isCompatible) { + expect(result.errors.length).toBeGreaterThan(0); + } + }); + + test("compatibility mode 'none' accepts any definition", async () => { + const schemaName = generateSchemaName(); + + // Create schema with no compatibility checks + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { + schemaDefinition: JSON.stringify({ + type: "object", + properties: { old: { type: "string" } }, + }), + } + ); + + // Ensure any eventual consistency + await delay(100); + + // Completely different schema should be compatible with 'none' + const result = await client.checkSchemaCompatibility( + JSON.stringify({ + type: "array", + items: { type: "number" }, + }), + { schemaName, dataFormat: "json" } + ); + + expect(result.isCompatible).toBe(true); + }); + }); + + optionalDescribe(supported)("check by schema version ID", () => { + test("check against specific version by ID", async () => { + const schemaName = generateSchemaName(); + + // Create schema with multiple versions + const createResult = await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "backward", + }, + { + schemaDefinition: JSON.stringify({ + type: "object", + properties: { v1Field: { type: "string" } }, + }), + } + ); + + const version1Id = createResult.schemaVersionId!; + + // Register second version + await client.registerSchemaVersion( + schemaName, + JSON.stringify({ + type: "object", + properties: { + v1Field: { type: "string" }, + v2Field: { type: "number" }, + }, + }) + ); + + // Ensure any eventual consistency + await delay(100); + + // Check compatibility against version 1 specifically + const result = await client.checkSchemaCompatibility( + JSON.stringify({ + type: "object", + properties: { + v1Field: { type: "string" }, + newField: { type: "boolean" }, + }, + }), + { schemaVersionId: version1Id, dataFormat: "json" } + ); + + expect(result.isCompatible).toBeDefined(); + }); + }); + + optionalDescribe(supported)("error details", () => { + test("errors include descriptive messages", async () => { + const schemaName = generateSchemaName(); + + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "forward", + }, + { + schemaDefinition: JSON.stringify({ + type: "object", + properties: { + required_field: { type: "string" }, + }, + required: ["required_field"], + }), + } + ); + + // Ensure any eventual consistency + await delay(100); + + // Breaking forward compatibility by adding required field + const result = await client.checkSchemaCompatibility( + JSON.stringify({ + type: "object", + properties: { + required_field: { type: "string" }, + another_required: { type: "string" }, + }, + required: ["required_field", "another_required"], + }), + { schemaName, dataFormat: "json" } + ); + + // The exact behavior depends on the server's compatibility implementation + expect(result).toBeDefined(); + expect(typeof result.isCompatible).toBe("boolean"); + if (!result.isCompatible) { + expect(Array.isArray(result.errors)).toBe(true); + } + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("error when checking non-existent schema", async () => { + const nonExistentName = `non-existent-${Date.now()}`; + + await expect( + client.checkSchemaCompatibility(JSON.stringify({ type: "object" }), { + schemaName: nonExistentName, + dataFormat: "json", + }) + ).rejects.toThrow(); + }); + + test("error when checking non-existent version ID", async () => { + const fakeVersionId = "00000000-0000-0000-0000-000000000000"; + + await expect( + client.checkSchemaCompatibility(JSON.stringify({ type: "object" }), { + schemaVersionId: fakeVersionId, + dataFormat: "json", + }) + ).rejects.toThrow(); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/createSchema.test.ts b/packages/test/src/schemaRegistry/createSchema.test.ts new file mode 100644 index 00000000..b144c449 --- /dev/null +++ b/packages/test/src/schemaRegistry/createSchema.test.ts @@ -0,0 +1,140 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("createSchema", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should create a schema", () => { + test("with metadata and definition", async () => { + const schemaName = generateSchemaName(); + + const result = await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "backward", + description: "Test schema with definition", + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + expect(result).toBeDefined(); + expect(result.schemaVersionId).toBeDefined(); + expect(result.versionNumber).toBe(1); + }); + + test("with initial definition", async () => { + const schemaName = generateSchemaName(); + const definition = JSON.stringify({ + type: "object", + properties: { + name: { type: "string" }, + age: { type: "number" }, + }, + }); + + const result = await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "backward", + description: "Test schema with definition", + }, + { schemaDefinition: definition } + ); + + expect(result).toBeDefined(); + expect(result.schemaVersionId).toBeDefined(); + expect(result.schemaVersionId).not.toBe(""); + expect(result.versionNumber).toBe(1); + }); + + test("with tags", async () => { + const schemaName = generateSchemaName(); + + const result = await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + tags: { + environment: "test", + owner: "test-suite", + }, + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + expect(result).toBeDefined(); + }); + + test("with different data formats", async () => { + const formats = ["json", "protobuf", "avro", "bytes"] as const; + + for (const dataFormat of formats) { + const schemaName = generateSchemaName(); + + const result = await client.createSchema( + schemaName, + { + dataFormat, + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + expect(result).toBeDefined(); + } + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("duplicate schema name", async () => { + const schemaName = generateSchemaName(); + + // Create first schema + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + // Attempt to create duplicate + await expect( + client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ) + ).rejects.toThrow(); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/deleteSchema.test.ts b/packages/test/src/schemaRegistry/deleteSchema.test.ts new file mode 100644 index 00000000..25c84ee5 --- /dev/null +++ b/packages/test/src/schemaRegistry/deleteSchema.test.ts @@ -0,0 +1,104 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("deleteSchema", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + const waitForDeletion = async (schemaName: string, maxAttempts = 10) => { + for (let i = 0; i < maxAttempts; i++) { + try { + await client.getSchema(schemaName); + await new Promise((resolve) => setTimeout(resolve, 100)); + } catch (error) { + return; + } + } + throw new Error( + `Schema ${schemaName} was not deleted after ${maxAttempts} attempts` + ); + }; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should delete schema", () => { + test("delete existing schema", async () => { + const schemaName = generateSchemaName(); + + // Create schema + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + description: "Test schema with definition", + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + // Verify it exists + const schemaBefore = await client.getSchema(schemaName); + expect(schemaBefore.schemaName).toBe(schemaName); + + // Delete schema + await expect(client.deleteSchema(schemaName)).resolves.toBeUndefined(); + + // Verify it's deleted + await waitForDeletion(schemaName); + }); + + test("delete schema with versions", async () => { + const schemaName = generateSchemaName(); + const definition = JSON.stringify({ type: "object" }); + + // Create schema with initial definition + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: definition } + ); + + // Register additional version + await client.registerSchemaVersion( + schemaName, + JSON.stringify({ type: "object", properties: {} }) + ); + + // Delete schema (should delete all versions) + await expect(client.deleteSchema(schemaName)).resolves.toBeUndefined(); + + // Verify it's deleted + await waitForDeletion(schemaName); + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("error when deleting non-existent schema", async () => { + const nonExistentName = `non-existent-${Date.now()}`; + + await expect(client.deleteSchema(nonExistentName)).rejects.toThrow(); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/deleteSchemaVersions.test.ts b/packages/test/src/schemaRegistry/deleteSchemaVersions.test.ts new file mode 100644 index 00000000..04a6f03b --- /dev/null +++ b/packages/test/src/schemaRegistry/deleteSchemaVersions.test.ts @@ -0,0 +1,150 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + delay, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("deleteSchemaVersions", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should delete schema versions", () => { + test("delete specific version number", async () => { + const schemaName = generateSchemaName(); + + // Create schema with multiple versions + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ v: 1 }) } + ); + + await client.registerSchemaVersion(schemaName, JSON.stringify({ v: 2 })); + + await client.registerSchemaVersion(schemaName, JSON.stringify({ v: 3 })); + + // Ensure any eventual consistency + await delay(100); + + // Delete version 2 + const result = await client.deleteSchemaVersions(schemaName, [2]); + + expect(result).toBeDefined(); + expect(Array.isArray(result.errors)).toBe(true); + + // // Verify version 2 is deleted + // await expect( + // client.getSchemaVersion(schemaName, { versionNumber: 2 }) + // ).rejects.toThrow(); + + // // Ensure any eventual consistency + // await delay(100); + + // // Verify other versions still exist + // const v1 = await client.getSchemaVersion(schemaName, { + // versionNumber: 1, + // }); + // const v3 = await client.getSchemaVersion(schemaName, { + // versionNumber: 3, + // }); + // expect(v1.versionNumber).toBe(1); + // expect(v3.versionNumber).toBe(3); + }); + + test("delete multiple versions", async () => { + const schemaName = generateSchemaName(); + + // Create schema with multiple versions + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ v: 1 }) } + ); + + await client.registerSchemaVersion(schemaName, JSON.stringify({ v: 2 })); + + await client.registerSchemaVersion(schemaName, JSON.stringify({ v: 3 })); + + // Delete versions 1 and 2 + const result = await client.deleteSchemaVersions(schemaName, [1, 2]); + + expect(result).toBeDefined(); + + // Ensure any eventual consistency + await delay(100); + + // Verify version 3 still exists + const v3 = await client.getSchemaVersion(schemaName, { + versionNumber: 3, + }); + expect(v3.versionNumber).toBe(3); + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("error handling for non-existent versions", async () => { + const schemaName = generateSchemaName(); + + // Create schema with one version + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ v: 1 }) } + ); + + // Try to delete non-existent versions - should throw an error + await expect( + client.deleteSchemaVersions(schemaName, [99, 100]) + ).rejects.toThrow(/does not have versions/); + }); + + test("partial failures in error list", async () => { + const schemaName = generateSchemaName(); + + // Create schema with versions 1 and 2 + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ v: 1 }) } + ); + + await client.registerSchemaVersion(schemaName, JSON.stringify({ v: 2 })); + + // Delete mix of existing and non-existing versions - should throw an error + await expect( + client.deleteSchemaVersions(schemaName, [1, 999]) + ).rejects.toThrow(/does not have versions/); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/getSchema.test.ts b/packages/test/src/schemaRegistry/getSchema.test.ts new file mode 100644 index 00000000..9de8b3c6 --- /dev/null +++ b/packages/test/src/schemaRegistry/getSchema.test.ts @@ -0,0 +1,120 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + delay, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("getSchema", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should retrieve schema metadata", () => { + test("get schema with all properties", async () => { + const schemaName = generateSchemaName(); + + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "backward", + description: "Test description", + tags: { env: "test" }, + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + // Ensure any eventual consistency + await delay(100); + + const schema = await client.getSchema(schemaName); + + expect(schema.schemaName).toBe(schemaName); + expect(schema.details.dataFormat).toBe("json"); + expect(schema.details.compatibility).toBe("backward"); + expect(schema.details.description).toBe("Test description"); + expect(schema.details.tags).toEqual({ env: "test" }); + expect(schema.latestSchemaVersion).toBe(1); + }); + + test("timestamps are populated", async () => { + const schemaName = generateSchemaName(); + + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + // Ensure any eventual consistency + await delay(100); + + const schema = await client.getSchema(schemaName); + + expect(schema.createdAt).toBeDefined(); + expect(schema.createdAt).toBeInstanceOf(Date); + }); + + test("latest version number after adding versions", async () => { + const schemaName = generateSchemaName(); + const definition = JSON.stringify({ type: "object" }); + + // Create schema with initial version + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: definition } + ); + + // Ensure any eventual consistency + await delay(100); + + let schema = await client.getSchema(schemaName); + expect(schema.latestSchemaVersion).toBe(1); + + // Register second version + await client.registerSchemaVersion( + schemaName, + JSON.stringify({ type: "object", properties: {} }) + ); + + // Ensure any eventual consistency + await delay(100); + + schema = await client.getSchema(schemaName); + expect(schema.latestSchemaVersion).toBe(2); + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("error when getting non-existent schema", async () => { + const nonExistentName = `non-existent-${Date.now()}`; + + await expect(client.getSchema(nonExistentName)).rejects.toThrow(); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/getSchemaVersion.test.ts b/packages/test/src/schemaRegistry/getSchemaVersion.test.ts new file mode 100644 index 00000000..75a41a09 --- /dev/null +++ b/packages/test/src/schemaRegistry/getSchemaVersion.test.ts @@ -0,0 +1,173 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + delay, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("getSchemaVersion", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should get schema version", () => { + test("get latest version (no version number specified)", async () => { + const schemaName = generateSchemaName(); + + // Create schema with multiple versions + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ version: 1 }) } + ); + + await client.registerSchemaVersion( + schemaName, + JSON.stringify({ version: 2 }) + ); + + await client.registerSchemaVersion( + schemaName, + JSON.stringify({ version: 3 }) + ); + + // Ensure any eventual consistency + await delay(100); + + // Get latest version (should be 3) + const version = await client.getSchemaVersion(schemaName); + + expect(version.versionNumber).toBe(3); + expect(version.schemaVersionId).toBeDefined(); + expect(version.dataFormat).toBe("json"); + }); + + test("get specific version by number", async () => { + const schemaName = generateSchemaName(); + + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ version: 1 }) } + ); + + await client.registerSchemaVersion( + schemaName, + JSON.stringify({ version: 2 }) + ); + + // Ensure any eventual consistency + await delay(100); + + // Get version 1 specifically + const version = await client.getSchemaVersion(schemaName, { + versionNumber: 1, + }); + + expect(version.versionNumber).toBe(1); + expect(version.schemaVersionId).toBeDefined(); + }); + + test("schema definition is included", async () => { + const schemaName = generateSchemaName(); + const definitionObj = { + type: "object", + properties: { name: { type: "string" } }, + }; + const definition = JSON.stringify(definitionObj); + + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: definition } + ); + + // Ensure any eventual consistency + await delay(100); + + const version = await client.getSchemaVersion(schemaName); + + expect(version.schemaDefinition).toBeDefined(); + expect(version.schemaDefinition).toBeInstanceOf(Uint8Array); + + // Decode and verify content + const decoded = new TextDecoder().decode(version.schemaDefinition); + expect(JSON.parse(decoded)).toEqual(definitionObj); + }); + + test("timestamps are populated", async () => { + const schemaName = generateSchemaName(); + + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ v: 1 }) } + ); + + // Ensure any eventual consistency + await delay(100); + + const version = await client.getSchemaVersion(schemaName); + + expect(version.registeredAt).toBeDefined(); + expect(version.registeredAt).toBeInstanceOf(Date); + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("error when getting non-existent version", async () => { + const schemaName = generateSchemaName(); + + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ v: 1 }) } + ); + + // Ensure any eventual consistency + await delay(100); + + await expect( + client.getSchemaVersion(schemaName, { versionNumber: 999 }) + ).rejects.toThrow(); + }); + + test("error when getting version from non-existent schema", async () => { + const nonExistentName = `non-existent-${Date.now()}`; + + await expect(client.getSchemaVersion(nonExistentName)).rejects.toThrow(); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/getSchemaVersionById.test.ts b/packages/test/src/schemaRegistry/getSchemaVersionById.test.ts new file mode 100644 index 00000000..ecf8ec18 --- /dev/null +++ b/packages/test/src/schemaRegistry/getSchemaVersionById.test.ts @@ -0,0 +1,125 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + delay, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("getSchemaVersionById", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should retrieve version by ID", () => { + test("get version by unique ID", async () => { + const schemaName = generateSchemaName(); + const definition = JSON.stringify({ type: "object" }); + + // Create schema with initial version + const createResult = await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: definition } + ); + + const versionId = createResult.schemaVersionId!; + + // Ensure any eventual consistency + await delay(100); + + // Retrieve by ID + const version = await client.getSchemaVersionById(versionId); + + expect(version.schemaVersionId).toBe(versionId); + expect(version.versionNumber).toBe(1); + expect(version.dataFormat).toBe("json"); + }); + + test("schema definition is included", async () => { + const schemaName = generateSchemaName(); + const definitionObj = { name: "test", value: 42 }; + const definition = JSON.stringify(definitionObj); + + const createResult = await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: definition } + ); + + // Ensure any eventual consistency + await delay(100); + + const version = await client.getSchemaVersionById( + createResult.schemaVersionId! + ); + + expect(version.schemaDefinition).toBeDefined(); + expect(version.schemaDefinition).toBeInstanceOf(Uint8Array); + + const decoded = new TextDecoder().decode(version.schemaDefinition); + expect(JSON.parse(decoded)).toEqual(definitionObj); + }); + + test("retrieve different versions by their IDs", async () => { + const schemaName = generateSchemaName(); + + const result1 = await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ version: 1 }) } + ); + + const result2 = await client.registerSchemaVersion( + schemaName, + JSON.stringify({ version: 2 }) + ); + + // Ensure any eventual consistency + await delay(100); + + // Retrieve both versions by ID + const v1 = await client.getSchemaVersionById(result1.schemaVersionId!); + const v2 = await client.getSchemaVersionById(result2.schemaVersionId); + + expect(v1.versionNumber).toBe(1); + expect(v2.versionNumber).toBe(2); + expect(v1.schemaVersionId).not.toBe(v2.schemaVersionId); + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("error when getting non-existent ID", async () => { + const fakeVersionId = "00000000-0000-0000-0000-000000000000"; + + await expect( + client.getSchemaVersionById(fakeVersionId) + ).rejects.toThrow(); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/listRegisteredSchemas.test.ts b/packages/test/src/schemaRegistry/listRegisteredSchemas.test.ts new file mode 100644 index 00000000..20da25da --- /dev/null +++ b/packages/test/src/schemaRegistry/listRegisteredSchemas.test.ts @@ -0,0 +1,140 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("listRegisteredSchemas", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const testPrefix = `registered-test-${Date.now()}`; + const generateSchemaName = (suffix: string) => `${testPrefix}-${suffix}`; + + let versionId1: string; + let versionId2: string; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + + // Create test schemas with versions for filtering tests + const result1 = await client.createSchema( + generateSchemaName("alpha"), + { + dataFormat: "json", + compatibility: "backward", + tags: { category: "a", env: "test" }, + }, + { schemaDefinition: JSON.stringify({ schema: "alpha" }) } + ); + versionId1 = result1.schemaVersionId!; + + const result2 = await client.createSchema( + generateSchemaName("beta"), + { + dataFormat: "protobuf", + compatibility: "full", + tags: { category: "b", env: "test" }, + }, + { schemaDefinition: JSON.stringify({ schema: "beta" }) } + ); + versionId2 = result2.schemaVersionId!; + + // Create schema with version but different tags for variety + await client.createSchema( + generateSchemaName("gamma"), + { + dataFormat: "json", + compatibility: "none", + tags: { category: "c", env: "prod" }, + }, + { schemaDefinition: JSON.stringify({ schema: "gamma" }) } + ); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should list registered schemas", () => { + test("list all registered schemas with latest versions", async () => { + const schemas = await client.listRegisteredSchemas({ + schemaNamePrefix: testPrefix, + }); + + expect(Array.isArray(schemas)).toBe(true); + // All schemas with versions should be returned + expect(schemas.length).toBe(3); + + const schemaNames = schemas.map((s) => s.schemaName); + expect(schemaNames).toContain(generateSchemaName("alpha")); + expect(schemaNames).toContain(generateSchemaName("beta")); + expect(schemaNames).toContain(generateSchemaName("gamma")); + }); + + test("filter by version ID", async () => { + const schemas = await client.listRegisteredSchemas({ + schemaVersionId: versionId1, + }); + + expect(schemas.length).toBe(1); + expect(schemas[0].schemaName).toBe(generateSchemaName("alpha")); + expect(schemas[0].schemaVersionId).toBe(versionId1); + }); + + test("filter by name prefix", async () => { + const schemas = await client.listRegisteredSchemas({ + schemaNamePrefix: `${testPrefix}-alpha`, + }); + + expect(schemas.length).toBe(1); + expect(schemas[0].schemaName).toBe(generateSchemaName("alpha")); + }); + + test("filter by tags", async () => { + const schemas = await client.listRegisteredSchemas({ + schemaNamePrefix: testPrefix, + schemaTags: { category: "b" }, + }); + + expect(schemas.length).toBe(1); + expect(schemas[0].schemaName).toBe(generateSchemaName("beta")); + }); + + test("with definitions", async () => { + const schemas = await client.listRegisteredSchemas({ + schemaNamePrefix: testPrefix, + includeDefinition: true, + }); + + schemas.forEach((schema) => { + expect(schema.schemaDefinition).toBeDefined(); + expect(schema.schemaDefinition!.length).toBeGreaterThan(0); + }); + }); + + test("registered schema has correct metadata", async () => { + const schemas = await client.listRegisteredSchemas({ + schemaVersionId: versionId1, + }); + + expect(schemas.length).toBe(1); + const schema = schemas[0]; + + expect(schema.schemaName).toBe(generateSchemaName("alpha")); + expect(schema.schemaVersionId).toBe(versionId1); + expect(schema.versionNumber).toBe(1); + expect(schema.dataFormat).toBe("json"); + expect(schema.compatibility).toBe("backward"); + expect(schema.tags).toEqual({ category: "a", env: "test" }); + expect(schema.registeredAt).toBeDefined(); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/listSchemaVersions.test.ts b/packages/test/src/schemaRegistry/listSchemaVersions.test.ts new file mode 100644 index 00000000..54332376 --- /dev/null +++ b/packages/test/src/schemaRegistry/listSchemaVersions.test.ts @@ -0,0 +1,145 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + delay, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("listSchemaVersions", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should list schema versions", () => { + test("list all versions of schema", async () => { + const schemaName = generateSchemaName(); + + // Create schema with multiple versions + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ v: 1 }) } + ); + + await client.registerSchemaVersion(schemaName, JSON.stringify({ v: 2 })); + + await client.registerSchemaVersion(schemaName, JSON.stringify({ v: 3 })); + + // Wait a moment to ensure the registry is updated + await delay(100); + + const versions = await client.listSchemaVersions(schemaName); + + expect(Array.isArray(versions)).toBe(true); + expect(versions.length).toBe(3); + + const versionNumbers = versions.map((v) => v.versionNumber).sort(); + expect(versionNumbers).toEqual([1, 2, 3]); + }); + + test("with includeDefinition: false (default)", async () => { + const schemaName = generateSchemaName(); + + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ data: "test" }) } + ); + + // Wait a moment to ensure the registry is updated + await delay(100); + + const versions = await client.listSchemaVersions(schemaName, { + includeDefinition: false, + }); + + expect(versions.length).toBe(1); + // Definition should be empty when not included + expect(versions[0].schemaDefinition.length).toBe(0); + }); + + test("with includeDefinition: true", async () => { + const schemaName = generateSchemaName(); + const definitionObj = { data: "test-with-definition" }; + + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify(definitionObj) } + ); + + // Wait a moment to ensure the registry is updated + await delay(100); + + const versions = await client.listSchemaVersions(schemaName, { + includeDefinition: true, + }); + + expect(versions.length).toBe(1); + expect(versions[0].schemaDefinition).toBeDefined(); + expect(versions[0].schemaDefinition.length).toBeGreaterThan(0); + + const decoded = new TextDecoder().decode(versions[0].schemaDefinition); + expect(JSON.parse(decoded)).toEqual(definitionObj); + }); + + test("versions have correct metadata", async () => { + const schemaName = generateSchemaName(); + + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ v: 1 }) } + ); + + // Wait a moment to ensure the registry is updated + await delay(100); + + const versions = await client.listSchemaVersions(schemaName); + + expect(versions[0].schemaVersionId).toBeDefined(); + expect(versions[0].versionNumber).toBe(1); + expect(versions[0].dataFormat).toBe("json"); + expect(versions[0].registeredAt).toBeDefined(); + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("error when listing non-existent schema", async () => { + const nonExistentName = `non-existent-${Date.now()}`; + + await expect( + client.listSchemaVersions(nonExistentName) + ).rejects.toThrow(); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/listSchemas.test.ts b/packages/test/src/schemaRegistry/listSchemas.test.ts new file mode 100644 index 00000000..72c38c54 --- /dev/null +++ b/packages/test/src/schemaRegistry/listSchemas.test.ts @@ -0,0 +1,93 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("listSchemas", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const testPrefix = `list-test-${Date.now()}`; + const generateSchemaName = (suffix: string) => `${testPrefix}-${suffix}`; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + + await client.createSchema( + generateSchemaName("alpha"), + { + dataFormat: "json", + compatibility: "none", + tags: { category: "a", env: "test" }, + }, + { schemaDefinition: JSON.stringify({ schema: "alpha" }) } + ); + + await client.createSchema( + generateSchemaName("beta"), + { + dataFormat: "json", + compatibility: "backward", + tags: { category: "b", env: "test" }, + }, + { schemaDefinition: JSON.stringify({ schema: "beta" }) } + ); + + await client.createSchema( + generateSchemaName("gamma"), + { + dataFormat: "protobuf", + compatibility: "full", + tags: { category: "a", env: "prod" }, + }, + { schemaDefinition: JSON.stringify({ schema: "gamma" }) } + ); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should list schemas", () => { + test("filter by name prefix", async () => { + const schemas = await client.listSchemas({ + schemaNamePrefix: testPrefix, + }); + + expect(schemas.length).toBe(3); + schemas.forEach((schema) => { + expect(schema.schemaName.startsWith(testPrefix)).toBe(true); + }); + }); + + test("filter by tags", async () => { + const schemas = await client.listSchemas({ + schemaNamePrefix: testPrefix, + schemaTags: { category: "a" }, + }); + + expect(schemas.length).toBe(2); + const schemaNames = schemas.map((s) => s.schemaName); + expect(schemaNames).toContain(generateSchemaName("alpha")); + expect(schemaNames).toContain(generateSchemaName("gamma")); + }); + + test("combine prefix and tag filters", async () => { + const schemas = await client.listSchemas({ + schemaNamePrefix: testPrefix, + schemaTags: { category: "a", env: "test" }, + }); + + expect(schemas.length).toBe(1); + expect(schemas[0].schemaName).toBe(generateSchemaName("alpha")); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/lookupSchemaName.test.ts b/packages/test/src/schemaRegistry/lookupSchemaName.test.ts new file mode 100644 index 00000000..558355b8 --- /dev/null +++ b/packages/test/src/schemaRegistry/lookupSchemaName.test.ts @@ -0,0 +1,91 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + delay, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("lookupSchemaName", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should lookup schema name", () => { + test("lookup by version ID", async () => { + const schemaName = generateSchemaName(); + const definition = JSON.stringify({ type: "object" }); + + // Create schema with initial version + const result = await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: definition } + ); + + expect(result.schemaVersionId).toBeDefined(); + + // Lookup schema name by version ID + const foundName = await client.lookupSchemaName(result.schemaVersionId!); + + expect(foundName).toBe(schemaName); + }); + + test("lookup by version ID from registered version", async () => { + const schemaName = generateSchemaName(); + + // Create schema with initial version + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + // Register another version + const versionResult = await client.registerSchemaVersion( + schemaName, + JSON.stringify({ type: "string" }) + ); + + // Wait a moment to ensure the registry is updated + await delay(100); + + // Lookup schema name + const foundName = await client.lookupSchemaName( + versionResult.schemaVersionId + ); + + expect(foundName).toBe(schemaName); + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("error when looking up non-existent version ID", async () => { + const fakeVersionId = "00000000-0000-0000-0000-000000000000"; + + await expect(client.lookupSchemaName(fakeVersionId)).rejects.toThrow(); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/registerSchemaVersion.test.ts b/packages/test/src/schemaRegistry/registerSchemaVersion.test.ts new file mode 100644 index 00000000..de273b08 --- /dev/null +++ b/packages/test/src/schemaRegistry/registerSchemaVersion.test.ts @@ -0,0 +1,121 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("registerSchemaVersion", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should register schema version", () => { + test("register new version for existing schema", async () => { + const schemaName = generateSchemaName(); + + // Create schema with initial version + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + // Register second version + const result = await client.registerSchemaVersion( + schemaName, + JSON.stringify({ type: "object", version: 2 }) + ); + + expect(result.schemaVersionId).toBeDefined(); + expect(result.schemaVersionId).not.toBe(""); + expect(result.versionNumber).toBe(2); + }); + + test("version number increments", async () => { + const schemaName = generateSchemaName(); + + // Create schema with initial version + const createResult = await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ version: 1 }) } + ); + + expect(createResult.versionNumber).toBe(1); + + // Register second version + const result2 = await client.registerSchemaVersion( + schemaName, + JSON.stringify({ version: 2 }) + ); + + expect(result2.versionNumber).toBe(2); + + // Register third version + const result3 = await client.registerSchemaVersion( + schemaName, + JSON.stringify({ version: 3 }) + ); + + expect(result3.versionNumber).toBe(3); + }); + + test("register with Uint8Array definition", async () => { + const schemaName = generateSchemaName(); + + const initialDefinition = new TextEncoder().encode("initial binary data"); + + await client.createSchema( + schemaName, + { + dataFormat: "bytes", + compatibility: "none", + }, + { schemaDefinition: initialDefinition } + ); + + const definition = new TextEncoder().encode("binary data content"); + + const result = await client.registerSchemaVersion(schemaName, definition); + + expect(result.schemaVersionId).toBeDefined(); + expect(result.versionNumber).toBe(2); + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("error when registering to non-existent schema", async () => { + const nonExistentName = `non-existent-${Date.now()}`; + + await expect( + client.registerSchemaVersion( + nonExistentName, + JSON.stringify({ type: "object" }) + ) + ).rejects.toThrow(); + }); + }); +}); diff --git a/packages/test/src/schemaRegistry/updateSchema.test.ts b/packages/test/src/schemaRegistry/updateSchema.test.ts new file mode 100644 index 00000000..8928df6f --- /dev/null +++ b/packages/test/src/schemaRegistry/updateSchema.test.ts @@ -0,0 +1,162 @@ +/** @jest-environment ./src/utils/enableVersionCheck.ts */ + +import { + createTestNode, + matchServerVersion, + optionalDescribe, +} from "@test-utils"; + +import { KurrentDBClient } from "@kurrent/kurrentdb-client"; + +describe("updateSchema", () => { + const supported = matchServerVersion`>=25.1`; + + const node = createTestNode(); + let client!: KurrentDBClient; + + const generateSchemaName = () => + `test-schema-${Date.now()}-${Math.random().toString(36).substring(7)}`; + + const waitForUpdate = async ( + schemaName: string, + check: (schema: Awaited>) => boolean, + maxAttempts = 10 + ) => { + for (let i = 0; i < maxAttempts; i++) { + const schema = await client.getSchema(schemaName); + if (check(schema)) { + return schema; + } + await new Promise((resolve) => setTimeout(resolve, 100)); + } + throw new Error( + `Schema ${schemaName} update did not propagate after ${maxAttempts} attempts` + ); + }; + + beforeAll(async () => { + await node.up(); + client = KurrentDBClient.connectionString(node.connectionString()); + }); + + afterAll(async () => { + await node.down(); + }); + + optionalDescribe(supported)("should update schema metadata", () => { + test("update description", async () => { + const schemaName = generateSchemaName(); + + // Create schema + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + description: "Original description", + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + // Update description + await expect( + client.updateSchema(schemaName, { + dataFormat: "json", + compatibility: "none", + description: "Updated description", + }) + ).resolves.toBeUndefined(); + + // Verify update + const schema = await waitForUpdate( + schemaName, + (s) => s.details.description === "Updated description" + ); + expect(schema.details.description).toBe("Updated description"); + }); + + test("update tags", async () => { + const schemaName = generateSchemaName(); + + // Create schema with initial tags + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + tags: { initial: "tag" }, + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + // Update tags + await expect( + client.updateSchema(schemaName, { + dataFormat: "json", + compatibility: "none", + tags: { updated: "tag", another: "value" }, + }) + ).resolves.toBeUndefined(); + + // Verify update + const schema = await waitForUpdate( + schemaName, + (s) => + s.details.tags?.updated === "tag" && + s.details.tags?.another === "value" + ); + expect(schema.details.tags).toEqual({ + updated: "tag", + another: "value", + }); + }); + + test("update both description and tags", async () => { + const schemaName = generateSchemaName(); + + // Create schema + await client.createSchema( + schemaName, + { + dataFormat: "json", + compatibility: "none", + }, + { schemaDefinition: JSON.stringify({ type: "object" }) } + ); + + // Update both + await expect( + client.updateSchema(schemaName, { + dataFormat: "json", + compatibility: "none", + description: "New description", + tags: { key: "value" }, + }) + ).resolves.toBeUndefined(); + + // Verify update + const schema = await waitForUpdate( + schemaName, + (s) => + s.details.description === "New description" && + s.details.tags?.key === "value" + ); + expect(schema.details.description).toBe("New description"); + expect(schema.details.tags).toEqual({ key: "value" }); + }); + }); + + optionalDescribe(supported)("should handle errors", () => { + test("error when updating non-existent schema", async () => { + const nonExistentName = `non-existent-${Date.now()}`; + + await expect( + client.updateSchema(nonExistentName, { + dataFormat: "json", + compatibility: "none", + description: "Should fail", + }) + ).rejects.toThrow(); + }); + }); +}); diff --git a/packages/test/src/utils/dockerImages.ts b/packages/test/src/utils/dockerImages.ts index f266a366..9b449f33 100644 --- a/packages/test/src/utils/dockerImages.ts +++ b/packages/test/src/utils/dockerImages.ts @@ -1,7 +1,7 @@ const kdbImage = ((): string => { const image = process.env.KURRENT_IMAGE ?? - "docker.cloudsmith.io/eventstore/kurrent-staging/kurrentdb:ci"; + "docker.eventstore.com/kurrent-staging/kurrentdb:ci"; return image; })();