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