@kurrent/kurrentdb-client 1.2.0-alpha.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/Client/http.d.ts +7 -1
  2. package/dist/Client/http.js +51 -48
  3. package/dist/Client/http.js.map +1 -1
  4. package/dist/Client/index.d.ts +30 -6
  5. package/dist/Client/index.js +89 -11
  6. package/dist/Client/index.js.map +1 -1
  7. package/dist/Client/parseConnectionString.d.ts +2 -2
  8. package/dist/Client/parseConnectionString.js +0 -9
  9. package/dist/Client/parseConnectionString.js.map +1 -1
  10. package/dist/constants.d.ts +3 -0
  11. package/dist/constants.js +6 -1
  12. package/dist/constants.js.map +1 -1
  13. package/dist/events/binaryEvent.d.ts +1 -5
  14. package/dist/events/binaryEvent.js +2 -2
  15. package/dist/events/binaryEvent.js.map +1 -1
  16. package/dist/events/jsonEvent.js +2 -2
  17. package/dist/events/jsonEvent.js.map +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +4 -2
  20. package/dist/index.js.map +1 -1
  21. package/dist/projections/createProjection.d.ts +10 -1
  22. package/dist/projections/createProjection.js +13 -2
  23. package/dist/projections/createProjection.js.map +1 -1
  24. package/dist/streams/appendToStream/appendRecords.d.ts +3 -0
  25. package/dist/streams/appendToStream/appendRecords.js +132 -0
  26. package/dist/streams/appendToStream/appendRecords.js.map +1 -0
  27. package/dist/streams/appendToStream/batchAppend.js +2 -2
  28. package/dist/streams/appendToStream/batchAppend.js.map +1 -1
  29. package/dist/streams/appendToStream/index.d.ts +9 -1
  30. package/dist/streams/appendToStream/index.js +8 -0
  31. package/dist/streams/appendToStream/index.js.map +1 -1
  32. package/dist/streams/readAll.js +18 -18
  33. package/dist/streams/readAll.js.map +1 -1
  34. package/dist/streams/readStream.js +26 -34
  35. package/dist/streams/readStream.js.map +1 -1
  36. package/dist/types/index.d.ts +88 -2
  37. package/dist/types/index.js.map +1 -1
  38. package/dist/utils/CommandError.d.ts +9 -3
  39. package/dist/utils/CommandError.js +50 -1
  40. package/dist/utils/CommandError.js.map +1 -1
  41. package/dist/utils/convertBridgeError.d.ts +2 -1
  42. package/dist/utils/convertBridgeError.js +14 -24
  43. package/dist/utils/convertBridgeError.js.map +1 -1
  44. package/dist/utils/credentials.d.ts +19 -0
  45. package/dist/utils/credentials.js +31 -0
  46. package/dist/utils/credentials.js.map +1 -0
  47. package/dist/utils/grpcUUID.d.ts +1 -0
  48. package/dist/utils/grpcUUID.js +12 -12
  49. package/dist/utils/grpcUUID.js.map +1 -1
  50. package/generated/kurrentdb/protocols/v1/projectionmanagement_pb.d.ts +3 -0
  51. package/generated/kurrentdb/protocols/v1/projectionmanagement_pb.js +31 -1
  52. package/generated/kurrentdb/protocols/v2/core_pb.d.ts +188 -188
  53. package/generated/kurrentdb/protocols/v2/core_pb.js +1301 -1301
  54. package/generated/kurrentdb/protocols/v2/features/service_grpc_pb.d.ts +43 -43
  55. package/generated/kurrentdb/protocols/v2/features/service_grpc_pb.js +50 -50
  56. package/generated/kurrentdb/protocols/v2/features/service_pb.d.ts +227 -227
  57. package/generated/kurrentdb/protocols/v2/features/service_pb.js +1753 -1753
  58. package/generated/kurrentdb/protocols/v2/streams/errors_pb.d.ts +85 -0
  59. package/generated/kurrentdb/protocols/v2/streams/errors_pb.js +625 -1
  60. package/generated/kurrentdb/protocols/v2/streams/shared_pb.d.ts +218 -218
  61. package/generated/kurrentdb/protocols/v2/streams/shared_pb.js +1561 -1561
  62. package/generated/kurrentdb/protocols/v2/streams/streams_grpc_pb.d.ts +17 -0
  63. package/generated/kurrentdb/protocols/v2/streams/streams_grpc_pb.js +53 -0
  64. package/generated/kurrentdb/protocols/v2/streams/streams_pb.d.ts +134 -0
  65. package/generated/kurrentdb/protocols/v2/streams/streams_pb.js +1041 -1
  66. package/package.json +64 -66
  67. package/dist/schemaRegistry/checkSchemaCompatibility.d.ts +0 -12
  68. package/dist/schemaRegistry/checkSchemaCompatibility.js +0 -60
  69. package/dist/schemaRegistry/checkSchemaCompatibility.js.map +0 -1
  70. package/dist/schemaRegistry/createSchema.d.ts +0 -13
  71. package/dist/schemaRegistry/createSchema.js +0 -36
  72. package/dist/schemaRegistry/createSchema.js.map +0 -1
  73. package/dist/schemaRegistry/deleteSchema.d.ts +0 -11
  74. package/dist/schemaRegistry/deleteSchema.js +0 -23
  75. package/dist/schemaRegistry/deleteSchema.js.map +0 -1
  76. package/dist/schemaRegistry/deleteSchemaVersions.d.ts +0 -13
  77. package/dist/schemaRegistry/deleteSchemaVersions.js +0 -29
  78. package/dist/schemaRegistry/deleteSchemaVersions.js.map +0 -1
  79. package/dist/schemaRegistry/getSchema.d.ts +0 -12
  80. package/dist/schemaRegistry/getSchema.js +0 -28
  81. package/dist/schemaRegistry/getSchema.js.map +0 -1
  82. package/dist/schemaRegistry/getSchemaVersion.d.ts +0 -12
  83. package/dist/schemaRegistry/getSchemaVersion.js +0 -33
  84. package/dist/schemaRegistry/getSchemaVersion.js.map +0 -1
  85. package/dist/schemaRegistry/getSchemaVersionById.d.ts +0 -12
  86. package/dist/schemaRegistry/getSchemaVersionById.js +0 -28
  87. package/dist/schemaRegistry/getSchemaVersionById.js.map +0 -1
  88. package/dist/schemaRegistry/index.d.ts +0 -14
  89. package/dist/schemaRegistry/index.js +0 -35
  90. package/dist/schemaRegistry/index.js.map +0 -1
  91. package/dist/schemaRegistry/listRegisteredSchemas.d.ts +0 -11
  92. package/dist/schemaRegistry/listRegisteredSchemas.js +0 -41
  93. package/dist/schemaRegistry/listRegisteredSchemas.js.map +0 -1
  94. package/dist/schemaRegistry/listSchemaVersions.d.ts +0 -12
  95. package/dist/schemaRegistry/listSchemaVersions.js +0 -28
  96. package/dist/schemaRegistry/listSchemaVersions.js.map +0 -1
  97. package/dist/schemaRegistry/listSchemas.d.ts +0 -11
  98. package/dist/schemaRegistry/listSchemas.js +0 -35
  99. package/dist/schemaRegistry/listSchemas.js.map +0 -1
  100. package/dist/schemaRegistry/lookupSchemaName.d.ts +0 -12
  101. package/dist/schemaRegistry/lookupSchemaName.js +0 -23
  102. package/dist/schemaRegistry/lookupSchemaName.js.map +0 -1
  103. package/dist/schemaRegistry/registerSchemaVersion.d.ts +0 -13
  104. package/dist/schemaRegistry/registerSchemaVersion.js +0 -31
  105. package/dist/schemaRegistry/registerSchemaVersion.js.map +0 -1
  106. package/dist/schemaRegistry/types.d.ts +0 -347
  107. package/dist/schemaRegistry/types.js +0 -3
  108. package/dist/schemaRegistry/types.js.map +0 -1
  109. package/dist/schemaRegistry/updateSchema.d.ts +0 -11
  110. package/dist/schemaRegistry/updateSchema.js +0 -51
  111. package/dist/schemaRegistry/updateSchema.js.map +0 -1
  112. package/dist/schemaRegistry/utils/index.d.ts +0 -1
  113. package/dist/schemaRegistry/utils/index.js +0 -18
  114. package/dist/schemaRegistry/utils/index.js.map +0 -1
  115. package/dist/schemaRegistry/utils/mappers.d.ts +0 -24
  116. package/dist/schemaRegistry/utils/mappers.js +0 -198
  117. package/dist/schemaRegistry/utils/mappers.js.map +0 -1
  118. package/generated/kurrentdb/protocols/v2/registry/errors_grpc_pb.js +0 -1
  119. package/generated/kurrentdb/protocols/v2/registry/errors_pb.d.ts +0 -75
  120. package/generated/kurrentdb/protocols/v2/registry/errors_pb.js +0 -493
  121. package/generated/kurrentdb/protocols/v2/registry/events_grpc_pb.js +0 -1
  122. package/generated/kurrentdb/protocols/v2/registry/events_pb.d.ts +0 -255
  123. package/generated/kurrentdb/protocols/v2/registry/events_pb.js +0 -2057
  124. package/generated/kurrentdb/protocols/v2/registry/groups_grpc_pb.js +0 -1
  125. package/generated/kurrentdb/protocols/v2/registry/groups_pb.d.ts +0 -474
  126. package/generated/kurrentdb/protocols/v2/registry/groups_pb.js +0 -3593
  127. package/generated/kurrentdb/protocols/v2/registry/schemas_grpc_pb.js +0 -1
  128. package/generated/kurrentdb/protocols/v2/registry/schemas_pb.d.ts +0 -825
  129. package/generated/kurrentdb/protocols/v2/registry/schemas_pb.js +0 -6500
  130. package/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.d.ts +0 -350
  131. package/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.js +0 -654
  132. package/generated/kurrentdb/protocols/v2/registry/service_pb.d.ts +0 -10
  133. package/generated/kurrentdb/protocols/v2/registry/service_pb.js +0 -29
  134. package/generated/kurrentdb/protocols/v2/registry/shared_grpc_pb.js +0 -1
  135. package/generated/kurrentdb/protocols/v2/registry/shared_pb.d.ts +0 -26
  136. package/generated/kurrentdb/protocols/v2/registry/shared_pb.js +0 -51
  137. package/generated/kurrentdb/protocols/v2/registry/validation_grpc_pb.js +0 -1
  138. package/generated/kurrentdb/protocols/v2/registry/validation_pb.d.ts +0 -247
  139. package/generated/kurrentdb/protocols/v2/registry/validation_pb.js +0 -1789
@@ -1,1789 +0,0 @@
1
- // source: kurrentdb/protocols/v2/registry/validation.proto
2
- /**
3
- * @fileoverview
4
- * @enhanceable
5
- * @suppress {missingRequire} reports error on implicit type usages.
6
- * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
- * field starts with 'MSG_' and isn't a translatable message.
8
- * @public
9
- */
10
- // GENERATED CODE -- DO NOT EDIT!
11
- /* eslint-disable */
12
- // @ts-nocheck
13
-
14
- var jspb = require('google-protobuf');
15
- var goog = jspb;
16
- var global = (function() {
17
- if (this) { return this; }
18
- if (typeof window !== 'undefined') { return window; }
19
- if (typeof global !== 'undefined') { return global; }
20
- if (typeof self !== 'undefined') { return self; }
21
- return Function('return this')();
22
- }.call(null));
23
-
24
- var kurrentdb_protocols_v2_registry_shared_pb = require('../../../../kurrentdb/protocols/v2/registry/shared_pb.js');
25
- goog.object.extend(proto, kurrentdb_protocols_v2_registry_shared_pb);
26
- goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest', null, global);
27
- goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.SchemaIdentifierCase', null, global);
28
- goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse', null, global);
29
- goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure', null, global);
30
- goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.ResultCase', null, global);
31
- goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success', null, global);
32
- goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError', null, global);
33
- goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind', null, global);
34
- goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult', null, global);
35
- goog.exportSymbol('proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo', null, global);
36
- /**
37
- * Generated by JsPbCodeGenerator.
38
- * @param {Array=} opt_data Optional initial data array, typically from a
39
- * server response, or constructed directly in Javascript. The array is used
40
- * in place and becomes part of the constructed object. It is not cloned.
41
- * If no data is provided, the constructed object will be empty, but still
42
- * valid.
43
- * @extends {jspb.Message}
44
- * @constructor
45
- */
46
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError = function(opt_data) {
47
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
48
- };
49
- goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError, jspb.Message);
50
- if (goog.DEBUG && !COMPILED) {
51
- /**
52
- * @public
53
- * @override
54
- */
55
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError';
56
- }
57
- /**
58
- * Generated by JsPbCodeGenerator.
59
- * @param {Array=} opt_data Optional initial data array, typically from a
60
- * server response, or constructed directly in Javascript. The array is used
61
- * in place and becomes part of the constructed object. It is not cloned.
62
- * If no data is provided, the constructed object will be empty, but still
63
- * valid.
64
- * @extends {jspb.Message}
65
- * @constructor
66
- */
67
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult = function(opt_data) {
68
- jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.repeatedFields_, null);
69
- };
70
- goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult, jspb.Message);
71
- if (goog.DEBUG && !COMPILED) {
72
- /**
73
- * @public
74
- * @override
75
- */
76
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult';
77
- }
78
- /**
79
- * Generated by JsPbCodeGenerator.
80
- * @param {Array=} opt_data Optional initial data array, typically from a
81
- * server response, or constructed directly in Javascript. The array is used
82
- * in place and becomes part of the constructed object. It is not cloned.
83
- * If no data is provided, the constructed object will be empty, but still
84
- * valid.
85
- * @extends {jspb.Message}
86
- * @constructor
87
- */
88
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest = function(opt_data) {
89
- jspb.Message.initialize(this, opt_data, 0, -1, null, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_);
90
- };
91
- goog.inherits(proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest, jspb.Message);
92
- if (goog.DEBUG && !COMPILED) {
93
- /**
94
- * @public
95
- * @override
96
- */
97
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.displayName = 'proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest';
98
- }
99
- /**
100
- * Generated by JsPbCodeGenerator.
101
- * @param {Array=} opt_data Optional initial data array, typically from a
102
- * server response, or constructed directly in Javascript. The array is used
103
- * in place and becomes part of the constructed object. It is not cloned.
104
- * If no data is provided, the constructed object will be empty, but still
105
- * valid.
106
- * @extends {jspb.Message}
107
- * @constructor
108
- */
109
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse = function(opt_data) {
110
- jspb.Message.initialize(this, opt_data, 0, -1, null, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.oneofGroups_);
111
- };
112
- goog.inherits(proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse, jspb.Message);
113
- if (goog.DEBUG && !COMPILED) {
114
- /**
115
- * @public
116
- * @override
117
- */
118
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.displayName = 'proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse';
119
- }
120
- /**
121
- * Generated by JsPbCodeGenerator.
122
- * @param {Array=} opt_data Optional initial data array, typically from a
123
- * server response, or constructed directly in Javascript. The array is used
124
- * in place and becomes part of the constructed object. It is not cloned.
125
- * If no data is provided, the constructed object will be empty, but still
126
- * valid.
127
- * @extends {jspb.Message}
128
- * @constructor
129
- */
130
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success = function(opt_data) {
131
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
132
- };
133
- goog.inherits(proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success, jspb.Message);
134
- if (goog.DEBUG && !COMPILED) {
135
- /**
136
- * @public
137
- * @override
138
- */
139
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.displayName = 'proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success';
140
- }
141
- /**
142
- * Generated by JsPbCodeGenerator.
143
- * @param {Array=} opt_data Optional initial data array, typically from a
144
- * server response, or constructed directly in Javascript. The array is used
145
- * in place and becomes part of the constructed object. It is not cloned.
146
- * If no data is provided, the constructed object will be empty, but still
147
- * valid.
148
- * @extends {jspb.Message}
149
- * @constructor
150
- */
151
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure = function(opt_data) {
152
- jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.repeatedFields_, null);
153
- };
154
- goog.inherits(proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure, jspb.Message);
155
- if (goog.DEBUG && !COMPILED) {
156
- /**
157
- * @public
158
- * @override
159
- */
160
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.displayName = 'proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure';
161
- }
162
- /**
163
- * Generated by JsPbCodeGenerator.
164
- * @param {Array=} opt_data Optional initial data array, typically from a
165
- * server response, or constructed directly in Javascript. The array is used
166
- * in place and becomes part of the constructed object. It is not cloned.
167
- * If no data is provided, the constructed object will be empty, but still
168
- * valid.
169
- * @extends {jspb.Message}
170
- * @constructor
171
- */
172
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo = function(opt_data) {
173
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
174
- };
175
- goog.inherits(proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo, jspb.Message);
176
- if (goog.DEBUG && !COMPILED) {
177
- /**
178
- * @public
179
- * @override
180
- */
181
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.displayName = 'proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo';
182
- }
183
-
184
-
185
-
186
- if (jspb.Message.GENERATE_TO_OBJECT) {
187
- /**
188
- * Creates an object representation of this proto.
189
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
190
- * Optional fields that are not set will be set to undefined.
191
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
192
- * For the list of reserved names please see:
193
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
194
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
195
- * JSPB instance for transitional soy proto support:
196
- * http://goto/soy-param-migration
197
- * @return {!Object}
198
- */
199
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.toObject = function(opt_includeInstance) {
200
- return proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.toObject(opt_includeInstance, this);
201
- };
202
-
203
-
204
- /**
205
- * Static version of the {@see toObject} method.
206
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
207
- * the JSPB instance for transitional soy proto support:
208
- * http://goto/soy-param-migration
209
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} msg The msg instance to transform.
210
- * @return {!Object}
211
- * @suppress {unusedLocalVariables} f is only used for nested messages
212
- */
213
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.toObject = function(includeInstance, msg) {
214
- var f, obj = {
215
- kind: jspb.Message.getFieldWithDefault(msg, 1, 0),
216
- details: jspb.Message.getFieldWithDefault(msg, 2, ""),
217
- propertyPath: jspb.Message.getFieldWithDefault(msg, 3, ""),
218
- originalType: jspb.Message.getFieldWithDefault(msg, 4, ""),
219
- newType: jspb.Message.getFieldWithDefault(msg, 5, "")
220
- };
221
-
222
- if (includeInstance) {
223
- obj.$jspbMessageInstance = msg;
224
- }
225
- return obj;
226
- };
227
- }
228
-
229
-
230
- /**
231
- * Deserializes binary data (in protobuf wire format).
232
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
233
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError}
234
- */
235
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.deserializeBinary = function(bytes) {
236
- var reader = new jspb.BinaryReader(bytes);
237
- var msg = new proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError;
238
- return proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.deserializeBinaryFromReader(msg, reader);
239
- };
240
-
241
-
242
- /**
243
- * Deserializes binary data (in protobuf wire format) from the
244
- * given reader into the given message object.
245
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} msg The message object to deserialize into.
246
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
247
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError}
248
- */
249
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.deserializeBinaryFromReader = function(msg, reader) {
250
- while (reader.nextField()) {
251
- if (reader.isEndGroup()) {
252
- break;
253
- }
254
- var field = reader.getFieldNumber();
255
- switch (field) {
256
- case 1:
257
- var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind} */ (reader.readEnum());
258
- msg.setKind(value);
259
- break;
260
- case 2:
261
- var value = /** @type {string} */ (reader.readString());
262
- msg.setDetails(value);
263
- break;
264
- case 3:
265
- var value = /** @type {string} */ (reader.readString());
266
- msg.setPropertyPath(value);
267
- break;
268
- case 4:
269
- var value = /** @type {string} */ (reader.readString());
270
- msg.setOriginalType(value);
271
- break;
272
- case 5:
273
- var value = /** @type {string} */ (reader.readString());
274
- msg.setNewType(value);
275
- break;
276
- default:
277
- reader.skipField();
278
- break;
279
- }
280
- }
281
- return msg;
282
- };
283
-
284
-
285
- /**
286
- * Serializes the message to binary data (in protobuf wire format).
287
- * @return {!Uint8Array}
288
- */
289
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.serializeBinary = function() {
290
- var writer = new jspb.BinaryWriter();
291
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.serializeBinaryToWriter(this, writer);
292
- return writer.getResultBuffer();
293
- };
294
-
295
-
296
- /**
297
- * Serializes the given message to binary data (in protobuf wire
298
- * format), writing to the given BinaryWriter.
299
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} message
300
- * @param {!jspb.BinaryWriter} writer
301
- * @suppress {unusedLocalVariables} f is only used for nested messages
302
- */
303
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.serializeBinaryToWriter = function(message, writer) {
304
- var f = undefined;
305
- f = message.getKind();
306
- if (f !== 0.0) {
307
- writer.writeEnum(
308
- 1,
309
- f
310
- );
311
- }
312
- f = message.getDetails();
313
- if (f.length > 0) {
314
- writer.writeString(
315
- 2,
316
- f
317
- );
318
- }
319
- f = /** @type {string} */ (jspb.Message.getField(message, 3));
320
- if (f != null) {
321
- writer.writeString(
322
- 3,
323
- f
324
- );
325
- }
326
- f = /** @type {string} */ (jspb.Message.getField(message, 4));
327
- if (f != null) {
328
- writer.writeString(
329
- 4,
330
- f
331
- );
332
- }
333
- f = /** @type {string} */ (jspb.Message.getField(message, 5));
334
- if (f != null) {
335
- writer.writeString(
336
- 5,
337
- f
338
- );
339
- }
340
- };
341
-
342
-
343
- /**
344
- * optional SchemaCompatibilityErrorKind kind = 1;
345
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind}
346
- */
347
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.getKind = function() {
348
- return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
349
- };
350
-
351
-
352
- /**
353
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind} value
354
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this
355
- */
356
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.setKind = function(value) {
357
- return jspb.Message.setProto3EnumField(this, 1, value);
358
- };
359
-
360
-
361
- /**
362
- * optional string details = 2;
363
- * @return {string}
364
- */
365
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.getDetails = function() {
366
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
367
- };
368
-
369
-
370
- /**
371
- * @param {string} value
372
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this
373
- */
374
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.setDetails = function(value) {
375
- return jspb.Message.setProto3StringField(this, 2, value);
376
- };
377
-
378
-
379
- /**
380
- * optional string property_path = 3;
381
- * @return {string}
382
- */
383
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.getPropertyPath = function() {
384
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
385
- };
386
-
387
-
388
- /**
389
- * @param {string} value
390
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this
391
- */
392
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.setPropertyPath = function(value) {
393
- return jspb.Message.setField(this, 3, value);
394
- };
395
-
396
-
397
- /**
398
- * Clears the field making it undefined.
399
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this
400
- */
401
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.clearPropertyPath = function() {
402
- return jspb.Message.setField(this, 3, undefined);
403
- };
404
-
405
-
406
- /**
407
- * Returns whether this field is set.
408
- * @return {boolean}
409
- */
410
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.hasPropertyPath = function() {
411
- return jspb.Message.getField(this, 3) != null;
412
- };
413
-
414
-
415
- /**
416
- * optional string original_type = 4;
417
- * @return {string}
418
- */
419
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.getOriginalType = function() {
420
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
421
- };
422
-
423
-
424
- /**
425
- * @param {string} value
426
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this
427
- */
428
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.setOriginalType = function(value) {
429
- return jspb.Message.setField(this, 4, value);
430
- };
431
-
432
-
433
- /**
434
- * Clears the field making it undefined.
435
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this
436
- */
437
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.clearOriginalType = function() {
438
- return jspb.Message.setField(this, 4, undefined);
439
- };
440
-
441
-
442
- /**
443
- * Returns whether this field is set.
444
- * @return {boolean}
445
- */
446
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.hasOriginalType = function() {
447
- return jspb.Message.getField(this, 4) != null;
448
- };
449
-
450
-
451
- /**
452
- * optional string new_type = 5;
453
- * @return {string}
454
- */
455
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.getNewType = function() {
456
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
457
- };
458
-
459
-
460
- /**
461
- * @param {string} value
462
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this
463
- */
464
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.setNewType = function(value) {
465
- return jspb.Message.setField(this, 5, value);
466
- };
467
-
468
-
469
- /**
470
- * Clears the field making it undefined.
471
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError} returns this
472
- */
473
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.clearNewType = function() {
474
- return jspb.Message.setField(this, 5, undefined);
475
- };
476
-
477
-
478
- /**
479
- * Returns whether this field is set.
480
- * @return {boolean}
481
- */
482
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.prototype.hasNewType = function() {
483
- return jspb.Message.getField(this, 5) != null;
484
- };
485
-
486
-
487
-
488
- /**
489
- * List of repeated fields within this message type.
490
- * @private {!Array<number>}
491
- * @const
492
- */
493
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.repeatedFields_ = [3];
494
-
495
-
496
-
497
- if (jspb.Message.GENERATE_TO_OBJECT) {
498
- /**
499
- * Creates an object representation of this proto.
500
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
501
- * Optional fields that are not set will be set to undefined.
502
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
503
- * For the list of reserved names please see:
504
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
505
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
506
- * JSPB instance for transitional soy proto support:
507
- * http://goto/soy-param-migration
508
- * @return {!Object}
509
- */
510
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.toObject = function(opt_includeInstance) {
511
- return proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.toObject(opt_includeInstance, this);
512
- };
513
-
514
-
515
- /**
516
- * Static version of the {@see toObject} method.
517
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
518
- * the JSPB instance for transitional soy proto support:
519
- * http://goto/soy-param-migration
520
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} msg The msg instance to transform.
521
- * @return {!Object}
522
- * @suppress {unusedLocalVariables} f is only used for nested messages
523
- */
524
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.toObject = function(includeInstance, msg) {
525
- var f, obj = {
526
- isCompatible: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
527
- schemaVersionId: jspb.Message.getFieldWithDefault(msg, 2, ""),
528
- errorsList: jspb.Message.toObjectList(msg.getErrorsList(),
529
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.toObject, includeInstance)
530
- };
531
-
532
- if (includeInstance) {
533
- obj.$jspbMessageInstance = msg;
534
- }
535
- return obj;
536
- };
537
- }
538
-
539
-
540
- /**
541
- * Deserializes binary data (in protobuf wire format).
542
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
543
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult}
544
- */
545
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.deserializeBinary = function(bytes) {
546
- var reader = new jspb.BinaryReader(bytes);
547
- var msg = new proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult;
548
- return proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.deserializeBinaryFromReader(msg, reader);
549
- };
550
-
551
-
552
- /**
553
- * Deserializes binary data (in protobuf wire format) from the
554
- * given reader into the given message object.
555
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} msg The message object to deserialize into.
556
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
557
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult}
558
- */
559
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.deserializeBinaryFromReader = function(msg, reader) {
560
- while (reader.nextField()) {
561
- if (reader.isEndGroup()) {
562
- break;
563
- }
564
- var field = reader.getFieldNumber();
565
- switch (field) {
566
- case 1:
567
- var value = /** @type {boolean} */ (reader.readBool());
568
- msg.setIsCompatible(value);
569
- break;
570
- case 2:
571
- var value = /** @type {string} */ (reader.readString());
572
- msg.setSchemaVersionId(value);
573
- break;
574
- case 3:
575
- var value = new proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError;
576
- reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.deserializeBinaryFromReader);
577
- msg.addErrors(value);
578
- break;
579
- default:
580
- reader.skipField();
581
- break;
582
- }
583
- }
584
- return msg;
585
- };
586
-
587
-
588
- /**
589
- * Serializes the message to binary data (in protobuf wire format).
590
- * @return {!Uint8Array}
591
- */
592
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.serializeBinary = function() {
593
- var writer = new jspb.BinaryWriter();
594
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.serializeBinaryToWriter(this, writer);
595
- return writer.getResultBuffer();
596
- };
597
-
598
-
599
- /**
600
- * Serializes the given message to binary data (in protobuf wire
601
- * format), writing to the given BinaryWriter.
602
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} message
603
- * @param {!jspb.BinaryWriter} writer
604
- * @suppress {unusedLocalVariables} f is only used for nested messages
605
- */
606
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.serializeBinaryToWriter = function(message, writer) {
607
- var f = undefined;
608
- f = message.getIsCompatible();
609
- if (f) {
610
- writer.writeBool(
611
- 1,
612
- f
613
- );
614
- }
615
- f = message.getSchemaVersionId();
616
- if (f.length > 0) {
617
- writer.writeString(
618
- 2,
619
- f
620
- );
621
- }
622
- f = message.getErrorsList();
623
- if (f.length > 0) {
624
- writer.writeRepeatedMessage(
625
- 3,
626
- f,
627
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.serializeBinaryToWriter
628
- );
629
- }
630
- };
631
-
632
-
633
- /**
634
- * optional bool is_compatible = 1;
635
- * @return {boolean}
636
- */
637
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.getIsCompatible = function() {
638
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
639
- };
640
-
641
-
642
- /**
643
- * @param {boolean} value
644
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} returns this
645
- */
646
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.setIsCompatible = function(value) {
647
- return jspb.Message.setProto3BooleanField(this, 1, value);
648
- };
649
-
650
-
651
- /**
652
- * optional string schema_version_id = 2;
653
- * @return {string}
654
- */
655
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.getSchemaVersionId = function() {
656
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
657
- };
658
-
659
-
660
- /**
661
- * @param {string} value
662
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} returns this
663
- */
664
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.setSchemaVersionId = function(value) {
665
- return jspb.Message.setProto3StringField(this, 2, value);
666
- };
667
-
668
-
669
- /**
670
- * repeated SchemaCompatibilityError errors = 3;
671
- * @return {!Array<!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError>}
672
- */
673
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.getErrorsList = function() {
674
- return /** @type{!Array<!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError>} */ (
675
- jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError, 3));
676
- };
677
-
678
-
679
- /**
680
- * @param {!Array<!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError>} value
681
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} returns this
682
- */
683
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.setErrorsList = function(value) {
684
- return jspb.Message.setRepeatedWrapperField(this, 3, value);
685
- };
686
-
687
-
688
- /**
689
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError=} opt_value
690
- * @param {number=} opt_index
691
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError}
692
- */
693
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.addErrors = function(opt_value, opt_index) {
694
- return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError, opt_index);
695
- };
696
-
697
-
698
- /**
699
- * Clears the list making it empty but non-null.
700
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult} returns this
701
- */
702
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityResult.prototype.clearErrorsList = function() {
703
- return this.setErrorsList([]);
704
- };
705
-
706
-
707
-
708
- /**
709
- * Oneof group definitions for this message. Each group defines the field
710
- * numbers belonging to that group. When of these fields' value is set, all
711
- * other fields in the group are cleared. During deserialization, if multiple
712
- * fields are encountered for a group, only the last value seen will be kept.
713
- * @private {!Array<!Array<number>>}
714
- * @const
715
- */
716
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_ = [[1,2]];
717
-
718
- /**
719
- * @enum {number}
720
- */
721
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.SchemaIdentifierCase = {
722
- SCHEMA_IDENTIFIER_NOT_SET: 0,
723
- SCHEMA_NAME: 1,
724
- SCHEMA_VERSION_ID: 2
725
- };
726
-
727
- /**
728
- * @return {proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.SchemaIdentifierCase}
729
- */
730
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getSchemaIdentifierCase = function() {
731
- return /** @type {proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.SchemaIdentifierCase} */(jspb.Message.computeOneofCase(this, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_[0]));
732
- };
733
-
734
-
735
-
736
- if (jspb.Message.GENERATE_TO_OBJECT) {
737
- /**
738
- * Creates an object representation of this proto.
739
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
740
- * Optional fields that are not set will be set to undefined.
741
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
742
- * For the list of reserved names please see:
743
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
744
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
745
- * JSPB instance for transitional soy proto support:
746
- * http://goto/soy-param-migration
747
- * @return {!Object}
748
- */
749
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.toObject = function(opt_includeInstance) {
750
- return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.toObject(opt_includeInstance, this);
751
- };
752
-
753
-
754
- /**
755
- * Static version of the {@see toObject} method.
756
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
757
- * the JSPB instance for transitional soy proto support:
758
- * http://goto/soy-param-migration
759
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} msg The msg instance to transform.
760
- * @return {!Object}
761
- * @suppress {unusedLocalVariables} f is only used for nested messages
762
- */
763
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.toObject = function(includeInstance, msg) {
764
- var f, obj = {
765
- schemaName: jspb.Message.getFieldWithDefault(msg, 1, ""),
766
- schemaVersionId: jspb.Message.getFieldWithDefault(msg, 2, ""),
767
- definition: msg.getDefinition_asB64(),
768
- dataFormat: jspb.Message.getFieldWithDefault(msg, 4, 0)
769
- };
770
-
771
- if (includeInstance) {
772
- obj.$jspbMessageInstance = msg;
773
- }
774
- return obj;
775
- };
776
- }
777
-
778
-
779
- /**
780
- * Deserializes binary data (in protobuf wire format).
781
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
782
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest}
783
- */
784
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.deserializeBinary = function(bytes) {
785
- var reader = new jspb.BinaryReader(bytes);
786
- var msg = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest;
787
- return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.deserializeBinaryFromReader(msg, reader);
788
- };
789
-
790
-
791
- /**
792
- * Deserializes binary data (in protobuf wire format) from the
793
- * given reader into the given message object.
794
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} msg The message object to deserialize into.
795
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
796
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest}
797
- */
798
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.deserializeBinaryFromReader = function(msg, reader) {
799
- while (reader.nextField()) {
800
- if (reader.isEndGroup()) {
801
- break;
802
- }
803
- var field = reader.getFieldNumber();
804
- switch (field) {
805
- case 1:
806
- var value = /** @type {string} */ (reader.readString());
807
- msg.setSchemaName(value);
808
- break;
809
- case 2:
810
- var value = /** @type {string} */ (reader.readString());
811
- msg.setSchemaVersionId(value);
812
- break;
813
- case 3:
814
- var value = /** @type {!Uint8Array} */ (reader.readBytes());
815
- msg.setDefinition(value);
816
- break;
817
- case 4:
818
- var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (reader.readEnum());
819
- msg.setDataFormat(value);
820
- break;
821
- default:
822
- reader.skipField();
823
- break;
824
- }
825
- }
826
- return msg;
827
- };
828
-
829
-
830
- /**
831
- * Serializes the message to binary data (in protobuf wire format).
832
- * @return {!Uint8Array}
833
- */
834
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.serializeBinary = function() {
835
- var writer = new jspb.BinaryWriter();
836
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.serializeBinaryToWriter(this, writer);
837
- return writer.getResultBuffer();
838
- };
839
-
840
-
841
- /**
842
- * Serializes the given message to binary data (in protobuf wire
843
- * format), writing to the given BinaryWriter.
844
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} message
845
- * @param {!jspb.BinaryWriter} writer
846
- * @suppress {unusedLocalVariables} f is only used for nested messages
847
- */
848
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.serializeBinaryToWriter = function(message, writer) {
849
- var f = undefined;
850
- f = /** @type {string} */ (jspb.Message.getField(message, 1));
851
- if (f != null) {
852
- writer.writeString(
853
- 1,
854
- f
855
- );
856
- }
857
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
858
- if (f != null) {
859
- writer.writeString(
860
- 2,
861
- f
862
- );
863
- }
864
- f = message.getDefinition_asU8();
865
- if (f.length > 0) {
866
- writer.writeBytes(
867
- 3,
868
- f
869
- );
870
- }
871
- f = message.getDataFormat();
872
- if (f !== 0.0) {
873
- writer.writeEnum(
874
- 4,
875
- f
876
- );
877
- }
878
- };
879
-
880
-
881
- /**
882
- * optional string schema_name = 1;
883
- * @return {string}
884
- */
885
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getSchemaName = function() {
886
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
887
- };
888
-
889
-
890
- /**
891
- * @param {string} value
892
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this
893
- */
894
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.setSchemaName = function(value) {
895
- return jspb.Message.setOneofField(this, 1, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_[0], value);
896
- };
897
-
898
-
899
- /**
900
- * Clears the field making it undefined.
901
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this
902
- */
903
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.clearSchemaName = function() {
904
- return jspb.Message.setOneofField(this, 1, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_[0], undefined);
905
- };
906
-
907
-
908
- /**
909
- * Returns whether this field is set.
910
- * @return {boolean}
911
- */
912
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.hasSchemaName = function() {
913
- return jspb.Message.getField(this, 1) != null;
914
- };
915
-
916
-
917
- /**
918
- * optional string schema_version_id = 2;
919
- * @return {string}
920
- */
921
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getSchemaVersionId = function() {
922
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
923
- };
924
-
925
-
926
- /**
927
- * @param {string} value
928
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this
929
- */
930
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.setSchemaVersionId = function(value) {
931
- return jspb.Message.setOneofField(this, 2, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_[0], value);
932
- };
933
-
934
-
935
- /**
936
- * Clears the field making it undefined.
937
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this
938
- */
939
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.clearSchemaVersionId = function() {
940
- return jspb.Message.setOneofField(this, 2, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.oneofGroups_[0], undefined);
941
- };
942
-
943
-
944
- /**
945
- * Returns whether this field is set.
946
- * @return {boolean}
947
- */
948
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.hasSchemaVersionId = function() {
949
- return jspb.Message.getField(this, 2) != null;
950
- };
951
-
952
-
953
- /**
954
- * optional bytes definition = 3;
955
- * @return {!(string|Uint8Array)}
956
- */
957
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getDefinition = function() {
958
- return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
959
- };
960
-
961
-
962
- /**
963
- * optional bytes definition = 3;
964
- * This is a type-conversion wrapper around `getDefinition()`
965
- * @return {string}
966
- */
967
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getDefinition_asB64 = function() {
968
- return /** @type {string} */ (jspb.Message.bytesAsB64(
969
- this.getDefinition()));
970
- };
971
-
972
-
973
- /**
974
- * optional bytes definition = 3;
975
- * Note that Uint8Array is not supported on all browsers.
976
- * @see http://caniuse.com/Uint8Array
977
- * This is a type-conversion wrapper around `getDefinition()`
978
- * @return {!Uint8Array}
979
- */
980
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getDefinition_asU8 = function() {
981
- return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
982
- this.getDefinition()));
983
- };
984
-
985
-
986
- /**
987
- * @param {!(string|Uint8Array)} value
988
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this
989
- */
990
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.setDefinition = function(value) {
991
- return jspb.Message.setProto3BytesField(this, 3, value);
992
- };
993
-
994
-
995
- /**
996
- * optional SchemaDataFormat data_format = 4;
997
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat}
998
- */
999
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.getDataFormat = function() {
1000
- return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1001
- };
1002
-
1003
-
1004
- /**
1005
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} value
1006
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest} returns this
1007
- */
1008
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityRequest.prototype.setDataFormat = function(value) {
1009
- return jspb.Message.setProto3EnumField(this, 4, value);
1010
- };
1011
-
1012
-
1013
-
1014
- /**
1015
- * Oneof group definitions for this message. Each group defines the field
1016
- * numbers belonging to that group. When of these fields' value is set, all
1017
- * other fields in the group are cleared. During deserialization, if multiple
1018
- * fields are encountered for a group, only the last value seen will be kept.
1019
- * @private {!Array<!Array<number>>}
1020
- * @const
1021
- */
1022
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.oneofGroups_ = [[1,2]];
1023
-
1024
- /**
1025
- * @enum {number}
1026
- */
1027
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.ResultCase = {
1028
- RESULT_NOT_SET: 0,
1029
- SUCCESS: 1,
1030
- FAILURE: 2
1031
- };
1032
-
1033
- /**
1034
- * @return {proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.ResultCase}
1035
- */
1036
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.getResultCase = function() {
1037
- return /** @type {proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.ResultCase} */(jspb.Message.computeOneofCase(this, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.oneofGroups_[0]));
1038
- };
1039
-
1040
-
1041
-
1042
- if (jspb.Message.GENERATE_TO_OBJECT) {
1043
- /**
1044
- * Creates an object representation of this proto.
1045
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1046
- * Optional fields that are not set will be set to undefined.
1047
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1048
- * For the list of reserved names please see:
1049
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1050
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1051
- * JSPB instance for transitional soy proto support:
1052
- * http://goto/soy-param-migration
1053
- * @return {!Object}
1054
- */
1055
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.toObject = function(opt_includeInstance) {
1056
- return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.toObject(opt_includeInstance, this);
1057
- };
1058
-
1059
-
1060
- /**
1061
- * Static version of the {@see toObject} method.
1062
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1063
- * the JSPB instance for transitional soy proto support:
1064
- * http://goto/soy-param-migration
1065
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} msg The msg instance to transform.
1066
- * @return {!Object}
1067
- * @suppress {unusedLocalVariables} f is only used for nested messages
1068
- */
1069
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.toObject = function(includeInstance, msg) {
1070
- var f, obj = {
1071
- success: (f = msg.getSuccess()) && proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.toObject(includeInstance, f),
1072
- failure: (f = msg.getFailure()) && proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.toObject(includeInstance, f)
1073
- };
1074
-
1075
- if (includeInstance) {
1076
- obj.$jspbMessageInstance = msg;
1077
- }
1078
- return obj;
1079
- };
1080
- }
1081
-
1082
-
1083
- /**
1084
- * Deserializes binary data (in protobuf wire format).
1085
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1086
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse}
1087
- */
1088
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.deserializeBinary = function(bytes) {
1089
- var reader = new jspb.BinaryReader(bytes);
1090
- var msg = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse;
1091
- return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.deserializeBinaryFromReader(msg, reader);
1092
- };
1093
-
1094
-
1095
- /**
1096
- * Deserializes binary data (in protobuf wire format) from the
1097
- * given reader into the given message object.
1098
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} msg The message object to deserialize into.
1099
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1100
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse}
1101
- */
1102
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.deserializeBinaryFromReader = function(msg, reader) {
1103
- while (reader.nextField()) {
1104
- if (reader.isEndGroup()) {
1105
- break;
1106
- }
1107
- var field = reader.getFieldNumber();
1108
- switch (field) {
1109
- case 1:
1110
- var value = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success;
1111
- reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.deserializeBinaryFromReader);
1112
- msg.setSuccess(value);
1113
- break;
1114
- case 2:
1115
- var value = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure;
1116
- reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.deserializeBinaryFromReader);
1117
- msg.setFailure(value);
1118
- break;
1119
- default:
1120
- reader.skipField();
1121
- break;
1122
- }
1123
- }
1124
- return msg;
1125
- };
1126
-
1127
-
1128
- /**
1129
- * Serializes the message to binary data (in protobuf wire format).
1130
- * @return {!Uint8Array}
1131
- */
1132
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.serializeBinary = function() {
1133
- var writer = new jspb.BinaryWriter();
1134
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.serializeBinaryToWriter(this, writer);
1135
- return writer.getResultBuffer();
1136
- };
1137
-
1138
-
1139
- /**
1140
- * Serializes the given message to binary data (in protobuf wire
1141
- * format), writing to the given BinaryWriter.
1142
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} message
1143
- * @param {!jspb.BinaryWriter} writer
1144
- * @suppress {unusedLocalVariables} f is only used for nested messages
1145
- */
1146
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.serializeBinaryToWriter = function(message, writer) {
1147
- var f = undefined;
1148
- f = message.getSuccess();
1149
- if (f != null) {
1150
- writer.writeMessage(
1151
- 1,
1152
- f,
1153
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.serializeBinaryToWriter
1154
- );
1155
- }
1156
- f = message.getFailure();
1157
- if (f != null) {
1158
- writer.writeMessage(
1159
- 2,
1160
- f,
1161
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.serializeBinaryToWriter
1162
- );
1163
- }
1164
- };
1165
-
1166
-
1167
-
1168
-
1169
-
1170
- if (jspb.Message.GENERATE_TO_OBJECT) {
1171
- /**
1172
- * Creates an object representation of this proto.
1173
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1174
- * Optional fields that are not set will be set to undefined.
1175
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1176
- * For the list of reserved names please see:
1177
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1178
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1179
- * JSPB instance for transitional soy proto support:
1180
- * http://goto/soy-param-migration
1181
- * @return {!Object}
1182
- */
1183
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.prototype.toObject = function(opt_includeInstance) {
1184
- return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.toObject(opt_includeInstance, this);
1185
- };
1186
-
1187
-
1188
- /**
1189
- * Static version of the {@see toObject} method.
1190
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1191
- * the JSPB instance for transitional soy proto support:
1192
- * http://goto/soy-param-migration
1193
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} msg The msg instance to transform.
1194
- * @return {!Object}
1195
- * @suppress {unusedLocalVariables} f is only used for nested messages
1196
- */
1197
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.toObject = function(includeInstance, msg) {
1198
- var f, obj = {
1199
- schemaVersionId: jspb.Message.getFieldWithDefault(msg, 2, "")
1200
- };
1201
-
1202
- if (includeInstance) {
1203
- obj.$jspbMessageInstance = msg;
1204
- }
1205
- return obj;
1206
- };
1207
- }
1208
-
1209
-
1210
- /**
1211
- * Deserializes binary data (in protobuf wire format).
1212
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1213
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success}
1214
- */
1215
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.deserializeBinary = function(bytes) {
1216
- var reader = new jspb.BinaryReader(bytes);
1217
- var msg = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success;
1218
- return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.deserializeBinaryFromReader(msg, reader);
1219
- };
1220
-
1221
-
1222
- /**
1223
- * Deserializes binary data (in protobuf wire format) from the
1224
- * given reader into the given message object.
1225
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} msg The message object to deserialize into.
1226
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1227
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success}
1228
- */
1229
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.deserializeBinaryFromReader = function(msg, reader) {
1230
- while (reader.nextField()) {
1231
- if (reader.isEndGroup()) {
1232
- break;
1233
- }
1234
- var field = reader.getFieldNumber();
1235
- switch (field) {
1236
- case 2:
1237
- var value = /** @type {string} */ (reader.readString());
1238
- msg.setSchemaVersionId(value);
1239
- break;
1240
- default:
1241
- reader.skipField();
1242
- break;
1243
- }
1244
- }
1245
- return msg;
1246
- };
1247
-
1248
-
1249
- /**
1250
- * Serializes the message to binary data (in protobuf wire format).
1251
- * @return {!Uint8Array}
1252
- */
1253
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.prototype.serializeBinary = function() {
1254
- var writer = new jspb.BinaryWriter();
1255
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.serializeBinaryToWriter(this, writer);
1256
- return writer.getResultBuffer();
1257
- };
1258
-
1259
-
1260
- /**
1261
- * Serializes the given message to binary data (in protobuf wire
1262
- * format), writing to the given BinaryWriter.
1263
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} message
1264
- * @param {!jspb.BinaryWriter} writer
1265
- * @suppress {unusedLocalVariables} f is only used for nested messages
1266
- */
1267
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.serializeBinaryToWriter = function(message, writer) {
1268
- var f = undefined;
1269
- f = message.getSchemaVersionId();
1270
- if (f.length > 0) {
1271
- writer.writeString(
1272
- 2,
1273
- f
1274
- );
1275
- }
1276
- };
1277
-
1278
-
1279
- /**
1280
- * optional string schema_version_id = 2;
1281
- * @return {string}
1282
- */
1283
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.prototype.getSchemaVersionId = function() {
1284
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1285
- };
1286
-
1287
-
1288
- /**
1289
- * @param {string} value
1290
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} returns this
1291
- */
1292
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success.prototype.setSchemaVersionId = function(value) {
1293
- return jspb.Message.setProto3StringField(this, 2, value);
1294
- };
1295
-
1296
-
1297
-
1298
- /**
1299
- * List of repeated fields within this message type.
1300
- * @private {!Array<number>}
1301
- * @const
1302
- */
1303
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.repeatedFields_ = [3];
1304
-
1305
-
1306
-
1307
- if (jspb.Message.GENERATE_TO_OBJECT) {
1308
- /**
1309
- * Creates an object representation of this proto.
1310
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1311
- * Optional fields that are not set will be set to undefined.
1312
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1313
- * For the list of reserved names please see:
1314
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1315
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1316
- * JSPB instance for transitional soy proto support:
1317
- * http://goto/soy-param-migration
1318
- * @return {!Object}
1319
- */
1320
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.toObject = function(opt_includeInstance) {
1321
- return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.toObject(opt_includeInstance, this);
1322
- };
1323
-
1324
-
1325
- /**
1326
- * Static version of the {@see toObject} method.
1327
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1328
- * the JSPB instance for transitional soy proto support:
1329
- * http://goto/soy-param-migration
1330
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} msg The msg instance to transform.
1331
- * @return {!Object}
1332
- * @suppress {unusedLocalVariables} f is only used for nested messages
1333
- */
1334
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.toObject = function(includeInstance, msg) {
1335
- var f, obj = {
1336
- errorsList: jspb.Message.toObjectList(msg.getErrorsList(),
1337
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.toObject, includeInstance)
1338
- };
1339
-
1340
- if (includeInstance) {
1341
- obj.$jspbMessageInstance = msg;
1342
- }
1343
- return obj;
1344
- };
1345
- }
1346
-
1347
-
1348
- /**
1349
- * Deserializes binary data (in protobuf wire format).
1350
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1351
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure}
1352
- */
1353
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.deserializeBinary = function(bytes) {
1354
- var reader = new jspb.BinaryReader(bytes);
1355
- var msg = new proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure;
1356
- return proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.deserializeBinaryFromReader(msg, reader);
1357
- };
1358
-
1359
-
1360
- /**
1361
- * Deserializes binary data (in protobuf wire format) from the
1362
- * given reader into the given message object.
1363
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} msg The message object to deserialize into.
1364
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1365
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure}
1366
- */
1367
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.deserializeBinaryFromReader = function(msg, reader) {
1368
- while (reader.nextField()) {
1369
- if (reader.isEndGroup()) {
1370
- break;
1371
- }
1372
- var field = reader.getFieldNumber();
1373
- switch (field) {
1374
- case 3:
1375
- var value = new proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError;
1376
- reader.readMessage(value,proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.deserializeBinaryFromReader);
1377
- msg.addErrors(value);
1378
- break;
1379
- default:
1380
- reader.skipField();
1381
- break;
1382
- }
1383
- }
1384
- return msg;
1385
- };
1386
-
1387
-
1388
- /**
1389
- * Serializes the message to binary data (in protobuf wire format).
1390
- * @return {!Uint8Array}
1391
- */
1392
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.serializeBinary = function() {
1393
- var writer = new jspb.BinaryWriter();
1394
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.serializeBinaryToWriter(this, writer);
1395
- return writer.getResultBuffer();
1396
- };
1397
-
1398
-
1399
- /**
1400
- * Serializes the given message to binary data (in protobuf wire
1401
- * format), writing to the given BinaryWriter.
1402
- * @param {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} message
1403
- * @param {!jspb.BinaryWriter} writer
1404
- * @suppress {unusedLocalVariables} f is only used for nested messages
1405
- */
1406
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.serializeBinaryToWriter = function(message, writer) {
1407
- var f = undefined;
1408
- f = message.getErrorsList();
1409
- if (f.length > 0) {
1410
- writer.writeRepeatedMessage(
1411
- 3,
1412
- f,
1413
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError.serializeBinaryToWriter
1414
- );
1415
- }
1416
- };
1417
-
1418
-
1419
- /**
1420
- * repeated SchemaCompatibilityError errors = 3;
1421
- * @return {!Array<!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError>}
1422
- */
1423
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.getErrorsList = function() {
1424
- return /** @type{!Array<!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError>} */ (
1425
- jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError, 3));
1426
- };
1427
-
1428
-
1429
- /**
1430
- * @param {!Array<!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError>} value
1431
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} returns this
1432
- */
1433
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.setErrorsList = function(value) {
1434
- return jspb.Message.setRepeatedWrapperField(this, 3, value);
1435
- };
1436
-
1437
-
1438
- /**
1439
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError=} opt_value
1440
- * @param {number=} opt_index
1441
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError}
1442
- */
1443
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.addErrors = function(opt_value, opt_index) {
1444
- return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityError, opt_index);
1445
- };
1446
-
1447
-
1448
- /**
1449
- * Clears the list making it empty but non-null.
1450
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} returns this
1451
- */
1452
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure.prototype.clearErrorsList = function() {
1453
- return this.setErrorsList([]);
1454
- };
1455
-
1456
-
1457
- /**
1458
- * optional Success success = 1;
1459
- * @return {?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success}
1460
- */
1461
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.getSuccess = function() {
1462
- return /** @type{?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success} */ (
1463
- jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success, 1));
1464
- };
1465
-
1466
-
1467
- /**
1468
- * @param {?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Success|undefined} value
1469
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} returns this
1470
- */
1471
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.setSuccess = function(value) {
1472
- return jspb.Message.setOneofWrapperField(this, 1, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.oneofGroups_[0], value);
1473
- };
1474
-
1475
-
1476
- /**
1477
- * Clears the message field making it undefined.
1478
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} returns this
1479
- */
1480
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.clearSuccess = function() {
1481
- return this.setSuccess(undefined);
1482
- };
1483
-
1484
-
1485
- /**
1486
- * Returns whether this field is set.
1487
- * @return {boolean}
1488
- */
1489
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.hasSuccess = function() {
1490
- return jspb.Message.getField(this, 1) != null;
1491
- };
1492
-
1493
-
1494
- /**
1495
- * optional Failure failure = 2;
1496
- * @return {?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure}
1497
- */
1498
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.getFailure = function() {
1499
- return /** @type{?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure} */ (
1500
- jspb.Message.getWrapperField(this, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure, 2));
1501
- };
1502
-
1503
-
1504
- /**
1505
- * @param {?proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.Failure|undefined} value
1506
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} returns this
1507
- */
1508
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.setFailure = function(value) {
1509
- return jspb.Message.setOneofWrapperField(this, 2, proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.oneofGroups_[0], value);
1510
- };
1511
-
1512
-
1513
- /**
1514
- * Clears the message field making it undefined.
1515
- * @return {!proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse} returns this
1516
- */
1517
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.clearFailure = function() {
1518
- return this.setFailure(undefined);
1519
- };
1520
-
1521
-
1522
- /**
1523
- * Returns whether this field is set.
1524
- * @return {boolean}
1525
- */
1526
- proto.kurrentdb.protocol.registry.v2.CheckSchemaCompatibilityResponse.prototype.hasFailure = function() {
1527
- return jspb.Message.getField(this, 2) != null;
1528
- };
1529
-
1530
-
1531
-
1532
-
1533
-
1534
- if (jspb.Message.GENERATE_TO_OBJECT) {
1535
- /**
1536
- * Creates an object representation of this proto.
1537
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1538
- * Optional fields that are not set will be set to undefined.
1539
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1540
- * For the list of reserved names please see:
1541
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1542
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1543
- * JSPB instance for transitional soy proto support:
1544
- * http://goto/soy-param-migration
1545
- * @return {!Object}
1546
- */
1547
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.toObject = function(opt_includeInstance) {
1548
- return proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.toObject(opt_includeInstance, this);
1549
- };
1550
-
1551
-
1552
- /**
1553
- * Static version of the {@see toObject} method.
1554
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1555
- * the JSPB instance for transitional soy proto support:
1556
- * http://goto/soy-param-migration
1557
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} msg The msg instance to transform.
1558
- * @return {!Object}
1559
- * @suppress {unusedLocalVariables} f is only used for nested messages
1560
- */
1561
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.toObject = function(includeInstance, msg) {
1562
- var f, obj = {
1563
- schemaVersionId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1564
- schemaDefinition: msg.getSchemaDefinition_asB64(),
1565
- dataFormat: jspb.Message.getFieldWithDefault(msg, 3, 0),
1566
- compatibility: jspb.Message.getFieldWithDefault(msg, 4, 0)
1567
- };
1568
-
1569
- if (includeInstance) {
1570
- obj.$jspbMessageInstance = msg;
1571
- }
1572
- return obj;
1573
- };
1574
- }
1575
-
1576
-
1577
- /**
1578
- * Deserializes binary data (in protobuf wire format).
1579
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1580
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo}
1581
- */
1582
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.deserializeBinary = function(bytes) {
1583
- var reader = new jspb.BinaryReader(bytes);
1584
- var msg = new proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo;
1585
- return proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.deserializeBinaryFromReader(msg, reader);
1586
- };
1587
-
1588
-
1589
- /**
1590
- * Deserializes binary data (in protobuf wire format) from the
1591
- * given reader into the given message object.
1592
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} msg The message object to deserialize into.
1593
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1594
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo}
1595
- */
1596
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.deserializeBinaryFromReader = function(msg, reader) {
1597
- while (reader.nextField()) {
1598
- if (reader.isEndGroup()) {
1599
- break;
1600
- }
1601
- var field = reader.getFieldNumber();
1602
- switch (field) {
1603
- case 1:
1604
- var value = /** @type {string} */ (reader.readString());
1605
- msg.setSchemaVersionId(value);
1606
- break;
1607
- case 2:
1608
- var value = /** @type {!Uint8Array} */ (reader.readBytes());
1609
- msg.setSchemaDefinition(value);
1610
- break;
1611
- case 3:
1612
- var value = /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (reader.readEnum());
1613
- msg.setDataFormat(value);
1614
- break;
1615
- case 4:
1616
- var value = /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (reader.readEnum());
1617
- msg.setCompatibility(value);
1618
- break;
1619
- default:
1620
- reader.skipField();
1621
- break;
1622
- }
1623
- }
1624
- return msg;
1625
- };
1626
-
1627
-
1628
- /**
1629
- * Serializes the message to binary data (in protobuf wire format).
1630
- * @return {!Uint8Array}
1631
- */
1632
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.serializeBinary = function() {
1633
- var writer = new jspb.BinaryWriter();
1634
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.serializeBinaryToWriter(this, writer);
1635
- return writer.getResultBuffer();
1636
- };
1637
-
1638
-
1639
- /**
1640
- * Serializes the given message to binary data (in protobuf wire
1641
- * format), writing to the given BinaryWriter.
1642
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} message
1643
- * @param {!jspb.BinaryWriter} writer
1644
- * @suppress {unusedLocalVariables} f is only used for nested messages
1645
- */
1646
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.serializeBinaryToWriter = function(message, writer) {
1647
- var f = undefined;
1648
- f = message.getSchemaVersionId();
1649
- if (f.length > 0) {
1650
- writer.writeString(
1651
- 1,
1652
- f
1653
- );
1654
- }
1655
- f = message.getSchemaDefinition_asU8();
1656
- if (f.length > 0) {
1657
- writer.writeBytes(
1658
- 2,
1659
- f
1660
- );
1661
- }
1662
- f = message.getDataFormat();
1663
- if (f !== 0.0) {
1664
- writer.writeEnum(
1665
- 3,
1666
- f
1667
- );
1668
- }
1669
- f = message.getCompatibility();
1670
- if (f !== 0.0) {
1671
- writer.writeEnum(
1672
- 4,
1673
- f
1674
- );
1675
- }
1676
- };
1677
-
1678
-
1679
- /**
1680
- * optional string schema_version_id = 1;
1681
- * @return {string}
1682
- */
1683
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getSchemaVersionId = function() {
1684
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1685
- };
1686
-
1687
-
1688
- /**
1689
- * @param {string} value
1690
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} returns this
1691
- */
1692
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.setSchemaVersionId = function(value) {
1693
- return jspb.Message.setProto3StringField(this, 1, value);
1694
- };
1695
-
1696
-
1697
- /**
1698
- * optional bytes schema_definition = 2;
1699
- * @return {!(string|Uint8Array)}
1700
- */
1701
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getSchemaDefinition = function() {
1702
- return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1703
- };
1704
-
1705
-
1706
- /**
1707
- * optional bytes schema_definition = 2;
1708
- * This is a type-conversion wrapper around `getSchemaDefinition()`
1709
- * @return {string}
1710
- */
1711
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getSchemaDefinition_asB64 = function() {
1712
- return /** @type {string} */ (jspb.Message.bytesAsB64(
1713
- this.getSchemaDefinition()));
1714
- };
1715
-
1716
-
1717
- /**
1718
- * optional bytes schema_definition = 2;
1719
- * Note that Uint8Array is not supported on all browsers.
1720
- * @see http://caniuse.com/Uint8Array
1721
- * This is a type-conversion wrapper around `getSchemaDefinition()`
1722
- * @return {!Uint8Array}
1723
- */
1724
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getSchemaDefinition_asU8 = function() {
1725
- return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1726
- this.getSchemaDefinition()));
1727
- };
1728
-
1729
-
1730
- /**
1731
- * @param {!(string|Uint8Array)} value
1732
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} returns this
1733
- */
1734
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.setSchemaDefinition = function(value) {
1735
- return jspb.Message.setProto3BytesField(this, 2, value);
1736
- };
1737
-
1738
-
1739
- /**
1740
- * optional SchemaDataFormat data_format = 3;
1741
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat}
1742
- */
1743
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getDataFormat = function() {
1744
- return /** @type {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1745
- };
1746
-
1747
-
1748
- /**
1749
- * @param {!proto.kurrentdb.protocol.registry.v2.SchemaDataFormat} value
1750
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} returns this
1751
- */
1752
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.setDataFormat = function(value) {
1753
- return jspb.Message.setProto3EnumField(this, 3, value);
1754
- };
1755
-
1756
-
1757
- /**
1758
- * optional CompatibilityMode compatibility = 4;
1759
- * @return {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode}
1760
- */
1761
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.getCompatibility = function() {
1762
- return /** @type {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1763
- };
1764
-
1765
-
1766
- /**
1767
- * @param {!proto.kurrentdb.protocol.registry.v2.CompatibilityMode} value
1768
- * @return {!proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo} returns this
1769
- */
1770
- proto.kurrentdb.protocol.registry.v2.SchemaValidationInfo.prototype.setCompatibility = function(value) {
1771
- return jspb.Message.setProto3EnumField(this, 4, value);
1772
- };
1773
-
1774
-
1775
- /**
1776
- * @enum {number}
1777
- */
1778
- proto.kurrentdb.protocol.registry.v2.SchemaCompatibilityErrorKind = {
1779
- SCHEMA_COMPATIBILITY_ERROR_KIND_UNSPECIFIED: 0,
1780
- SCHEMA_COMPATIBILITY_ERROR_KIND_MISSING_REQUIRED_PROPERTY: 1,
1781
- SCHEMA_COMPATIBILITY_ERROR_KIND_INCOMPATIBLE_TYPE_CHANGE: 2,
1782
- SCHEMA_COMPATIBILITY_ERROR_KIND_OPTIONAL_TO_REQUIRED: 3,
1783
- SCHEMA_COMPATIBILITY_ERROR_KIND_NEW_REQUIRED_PROPERTY: 4,
1784
- SCHEMA_COMPATIBILITY_ERROR_KIND_REMOVED_PROPERTY: 5,
1785
- SCHEMA_COMPATIBILITY_ERROR_KIND_ARRAY_TYPE_INCOMPATIBILITY: 6,
1786
- SCHEMA_COMPATIBILITY_ERROR_KIND_DATA_FORMAT_MISMATCH: 7
1787
- };
1788
-
1789
- goog.object.extend(exports, proto.kurrentdb.protocol.registry.v2);