@marleena/trb-proto 1.0.53 → 1.0.55

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.
@@ -28,6 +28,8 @@ goog.object.extend(proto, strategy_spec_pb);
28
28
  var strategy_backtest_pb = require('../strategy/backtest_pb.js');
29
29
  goog.object.extend(proto, strategy_backtest_pb);
30
30
  goog.exportSymbol('proto.trb.strategy.v1.Choice', null, global);
31
+ goog.exportSymbol('proto.trb.strategy.v1.EvalResult', null, global);
32
+ goog.exportSymbol('proto.trb.strategy.v1.EvalTask', null, global);
31
33
  goog.exportSymbol('proto.trb.strategy.v1.FloatRange', null, global);
32
34
  goog.exportSymbol('proto.trb.strategy.v1.IntRange', null, global);
33
35
  goog.exportSymbol('proto.trb.strategy.v1.Objective', null, global);
@@ -187,6 +189,48 @@ if (goog.DEBUG && !COMPILED) {
187
189
  */
188
190
  proto.trb.strategy.v1.SearchBudget.displayName = 'proto.trb.strategy.v1.SearchBudget';
189
191
  }
192
+ /**
193
+ * Generated by JsPbCodeGenerator.
194
+ * @param {Array=} opt_data Optional initial data array, typically from a
195
+ * server response, or constructed directly in Javascript. The array is used
196
+ * in place and becomes part of the constructed object. It is not cloned.
197
+ * If no data is provided, the constructed object will be empty, but still
198
+ * valid.
199
+ * @extends {jspb.Message}
200
+ * @constructor
201
+ */
202
+ proto.trb.strategy.v1.EvalTask = function(opt_data) {
203
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
204
+ };
205
+ goog.inherits(proto.trb.strategy.v1.EvalTask, jspb.Message);
206
+ if (goog.DEBUG && !COMPILED) {
207
+ /**
208
+ * @public
209
+ * @override
210
+ */
211
+ proto.trb.strategy.v1.EvalTask.displayName = 'proto.trb.strategy.v1.EvalTask';
212
+ }
213
+ /**
214
+ * Generated by JsPbCodeGenerator.
215
+ * @param {Array=} opt_data Optional initial data array, typically from a
216
+ * server response, or constructed directly in Javascript. The array is used
217
+ * in place and becomes part of the constructed object. It is not cloned.
218
+ * If no data is provided, the constructed object will be empty, but still
219
+ * valid.
220
+ * @extends {jspb.Message}
221
+ * @constructor
222
+ */
223
+ proto.trb.strategy.v1.EvalResult = function(opt_data) {
224
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
225
+ };
226
+ goog.inherits(proto.trb.strategy.v1.EvalResult, jspb.Message);
227
+ if (goog.DEBUG && !COMPILED) {
228
+ /**
229
+ * @public
230
+ * @override
231
+ */
232
+ proto.trb.strategy.v1.EvalResult.displayName = 'proto.trb.strategy.v1.EvalResult';
233
+ }
190
234
  /**
191
235
  * Generated by JsPbCodeGenerator.
192
236
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1673,7 +1717,10 @@ maxSeconds: jspb.Message.getFieldWithDefault(msg, 2, 0),
1673
1717
  concurrency: jspb.Message.getFieldWithDefault(msg, 3, 0),
1674
1718
  population: jspb.Message.getFieldWithDefault(msg, 4, 0),
1675
1719
  generations: jspb.Message.getFieldWithDefault(msg, 5, 0),
1676
- seed: jspb.Message.getFieldWithDefault(msg, 6, 0)
1720
+ seed: jspb.Message.getFieldWithDefault(msg, 6, 0),
1721
+ halvingEta: jspb.Message.getFieldWithDefault(msg, 7, 0),
1722
+ lowFidelityFrac: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0),
1723
+ disableCache: jspb.Message.getBooleanFieldWithDefault(msg, 9, false)
1677
1724
  };
1678
1725
 
1679
1726
  if (includeInstance) {
@@ -1734,6 +1781,18 @@ proto.trb.strategy.v1.SearchBudget.deserializeBinaryFromReader = function(msg, r
1734
1781
  var value = /** @type {number} */ (reader.readUint64());
1735
1782
  msg.setSeed(value);
1736
1783
  break;
1784
+ case 7:
1785
+ var value = /** @type {number} */ (reader.readUint32());
1786
+ msg.setHalvingEta(value);
1787
+ break;
1788
+ case 8:
1789
+ var value = /** @type {number} */ (reader.readDouble());
1790
+ msg.setLowFidelityFrac(value);
1791
+ break;
1792
+ case 9:
1793
+ var value = /** @type {boolean} */ (reader.readBool());
1794
+ msg.setDisableCache(value);
1795
+ break;
1737
1796
  default:
1738
1797
  reader.skipField();
1739
1798
  break;
@@ -1805,6 +1864,27 @@ proto.trb.strategy.v1.SearchBudget.serializeBinaryToWriter = function(message, w
1805
1864
  f
1806
1865
  );
1807
1866
  }
1867
+ f = message.getHalvingEta();
1868
+ if (f !== 0) {
1869
+ writer.writeUint32(
1870
+ 7,
1871
+ f
1872
+ );
1873
+ }
1874
+ f = message.getLowFidelityFrac();
1875
+ if (f !== 0.0) {
1876
+ writer.writeDouble(
1877
+ 8,
1878
+ f
1879
+ );
1880
+ }
1881
+ f = message.getDisableCache();
1882
+ if (f) {
1883
+ writer.writeBool(
1884
+ 9,
1885
+ f
1886
+ );
1887
+ }
1808
1888
  };
1809
1889
 
1810
1890
 
@@ -1916,6 +1996,606 @@ proto.trb.strategy.v1.SearchBudget.prototype.setSeed = function(value) {
1916
1996
  };
1917
1997
 
1918
1998
 
1999
+ /**
2000
+ * optional uint32 halving_eta = 7;
2001
+ * @return {number}
2002
+ */
2003
+ proto.trb.strategy.v1.SearchBudget.prototype.getHalvingEta = function() {
2004
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
2005
+ };
2006
+
2007
+
2008
+ /**
2009
+ * @param {number} value
2010
+ * @return {!proto.trb.strategy.v1.SearchBudget} returns this
2011
+ */
2012
+ proto.trb.strategy.v1.SearchBudget.prototype.setHalvingEta = function(value) {
2013
+ return jspb.Message.setProto3IntField(this, 7, value);
2014
+ };
2015
+
2016
+
2017
+ /**
2018
+ * optional double low_fidelity_frac = 8;
2019
+ * @return {number}
2020
+ */
2021
+ proto.trb.strategy.v1.SearchBudget.prototype.getLowFidelityFrac = function() {
2022
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0));
2023
+ };
2024
+
2025
+
2026
+ /**
2027
+ * @param {number} value
2028
+ * @return {!proto.trb.strategy.v1.SearchBudget} returns this
2029
+ */
2030
+ proto.trb.strategy.v1.SearchBudget.prototype.setLowFidelityFrac = function(value) {
2031
+ return jspb.Message.setProto3FloatField(this, 8, value);
2032
+ };
2033
+
2034
+
2035
+ /**
2036
+ * optional bool disable_cache = 9;
2037
+ * @return {boolean}
2038
+ */
2039
+ proto.trb.strategy.v1.SearchBudget.prototype.getDisableCache = function() {
2040
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false));
2041
+ };
2042
+
2043
+
2044
+ /**
2045
+ * @param {boolean} value
2046
+ * @return {!proto.trb.strategy.v1.SearchBudget} returns this
2047
+ */
2048
+ proto.trb.strategy.v1.SearchBudget.prototype.setDisableCache = function(value) {
2049
+ return jspb.Message.setProto3BooleanField(this, 9, value);
2050
+ };
2051
+
2052
+
2053
+
2054
+
2055
+
2056
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2057
+ /**
2058
+ * Creates an object representation of this proto.
2059
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2060
+ * Optional fields that are not set will be set to undefined.
2061
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2062
+ * For the list of reserved names please see:
2063
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2064
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2065
+ * JSPB instance for transitional soy proto support:
2066
+ * http://goto/soy-param-migration
2067
+ * @return {!Object}
2068
+ */
2069
+ proto.trb.strategy.v1.EvalTask.prototype.toObject = function(opt_includeInstance) {
2070
+ return proto.trb.strategy.v1.EvalTask.toObject(opt_includeInstance, this);
2071
+ };
2072
+
2073
+
2074
+ /**
2075
+ * Static version of the {@see toObject} method.
2076
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2077
+ * the JSPB instance for transitional soy proto support:
2078
+ * http://goto/soy-param-migration
2079
+ * @param {!proto.trb.strategy.v1.EvalTask} msg The msg instance to transform.
2080
+ * @return {!Object}
2081
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2082
+ */
2083
+ proto.trb.strategy.v1.EvalTask.toObject = function(includeInstance, msg) {
2084
+ var f, obj = {
2085
+ evalId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2086
+ searchId: jspb.Message.getFieldWithDefault(msg, 2, ""),
2087
+ spec: (f = msg.getSpec()) && strategy_spec_pb.StrategySpec.toObject(includeInstance, f),
2088
+ config: (f = msg.getConfig()) && strategy_backtest_pb.BacktestConfig.toObject(includeInstance, f),
2089
+ dataFraction: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0),
2090
+ replySubject: jspb.Message.getFieldWithDefault(msg, 6, "")
2091
+ };
2092
+
2093
+ if (includeInstance) {
2094
+ obj.$jspbMessageInstance = msg;
2095
+ }
2096
+ return obj;
2097
+ };
2098
+ }
2099
+
2100
+
2101
+ /**
2102
+ * Deserializes binary data (in protobuf wire format).
2103
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2104
+ * @return {!proto.trb.strategy.v1.EvalTask}
2105
+ */
2106
+ proto.trb.strategy.v1.EvalTask.deserializeBinary = function(bytes) {
2107
+ var reader = new jspb.BinaryReader(bytes);
2108
+ var msg = new proto.trb.strategy.v1.EvalTask;
2109
+ return proto.trb.strategy.v1.EvalTask.deserializeBinaryFromReader(msg, reader);
2110
+ };
2111
+
2112
+
2113
+ /**
2114
+ * Deserializes binary data (in protobuf wire format) from the
2115
+ * given reader into the given message object.
2116
+ * @param {!proto.trb.strategy.v1.EvalTask} msg The message object to deserialize into.
2117
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2118
+ * @return {!proto.trb.strategy.v1.EvalTask}
2119
+ */
2120
+ proto.trb.strategy.v1.EvalTask.deserializeBinaryFromReader = function(msg, reader) {
2121
+ while (reader.nextField()) {
2122
+ if (reader.isEndGroup()) {
2123
+ break;
2124
+ }
2125
+ var field = reader.getFieldNumber();
2126
+ switch (field) {
2127
+ case 1:
2128
+ var value = /** @type {string} */ (reader.readString());
2129
+ msg.setEvalId(value);
2130
+ break;
2131
+ case 2:
2132
+ var value = /** @type {string} */ (reader.readString());
2133
+ msg.setSearchId(value);
2134
+ break;
2135
+ case 3:
2136
+ var value = new strategy_spec_pb.StrategySpec;
2137
+ reader.readMessage(value,strategy_spec_pb.StrategySpec.deserializeBinaryFromReader);
2138
+ msg.setSpec(value);
2139
+ break;
2140
+ case 4:
2141
+ var value = new strategy_backtest_pb.BacktestConfig;
2142
+ reader.readMessage(value,strategy_backtest_pb.BacktestConfig.deserializeBinaryFromReader);
2143
+ msg.setConfig(value);
2144
+ break;
2145
+ case 5:
2146
+ var value = /** @type {number} */ (reader.readDouble());
2147
+ msg.setDataFraction(value);
2148
+ break;
2149
+ case 6:
2150
+ var value = /** @type {string} */ (reader.readString());
2151
+ msg.setReplySubject(value);
2152
+ break;
2153
+ default:
2154
+ reader.skipField();
2155
+ break;
2156
+ }
2157
+ }
2158
+ return msg;
2159
+ };
2160
+
2161
+
2162
+ /**
2163
+ * Serializes the message to binary data (in protobuf wire format).
2164
+ * @return {!Uint8Array}
2165
+ */
2166
+ proto.trb.strategy.v1.EvalTask.prototype.serializeBinary = function() {
2167
+ var writer = new jspb.BinaryWriter();
2168
+ proto.trb.strategy.v1.EvalTask.serializeBinaryToWriter(this, writer);
2169
+ return writer.getResultBuffer();
2170
+ };
2171
+
2172
+
2173
+ /**
2174
+ * Serializes the given message to binary data (in protobuf wire
2175
+ * format), writing to the given BinaryWriter.
2176
+ * @param {!proto.trb.strategy.v1.EvalTask} message
2177
+ * @param {!jspb.BinaryWriter} writer
2178
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2179
+ */
2180
+ proto.trb.strategy.v1.EvalTask.serializeBinaryToWriter = function(message, writer) {
2181
+ var f = undefined;
2182
+ f = message.getEvalId();
2183
+ if (f.length > 0) {
2184
+ writer.writeString(
2185
+ 1,
2186
+ f
2187
+ );
2188
+ }
2189
+ f = message.getSearchId();
2190
+ if (f.length > 0) {
2191
+ writer.writeString(
2192
+ 2,
2193
+ f
2194
+ );
2195
+ }
2196
+ f = message.getSpec();
2197
+ if (f != null) {
2198
+ writer.writeMessage(
2199
+ 3,
2200
+ f,
2201
+ strategy_spec_pb.StrategySpec.serializeBinaryToWriter
2202
+ );
2203
+ }
2204
+ f = message.getConfig();
2205
+ if (f != null) {
2206
+ writer.writeMessage(
2207
+ 4,
2208
+ f,
2209
+ strategy_backtest_pb.BacktestConfig.serializeBinaryToWriter
2210
+ );
2211
+ }
2212
+ f = message.getDataFraction();
2213
+ if (f !== 0.0) {
2214
+ writer.writeDouble(
2215
+ 5,
2216
+ f
2217
+ );
2218
+ }
2219
+ f = message.getReplySubject();
2220
+ if (f.length > 0) {
2221
+ writer.writeString(
2222
+ 6,
2223
+ f
2224
+ );
2225
+ }
2226
+ };
2227
+
2228
+
2229
+ /**
2230
+ * optional string eval_id = 1;
2231
+ * @return {string}
2232
+ */
2233
+ proto.trb.strategy.v1.EvalTask.prototype.getEvalId = function() {
2234
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2235
+ };
2236
+
2237
+
2238
+ /**
2239
+ * @param {string} value
2240
+ * @return {!proto.trb.strategy.v1.EvalTask} returns this
2241
+ */
2242
+ proto.trb.strategy.v1.EvalTask.prototype.setEvalId = function(value) {
2243
+ return jspb.Message.setProto3StringField(this, 1, value);
2244
+ };
2245
+
2246
+
2247
+ /**
2248
+ * optional string search_id = 2;
2249
+ * @return {string}
2250
+ */
2251
+ proto.trb.strategy.v1.EvalTask.prototype.getSearchId = function() {
2252
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2253
+ };
2254
+
2255
+
2256
+ /**
2257
+ * @param {string} value
2258
+ * @return {!proto.trb.strategy.v1.EvalTask} returns this
2259
+ */
2260
+ proto.trb.strategy.v1.EvalTask.prototype.setSearchId = function(value) {
2261
+ return jspb.Message.setProto3StringField(this, 2, value);
2262
+ };
2263
+
2264
+
2265
+ /**
2266
+ * optional StrategySpec spec = 3;
2267
+ * @return {?proto.trb.strategy.v1.StrategySpec}
2268
+ */
2269
+ proto.trb.strategy.v1.EvalTask.prototype.getSpec = function() {
2270
+ return /** @type{?proto.trb.strategy.v1.StrategySpec} */ (
2271
+ jspb.Message.getWrapperField(this, strategy_spec_pb.StrategySpec, 3));
2272
+ };
2273
+
2274
+
2275
+ /**
2276
+ * @param {?proto.trb.strategy.v1.StrategySpec|undefined} value
2277
+ * @return {!proto.trb.strategy.v1.EvalTask} returns this
2278
+ */
2279
+ proto.trb.strategy.v1.EvalTask.prototype.setSpec = function(value) {
2280
+ return jspb.Message.setWrapperField(this, 3, value);
2281
+ };
2282
+
2283
+
2284
+ /**
2285
+ * Clears the message field making it undefined.
2286
+ * @return {!proto.trb.strategy.v1.EvalTask} returns this
2287
+ */
2288
+ proto.trb.strategy.v1.EvalTask.prototype.clearSpec = function() {
2289
+ return this.setSpec(undefined);
2290
+ };
2291
+
2292
+
2293
+ /**
2294
+ * Returns whether this field is set.
2295
+ * @return {boolean}
2296
+ */
2297
+ proto.trb.strategy.v1.EvalTask.prototype.hasSpec = function() {
2298
+ return jspb.Message.getField(this, 3) != null;
2299
+ };
2300
+
2301
+
2302
+ /**
2303
+ * optional BacktestConfig config = 4;
2304
+ * @return {?proto.trb.strategy.v1.BacktestConfig}
2305
+ */
2306
+ proto.trb.strategy.v1.EvalTask.prototype.getConfig = function() {
2307
+ return /** @type{?proto.trb.strategy.v1.BacktestConfig} */ (
2308
+ jspb.Message.getWrapperField(this, strategy_backtest_pb.BacktestConfig, 4));
2309
+ };
2310
+
2311
+
2312
+ /**
2313
+ * @param {?proto.trb.strategy.v1.BacktestConfig|undefined} value
2314
+ * @return {!proto.trb.strategy.v1.EvalTask} returns this
2315
+ */
2316
+ proto.trb.strategy.v1.EvalTask.prototype.setConfig = function(value) {
2317
+ return jspb.Message.setWrapperField(this, 4, value);
2318
+ };
2319
+
2320
+
2321
+ /**
2322
+ * Clears the message field making it undefined.
2323
+ * @return {!proto.trb.strategy.v1.EvalTask} returns this
2324
+ */
2325
+ proto.trb.strategy.v1.EvalTask.prototype.clearConfig = function() {
2326
+ return this.setConfig(undefined);
2327
+ };
2328
+
2329
+
2330
+ /**
2331
+ * Returns whether this field is set.
2332
+ * @return {boolean}
2333
+ */
2334
+ proto.trb.strategy.v1.EvalTask.prototype.hasConfig = function() {
2335
+ return jspb.Message.getField(this, 4) != null;
2336
+ };
2337
+
2338
+
2339
+ /**
2340
+ * optional double data_fraction = 5;
2341
+ * @return {number}
2342
+ */
2343
+ proto.trb.strategy.v1.EvalTask.prototype.getDataFraction = function() {
2344
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
2345
+ };
2346
+
2347
+
2348
+ /**
2349
+ * @param {number} value
2350
+ * @return {!proto.trb.strategy.v1.EvalTask} returns this
2351
+ */
2352
+ proto.trb.strategy.v1.EvalTask.prototype.setDataFraction = function(value) {
2353
+ return jspb.Message.setProto3FloatField(this, 5, value);
2354
+ };
2355
+
2356
+
2357
+ /**
2358
+ * optional string reply_subject = 6;
2359
+ * @return {string}
2360
+ */
2361
+ proto.trb.strategy.v1.EvalTask.prototype.getReplySubject = function() {
2362
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
2363
+ };
2364
+
2365
+
2366
+ /**
2367
+ * @param {string} value
2368
+ * @return {!proto.trb.strategy.v1.EvalTask} returns this
2369
+ */
2370
+ proto.trb.strategy.v1.EvalTask.prototype.setReplySubject = function(value) {
2371
+ return jspb.Message.setProto3StringField(this, 6, value);
2372
+ };
2373
+
2374
+
2375
+
2376
+
2377
+
2378
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2379
+ /**
2380
+ * Creates an object representation of this proto.
2381
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2382
+ * Optional fields that are not set will be set to undefined.
2383
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2384
+ * For the list of reserved names please see:
2385
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2386
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2387
+ * JSPB instance for transitional soy proto support:
2388
+ * http://goto/soy-param-migration
2389
+ * @return {!Object}
2390
+ */
2391
+ proto.trb.strategy.v1.EvalResult.prototype.toObject = function(opt_includeInstance) {
2392
+ return proto.trb.strategy.v1.EvalResult.toObject(opt_includeInstance, this);
2393
+ };
2394
+
2395
+
2396
+ /**
2397
+ * Static version of the {@see toObject} method.
2398
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2399
+ * the JSPB instance for transitional soy proto support:
2400
+ * http://goto/soy-param-migration
2401
+ * @param {!proto.trb.strategy.v1.EvalResult} msg The msg instance to transform.
2402
+ * @return {!Object}
2403
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2404
+ */
2405
+ proto.trb.strategy.v1.EvalResult.toObject = function(includeInstance, msg) {
2406
+ var f, obj = {
2407
+ evalId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2408
+ metricsMap: (f = msg.getMetricsMap()) ? f.toObject(includeInstance, undefined) : [],
2409
+ error: jspb.Message.getFieldWithDefault(msg, 3, ""),
2410
+ engineVersion: jspb.Message.getFieldWithDefault(msg, 4, "")
2411
+ };
2412
+
2413
+ if (includeInstance) {
2414
+ obj.$jspbMessageInstance = msg;
2415
+ }
2416
+ return obj;
2417
+ };
2418
+ }
2419
+
2420
+
2421
+ /**
2422
+ * Deserializes binary data (in protobuf wire format).
2423
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2424
+ * @return {!proto.trb.strategy.v1.EvalResult}
2425
+ */
2426
+ proto.trb.strategy.v1.EvalResult.deserializeBinary = function(bytes) {
2427
+ var reader = new jspb.BinaryReader(bytes);
2428
+ var msg = new proto.trb.strategy.v1.EvalResult;
2429
+ return proto.trb.strategy.v1.EvalResult.deserializeBinaryFromReader(msg, reader);
2430
+ };
2431
+
2432
+
2433
+ /**
2434
+ * Deserializes binary data (in protobuf wire format) from the
2435
+ * given reader into the given message object.
2436
+ * @param {!proto.trb.strategy.v1.EvalResult} msg The message object to deserialize into.
2437
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2438
+ * @return {!proto.trb.strategy.v1.EvalResult}
2439
+ */
2440
+ proto.trb.strategy.v1.EvalResult.deserializeBinaryFromReader = function(msg, reader) {
2441
+ while (reader.nextField()) {
2442
+ if (reader.isEndGroup()) {
2443
+ break;
2444
+ }
2445
+ var field = reader.getFieldNumber();
2446
+ switch (field) {
2447
+ case 1:
2448
+ var value = /** @type {string} */ (reader.readString());
2449
+ msg.setEvalId(value);
2450
+ break;
2451
+ case 2:
2452
+ var value = msg.getMetricsMap();
2453
+ reader.readMessage(value, function(message, reader) {
2454
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readDouble, null, "", 0.0);
2455
+ });
2456
+ break;
2457
+ case 3:
2458
+ var value = /** @type {string} */ (reader.readString());
2459
+ msg.setError(value);
2460
+ break;
2461
+ case 4:
2462
+ var value = /** @type {string} */ (reader.readString());
2463
+ msg.setEngineVersion(value);
2464
+ break;
2465
+ default:
2466
+ reader.skipField();
2467
+ break;
2468
+ }
2469
+ }
2470
+ return msg;
2471
+ };
2472
+
2473
+
2474
+ /**
2475
+ * Serializes the message to binary data (in protobuf wire format).
2476
+ * @return {!Uint8Array}
2477
+ */
2478
+ proto.trb.strategy.v1.EvalResult.prototype.serializeBinary = function() {
2479
+ var writer = new jspb.BinaryWriter();
2480
+ proto.trb.strategy.v1.EvalResult.serializeBinaryToWriter(this, writer);
2481
+ return writer.getResultBuffer();
2482
+ };
2483
+
2484
+
2485
+ /**
2486
+ * Serializes the given message to binary data (in protobuf wire
2487
+ * format), writing to the given BinaryWriter.
2488
+ * @param {!proto.trb.strategy.v1.EvalResult} message
2489
+ * @param {!jspb.BinaryWriter} writer
2490
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2491
+ */
2492
+ proto.trb.strategy.v1.EvalResult.serializeBinaryToWriter = function(message, writer) {
2493
+ var f = undefined;
2494
+ f = message.getEvalId();
2495
+ if (f.length > 0) {
2496
+ writer.writeString(
2497
+ 1,
2498
+ f
2499
+ );
2500
+ }
2501
+ f = message.getMetricsMap(true);
2502
+ if (f && f.getLength() > 0) {
2503
+ f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeDouble);
2504
+ }
2505
+ f = message.getError();
2506
+ if (f.length > 0) {
2507
+ writer.writeString(
2508
+ 3,
2509
+ f
2510
+ );
2511
+ }
2512
+ f = message.getEngineVersion();
2513
+ if (f.length > 0) {
2514
+ writer.writeString(
2515
+ 4,
2516
+ f
2517
+ );
2518
+ }
2519
+ };
2520
+
2521
+
2522
+ /**
2523
+ * optional string eval_id = 1;
2524
+ * @return {string}
2525
+ */
2526
+ proto.trb.strategy.v1.EvalResult.prototype.getEvalId = function() {
2527
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2528
+ };
2529
+
2530
+
2531
+ /**
2532
+ * @param {string} value
2533
+ * @return {!proto.trb.strategy.v1.EvalResult} returns this
2534
+ */
2535
+ proto.trb.strategy.v1.EvalResult.prototype.setEvalId = function(value) {
2536
+ return jspb.Message.setProto3StringField(this, 1, value);
2537
+ };
2538
+
2539
+
2540
+ /**
2541
+ * map<string, double> metrics = 2;
2542
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
2543
+ * empty, instead returning `undefined`
2544
+ * @return {!jspb.Map<string,number>}
2545
+ */
2546
+ proto.trb.strategy.v1.EvalResult.prototype.getMetricsMap = function(opt_noLazyCreate) {
2547
+ return /** @type {!jspb.Map<string,number>} */ (
2548
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
2549
+ null));
2550
+ };
2551
+
2552
+
2553
+ /**
2554
+ * Clears values from the map. The map will be non-null.
2555
+ * @return {!proto.trb.strategy.v1.EvalResult} returns this
2556
+ */
2557
+ proto.trb.strategy.v1.EvalResult.prototype.clearMetricsMap = function() {
2558
+ this.getMetricsMap().clear();
2559
+ return this;
2560
+ };
2561
+
2562
+
2563
+ /**
2564
+ * optional string error = 3;
2565
+ * @return {string}
2566
+ */
2567
+ proto.trb.strategy.v1.EvalResult.prototype.getError = function() {
2568
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2569
+ };
2570
+
2571
+
2572
+ /**
2573
+ * @param {string} value
2574
+ * @return {!proto.trb.strategy.v1.EvalResult} returns this
2575
+ */
2576
+ proto.trb.strategy.v1.EvalResult.prototype.setError = function(value) {
2577
+ return jspb.Message.setProto3StringField(this, 3, value);
2578
+ };
2579
+
2580
+
2581
+ /**
2582
+ * optional string engine_version = 4;
2583
+ * @return {string}
2584
+ */
2585
+ proto.trb.strategy.v1.EvalResult.prototype.getEngineVersion = function() {
2586
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2587
+ };
2588
+
2589
+
2590
+ /**
2591
+ * @param {string} value
2592
+ * @return {!proto.trb.strategy.v1.EvalResult} returns this
2593
+ */
2594
+ proto.trb.strategy.v1.EvalResult.prototype.setEngineVersion = function(value) {
2595
+ return jspb.Message.setProto3StringField(this, 4, value);
2596
+ };
2597
+
2598
+
1919
2599
 
1920
2600
 
1921
2601