@marleena/trb-proto 1.0.56 → 1.0.57

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.
@@ -23,6 +23,8 @@ var global =
23
23
 
24
24
  var google_api_annotations_pb = require('../google/api/annotations_pb.js');
25
25
  goog.object.extend(proto, google_api_annotations_pb);
26
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
27
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
26
28
  var strategysearch_spec_pb = require('../strategysearch/spec_pb.js');
27
29
  goog.object.extend(proto, strategysearch_spec_pb);
28
30
  var strategysearch_backtest_pb = require('../strategysearch/backtest_pb.js');
@@ -30,11 +32,17 @@ goog.object.extend(proto, strategysearch_backtest_pb);
30
32
  var strategysearch_search_pb = require('../strategysearch/search_pb.js');
31
33
  goog.object.extend(proto, strategysearch_search_pb);
32
34
  goog.exportSymbol('proto.trb.strategysearch.v1.CancelSearchRequest', null, global);
35
+ goog.exportSymbol('proto.trb.strategysearch.v1.CreateSearchPresetRequest', null, global);
36
+ goog.exportSymbol('proto.trb.strategysearch.v1.DeleteSearchPresetRequest', null, global);
37
+ goog.exportSymbol('proto.trb.strategysearch.v1.DeleteSearchPresetResponse', null, global);
33
38
  goog.exportSymbol('proto.trb.strategysearch.v1.GetBestTrialsRequest', null, global);
34
39
  goog.exportSymbol('proto.trb.strategysearch.v1.GetBestTrialsResponse', null, global);
35
40
  goog.exportSymbol('proto.trb.strategysearch.v1.GetSearchProgressRequest', null, global);
41
+ goog.exportSymbol('proto.trb.strategysearch.v1.ListSearchPresetsRequest', null, global);
42
+ goog.exportSymbol('proto.trb.strategysearch.v1.ListSearchPresetsResponse', null, global);
36
43
  goog.exportSymbol('proto.trb.strategysearch.v1.ListSearchesRequest', null, global);
37
44
  goog.exportSymbol('proto.trb.strategysearch.v1.ListSearchesResponse', null, global);
45
+ goog.exportSymbol('proto.trb.strategysearch.v1.SearchPreset', null, global);
38
46
  goog.exportSymbol('proto.trb.strategysearch.v1.SubmitSearchRequest', null, global);
39
47
  goog.exportSymbol('proto.trb.strategysearch.v1.SubmitSearchResponse', null, global);
40
48
  /**
@@ -205,6 +213,132 @@ if (goog.DEBUG && !COMPILED) {
205
213
  */
206
214
  proto.trb.strategysearch.v1.CancelSearchRequest.displayName = 'proto.trb.strategysearch.v1.CancelSearchRequest';
207
215
  }
216
+ /**
217
+ * Generated by JsPbCodeGenerator.
218
+ * @param {Array=} opt_data Optional initial data array, typically from a
219
+ * server response, or constructed directly in Javascript. The array is used
220
+ * in place and becomes part of the constructed object. It is not cloned.
221
+ * If no data is provided, the constructed object will be empty, but still
222
+ * valid.
223
+ * @extends {jspb.Message}
224
+ * @constructor
225
+ */
226
+ proto.trb.strategysearch.v1.SearchPreset = function(opt_data) {
227
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.strategysearch.v1.SearchPreset.repeatedFields_, null);
228
+ };
229
+ goog.inherits(proto.trb.strategysearch.v1.SearchPreset, jspb.Message);
230
+ if (goog.DEBUG && !COMPILED) {
231
+ /**
232
+ * @public
233
+ * @override
234
+ */
235
+ proto.trb.strategysearch.v1.SearchPreset.displayName = 'proto.trb.strategysearch.v1.SearchPreset';
236
+ }
237
+ /**
238
+ * Generated by JsPbCodeGenerator.
239
+ * @param {Array=} opt_data Optional initial data array, typically from a
240
+ * server response, or constructed directly in Javascript. The array is used
241
+ * in place and becomes part of the constructed object. It is not cloned.
242
+ * If no data is provided, the constructed object will be empty, but still
243
+ * valid.
244
+ * @extends {jspb.Message}
245
+ * @constructor
246
+ */
247
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest = function(opt_data) {
248
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.strategysearch.v1.CreateSearchPresetRequest.repeatedFields_, null);
249
+ };
250
+ goog.inherits(proto.trb.strategysearch.v1.CreateSearchPresetRequest, jspb.Message);
251
+ if (goog.DEBUG && !COMPILED) {
252
+ /**
253
+ * @public
254
+ * @override
255
+ */
256
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.displayName = 'proto.trb.strategysearch.v1.CreateSearchPresetRequest';
257
+ }
258
+ /**
259
+ * Generated by JsPbCodeGenerator.
260
+ * @param {Array=} opt_data Optional initial data array, typically from a
261
+ * server response, or constructed directly in Javascript. The array is used
262
+ * in place and becomes part of the constructed object. It is not cloned.
263
+ * If no data is provided, the constructed object will be empty, but still
264
+ * valid.
265
+ * @extends {jspb.Message}
266
+ * @constructor
267
+ */
268
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest = function(opt_data) {
269
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
270
+ };
271
+ goog.inherits(proto.trb.strategysearch.v1.ListSearchPresetsRequest, jspb.Message);
272
+ if (goog.DEBUG && !COMPILED) {
273
+ /**
274
+ * @public
275
+ * @override
276
+ */
277
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.displayName = 'proto.trb.strategysearch.v1.ListSearchPresetsRequest';
278
+ }
279
+ /**
280
+ * Generated by JsPbCodeGenerator.
281
+ * @param {Array=} opt_data Optional initial data array, typically from a
282
+ * server response, or constructed directly in Javascript. The array is used
283
+ * in place and becomes part of the constructed object. It is not cloned.
284
+ * If no data is provided, the constructed object will be empty, but still
285
+ * valid.
286
+ * @extends {jspb.Message}
287
+ * @constructor
288
+ */
289
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse = function(opt_data) {
290
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.strategysearch.v1.ListSearchPresetsResponse.repeatedFields_, null);
291
+ };
292
+ goog.inherits(proto.trb.strategysearch.v1.ListSearchPresetsResponse, jspb.Message);
293
+ if (goog.DEBUG && !COMPILED) {
294
+ /**
295
+ * @public
296
+ * @override
297
+ */
298
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.displayName = 'proto.trb.strategysearch.v1.ListSearchPresetsResponse';
299
+ }
300
+ /**
301
+ * Generated by JsPbCodeGenerator.
302
+ * @param {Array=} opt_data Optional initial data array, typically from a
303
+ * server response, or constructed directly in Javascript. The array is used
304
+ * in place and becomes part of the constructed object. It is not cloned.
305
+ * If no data is provided, the constructed object will be empty, but still
306
+ * valid.
307
+ * @extends {jspb.Message}
308
+ * @constructor
309
+ */
310
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest = function(opt_data) {
311
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
312
+ };
313
+ goog.inherits(proto.trb.strategysearch.v1.DeleteSearchPresetRequest, jspb.Message);
314
+ if (goog.DEBUG && !COMPILED) {
315
+ /**
316
+ * @public
317
+ * @override
318
+ */
319
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest.displayName = 'proto.trb.strategysearch.v1.DeleteSearchPresetRequest';
320
+ }
321
+ /**
322
+ * Generated by JsPbCodeGenerator.
323
+ * @param {Array=} opt_data Optional initial data array, typically from a
324
+ * server response, or constructed directly in Javascript. The array is used
325
+ * in place and becomes part of the constructed object. It is not cloned.
326
+ * If no data is provided, the constructed object will be empty, but still
327
+ * valid.
328
+ * @extends {jspb.Message}
329
+ * @constructor
330
+ */
331
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse = function(opt_data) {
332
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
333
+ };
334
+ goog.inherits(proto.trb.strategysearch.v1.DeleteSearchPresetResponse, jspb.Message);
335
+ if (goog.DEBUG && !COMPILED) {
336
+ /**
337
+ * @public
338
+ * @override
339
+ */
340
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse.displayName = 'proto.trb.strategysearch.v1.DeleteSearchPresetResponse';
341
+ }
208
342
 
209
343
  /**
210
344
  * List of repeated fields within this message type.
@@ -1668,4 +1802,1381 @@ proto.trb.strategysearch.v1.CancelSearchRequest.prototype.setSearchId = function
1668
1802
  };
1669
1803
 
1670
1804
 
1805
+
1806
+ /**
1807
+ * List of repeated fields within this message type.
1808
+ * @private {!Array<number>}
1809
+ * @const
1810
+ */
1811
+ proto.trb.strategysearch.v1.SearchPreset.repeatedFields_ = [4];
1812
+
1813
+
1814
+
1815
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1816
+ /**
1817
+ * Creates an object representation of this proto.
1818
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1819
+ * Optional fields that are not set will be set to undefined.
1820
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1821
+ * For the list of reserved names please see:
1822
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1823
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1824
+ * JSPB instance for transitional soy proto support:
1825
+ * http://goto/soy-param-migration
1826
+ * @return {!Object}
1827
+ */
1828
+ proto.trb.strategysearch.v1.SearchPreset.prototype.toObject = function(opt_includeInstance) {
1829
+ return proto.trb.strategysearch.v1.SearchPreset.toObject(opt_includeInstance, this);
1830
+ };
1831
+
1832
+
1833
+ /**
1834
+ * Static version of the {@see toObject} method.
1835
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1836
+ * the JSPB instance for transitional soy proto support:
1837
+ * http://goto/soy-param-migration
1838
+ * @param {!proto.trb.strategysearch.v1.SearchPreset} msg The msg instance to transform.
1839
+ * @return {!Object}
1840
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1841
+ */
1842
+ proto.trb.strategysearch.v1.SearchPreset.toObject = function(includeInstance, msg) {
1843
+ var f, obj = {
1844
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
1845
+ name: jspb.Message.getFieldWithDefault(msg, 2, ""),
1846
+ baseSpec: (f = msg.getBaseSpec()) && strategysearch_spec_pb.StrategySearchSpec.toObject(includeInstance, f),
1847
+ searchSpaceList: jspb.Message.toObjectList(msg.getSearchSpaceList(),
1848
+ strategysearch_search_pb.ParamRange.toObject, includeInstance),
1849
+ study: (f = msg.getStudy()) && strategysearch_search_pb.StudyConfig.toObject(includeInstance, f),
1850
+ config: (f = msg.getConfig()) && strategysearch_backtest_pb.BacktestConfig.toObject(includeInstance, f),
1851
+ createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1852
+ };
1853
+
1854
+ if (includeInstance) {
1855
+ obj.$jspbMessageInstance = msg;
1856
+ }
1857
+ return obj;
1858
+ };
1859
+ }
1860
+
1861
+
1862
+ /**
1863
+ * Deserializes binary data (in protobuf wire format).
1864
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1865
+ * @return {!proto.trb.strategysearch.v1.SearchPreset}
1866
+ */
1867
+ proto.trb.strategysearch.v1.SearchPreset.deserializeBinary = function(bytes) {
1868
+ var reader = new jspb.BinaryReader(bytes);
1869
+ var msg = new proto.trb.strategysearch.v1.SearchPreset;
1870
+ return proto.trb.strategysearch.v1.SearchPreset.deserializeBinaryFromReader(msg, reader);
1871
+ };
1872
+
1873
+
1874
+ /**
1875
+ * Deserializes binary data (in protobuf wire format) from the
1876
+ * given reader into the given message object.
1877
+ * @param {!proto.trb.strategysearch.v1.SearchPreset} msg The message object to deserialize into.
1878
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1879
+ * @return {!proto.trb.strategysearch.v1.SearchPreset}
1880
+ */
1881
+ proto.trb.strategysearch.v1.SearchPreset.deserializeBinaryFromReader = function(msg, reader) {
1882
+ while (reader.nextField()) {
1883
+ if (reader.isEndGroup()) {
1884
+ break;
1885
+ }
1886
+ var field = reader.getFieldNumber();
1887
+ switch (field) {
1888
+ case 1:
1889
+ var value = /** @type {string} */ (reader.readString());
1890
+ msg.setId(value);
1891
+ break;
1892
+ case 2:
1893
+ var value = /** @type {string} */ (reader.readString());
1894
+ msg.setName(value);
1895
+ break;
1896
+ case 3:
1897
+ var value = new strategysearch_spec_pb.StrategySearchSpec;
1898
+ reader.readMessage(value,strategysearch_spec_pb.StrategySearchSpec.deserializeBinaryFromReader);
1899
+ msg.setBaseSpec(value);
1900
+ break;
1901
+ case 4:
1902
+ var value = new strategysearch_search_pb.ParamRange;
1903
+ reader.readMessage(value,strategysearch_search_pb.ParamRange.deserializeBinaryFromReader);
1904
+ msg.addSearchSpace(value);
1905
+ break;
1906
+ case 5:
1907
+ var value = new strategysearch_search_pb.StudyConfig;
1908
+ reader.readMessage(value,strategysearch_search_pb.StudyConfig.deserializeBinaryFromReader);
1909
+ msg.setStudy(value);
1910
+ break;
1911
+ case 6:
1912
+ var value = new strategysearch_backtest_pb.BacktestConfig;
1913
+ reader.readMessage(value,strategysearch_backtest_pb.BacktestConfig.deserializeBinaryFromReader);
1914
+ msg.setConfig(value);
1915
+ break;
1916
+ case 7:
1917
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1918
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1919
+ msg.setCreatedAt(value);
1920
+ break;
1921
+ default:
1922
+ reader.skipField();
1923
+ break;
1924
+ }
1925
+ }
1926
+ return msg;
1927
+ };
1928
+
1929
+
1930
+ /**
1931
+ * Serializes the message to binary data (in protobuf wire format).
1932
+ * @return {!Uint8Array}
1933
+ */
1934
+ proto.trb.strategysearch.v1.SearchPreset.prototype.serializeBinary = function() {
1935
+ var writer = new jspb.BinaryWriter();
1936
+ proto.trb.strategysearch.v1.SearchPreset.serializeBinaryToWriter(this, writer);
1937
+ return writer.getResultBuffer();
1938
+ };
1939
+
1940
+
1941
+ /**
1942
+ * Serializes the given message to binary data (in protobuf wire
1943
+ * format), writing to the given BinaryWriter.
1944
+ * @param {!proto.trb.strategysearch.v1.SearchPreset} message
1945
+ * @param {!jspb.BinaryWriter} writer
1946
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1947
+ */
1948
+ proto.trb.strategysearch.v1.SearchPreset.serializeBinaryToWriter = function(message, writer) {
1949
+ var f = undefined;
1950
+ f = message.getId();
1951
+ if (f.length > 0) {
1952
+ writer.writeString(
1953
+ 1,
1954
+ f
1955
+ );
1956
+ }
1957
+ f = message.getName();
1958
+ if (f.length > 0) {
1959
+ writer.writeString(
1960
+ 2,
1961
+ f
1962
+ );
1963
+ }
1964
+ f = message.getBaseSpec();
1965
+ if (f != null) {
1966
+ writer.writeMessage(
1967
+ 3,
1968
+ f,
1969
+ strategysearch_spec_pb.StrategySearchSpec.serializeBinaryToWriter
1970
+ );
1971
+ }
1972
+ f = message.getSearchSpaceList();
1973
+ if (f.length > 0) {
1974
+ writer.writeRepeatedMessage(
1975
+ 4,
1976
+ f,
1977
+ strategysearch_search_pb.ParamRange.serializeBinaryToWriter
1978
+ );
1979
+ }
1980
+ f = message.getStudy();
1981
+ if (f != null) {
1982
+ writer.writeMessage(
1983
+ 5,
1984
+ f,
1985
+ strategysearch_search_pb.StudyConfig.serializeBinaryToWriter
1986
+ );
1987
+ }
1988
+ f = message.getConfig();
1989
+ if (f != null) {
1990
+ writer.writeMessage(
1991
+ 6,
1992
+ f,
1993
+ strategysearch_backtest_pb.BacktestConfig.serializeBinaryToWriter
1994
+ );
1995
+ }
1996
+ f = message.getCreatedAt();
1997
+ if (f != null) {
1998
+ writer.writeMessage(
1999
+ 7,
2000
+ f,
2001
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2002
+ );
2003
+ }
2004
+ };
2005
+
2006
+
2007
+ /**
2008
+ * optional string id = 1;
2009
+ * @return {string}
2010
+ */
2011
+ proto.trb.strategysearch.v1.SearchPreset.prototype.getId = function() {
2012
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2013
+ };
2014
+
2015
+
2016
+ /**
2017
+ * @param {string} value
2018
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2019
+ */
2020
+ proto.trb.strategysearch.v1.SearchPreset.prototype.setId = function(value) {
2021
+ return jspb.Message.setProto3StringField(this, 1, value);
2022
+ };
2023
+
2024
+
2025
+ /**
2026
+ * optional string name = 2;
2027
+ * @return {string}
2028
+ */
2029
+ proto.trb.strategysearch.v1.SearchPreset.prototype.getName = function() {
2030
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2031
+ };
2032
+
2033
+
2034
+ /**
2035
+ * @param {string} value
2036
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2037
+ */
2038
+ proto.trb.strategysearch.v1.SearchPreset.prototype.setName = function(value) {
2039
+ return jspb.Message.setProto3StringField(this, 2, value);
2040
+ };
2041
+
2042
+
2043
+ /**
2044
+ * optional StrategySearchSpec base_spec = 3;
2045
+ * @return {?proto.trb.strategysearch.v1.StrategySearchSpec}
2046
+ */
2047
+ proto.trb.strategysearch.v1.SearchPreset.prototype.getBaseSpec = function() {
2048
+ return /** @type{?proto.trb.strategysearch.v1.StrategySearchSpec} */ (
2049
+ jspb.Message.getWrapperField(this, strategysearch_spec_pb.StrategySearchSpec, 3));
2050
+ };
2051
+
2052
+
2053
+ /**
2054
+ * @param {?proto.trb.strategysearch.v1.StrategySearchSpec|undefined} value
2055
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2056
+ */
2057
+ proto.trb.strategysearch.v1.SearchPreset.prototype.setBaseSpec = function(value) {
2058
+ return jspb.Message.setWrapperField(this, 3, value);
2059
+ };
2060
+
2061
+
2062
+ /**
2063
+ * Clears the message field making it undefined.
2064
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2065
+ */
2066
+ proto.trb.strategysearch.v1.SearchPreset.prototype.clearBaseSpec = function() {
2067
+ return this.setBaseSpec(undefined);
2068
+ };
2069
+
2070
+
2071
+ /**
2072
+ * Returns whether this field is set.
2073
+ * @return {boolean}
2074
+ */
2075
+ proto.trb.strategysearch.v1.SearchPreset.prototype.hasBaseSpec = function() {
2076
+ return jspb.Message.getField(this, 3) != null;
2077
+ };
2078
+
2079
+
2080
+ /**
2081
+ * repeated ParamRange search_space = 4;
2082
+ * @return {!Array<!proto.trb.strategysearch.v1.ParamRange>}
2083
+ */
2084
+ proto.trb.strategysearch.v1.SearchPreset.prototype.getSearchSpaceList = function() {
2085
+ return /** @type{!Array<!proto.trb.strategysearch.v1.ParamRange>} */ (
2086
+ jspb.Message.getRepeatedWrapperField(this, strategysearch_search_pb.ParamRange, 4));
2087
+ };
2088
+
2089
+
2090
+ /**
2091
+ * @param {!Array<!proto.trb.strategysearch.v1.ParamRange>} value
2092
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2093
+ */
2094
+ proto.trb.strategysearch.v1.SearchPreset.prototype.setSearchSpaceList = function(value) {
2095
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
2096
+ };
2097
+
2098
+
2099
+ /**
2100
+ * @param {!proto.trb.strategysearch.v1.ParamRange=} opt_value
2101
+ * @param {number=} opt_index
2102
+ * @return {!proto.trb.strategysearch.v1.ParamRange}
2103
+ */
2104
+ proto.trb.strategysearch.v1.SearchPreset.prototype.addSearchSpace = function(opt_value, opt_index) {
2105
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.trb.strategysearch.v1.ParamRange, opt_index);
2106
+ };
2107
+
2108
+
2109
+ /**
2110
+ * Clears the list making it empty but non-null.
2111
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2112
+ */
2113
+ proto.trb.strategysearch.v1.SearchPreset.prototype.clearSearchSpaceList = function() {
2114
+ return this.setSearchSpaceList([]);
2115
+ };
2116
+
2117
+
2118
+ /**
2119
+ * optional StudyConfig study = 5;
2120
+ * @return {?proto.trb.strategysearch.v1.StudyConfig}
2121
+ */
2122
+ proto.trb.strategysearch.v1.SearchPreset.prototype.getStudy = function() {
2123
+ return /** @type{?proto.trb.strategysearch.v1.StudyConfig} */ (
2124
+ jspb.Message.getWrapperField(this, strategysearch_search_pb.StudyConfig, 5));
2125
+ };
2126
+
2127
+
2128
+ /**
2129
+ * @param {?proto.trb.strategysearch.v1.StudyConfig|undefined} value
2130
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2131
+ */
2132
+ proto.trb.strategysearch.v1.SearchPreset.prototype.setStudy = function(value) {
2133
+ return jspb.Message.setWrapperField(this, 5, value);
2134
+ };
2135
+
2136
+
2137
+ /**
2138
+ * Clears the message field making it undefined.
2139
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2140
+ */
2141
+ proto.trb.strategysearch.v1.SearchPreset.prototype.clearStudy = function() {
2142
+ return this.setStudy(undefined);
2143
+ };
2144
+
2145
+
2146
+ /**
2147
+ * Returns whether this field is set.
2148
+ * @return {boolean}
2149
+ */
2150
+ proto.trb.strategysearch.v1.SearchPreset.prototype.hasStudy = function() {
2151
+ return jspb.Message.getField(this, 5) != null;
2152
+ };
2153
+
2154
+
2155
+ /**
2156
+ * optional BacktestConfig config = 6;
2157
+ * @return {?proto.trb.strategysearch.v1.BacktestConfig}
2158
+ */
2159
+ proto.trb.strategysearch.v1.SearchPreset.prototype.getConfig = function() {
2160
+ return /** @type{?proto.trb.strategysearch.v1.BacktestConfig} */ (
2161
+ jspb.Message.getWrapperField(this, strategysearch_backtest_pb.BacktestConfig, 6));
2162
+ };
2163
+
2164
+
2165
+ /**
2166
+ * @param {?proto.trb.strategysearch.v1.BacktestConfig|undefined} value
2167
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2168
+ */
2169
+ proto.trb.strategysearch.v1.SearchPreset.prototype.setConfig = function(value) {
2170
+ return jspb.Message.setWrapperField(this, 6, value);
2171
+ };
2172
+
2173
+
2174
+ /**
2175
+ * Clears the message field making it undefined.
2176
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2177
+ */
2178
+ proto.trb.strategysearch.v1.SearchPreset.prototype.clearConfig = function() {
2179
+ return this.setConfig(undefined);
2180
+ };
2181
+
2182
+
2183
+ /**
2184
+ * Returns whether this field is set.
2185
+ * @return {boolean}
2186
+ */
2187
+ proto.trb.strategysearch.v1.SearchPreset.prototype.hasConfig = function() {
2188
+ return jspb.Message.getField(this, 6) != null;
2189
+ };
2190
+
2191
+
2192
+ /**
2193
+ * optional google.protobuf.Timestamp created_at = 7;
2194
+ * @return {?proto.google.protobuf.Timestamp}
2195
+ */
2196
+ proto.trb.strategysearch.v1.SearchPreset.prototype.getCreatedAt = function() {
2197
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
2198
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
2199
+ };
2200
+
2201
+
2202
+ /**
2203
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
2204
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2205
+ */
2206
+ proto.trb.strategysearch.v1.SearchPreset.prototype.setCreatedAt = function(value) {
2207
+ return jspb.Message.setWrapperField(this, 7, value);
2208
+ };
2209
+
2210
+
2211
+ /**
2212
+ * Clears the message field making it undefined.
2213
+ * @return {!proto.trb.strategysearch.v1.SearchPreset} returns this
2214
+ */
2215
+ proto.trb.strategysearch.v1.SearchPreset.prototype.clearCreatedAt = function() {
2216
+ return this.setCreatedAt(undefined);
2217
+ };
2218
+
2219
+
2220
+ /**
2221
+ * Returns whether this field is set.
2222
+ * @return {boolean}
2223
+ */
2224
+ proto.trb.strategysearch.v1.SearchPreset.prototype.hasCreatedAt = function() {
2225
+ return jspb.Message.getField(this, 7) != null;
2226
+ };
2227
+
2228
+
2229
+
2230
+ /**
2231
+ * List of repeated fields within this message type.
2232
+ * @private {!Array<number>}
2233
+ * @const
2234
+ */
2235
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.repeatedFields_ = [3];
2236
+
2237
+
2238
+
2239
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2240
+ /**
2241
+ * Creates an object representation of this proto.
2242
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2243
+ * Optional fields that are not set will be set to undefined.
2244
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2245
+ * For the list of reserved names please see:
2246
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2247
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2248
+ * JSPB instance for transitional soy proto support:
2249
+ * http://goto/soy-param-migration
2250
+ * @return {!Object}
2251
+ */
2252
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.toObject = function(opt_includeInstance) {
2253
+ return proto.trb.strategysearch.v1.CreateSearchPresetRequest.toObject(opt_includeInstance, this);
2254
+ };
2255
+
2256
+
2257
+ /**
2258
+ * Static version of the {@see toObject} method.
2259
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2260
+ * the JSPB instance for transitional soy proto support:
2261
+ * http://goto/soy-param-migration
2262
+ * @param {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} msg The msg instance to transform.
2263
+ * @return {!Object}
2264
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2265
+ */
2266
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.toObject = function(includeInstance, msg) {
2267
+ var f, obj = {
2268
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
2269
+ baseSpec: (f = msg.getBaseSpec()) && strategysearch_spec_pb.StrategySearchSpec.toObject(includeInstance, f),
2270
+ searchSpaceList: jspb.Message.toObjectList(msg.getSearchSpaceList(),
2271
+ strategysearch_search_pb.ParamRange.toObject, includeInstance),
2272
+ study: (f = msg.getStudy()) && strategysearch_search_pb.StudyConfig.toObject(includeInstance, f),
2273
+ config: (f = msg.getConfig()) && strategysearch_backtest_pb.BacktestConfig.toObject(includeInstance, f)
2274
+ };
2275
+
2276
+ if (includeInstance) {
2277
+ obj.$jspbMessageInstance = msg;
2278
+ }
2279
+ return obj;
2280
+ };
2281
+ }
2282
+
2283
+
2284
+ /**
2285
+ * Deserializes binary data (in protobuf wire format).
2286
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2287
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest}
2288
+ */
2289
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.deserializeBinary = function(bytes) {
2290
+ var reader = new jspb.BinaryReader(bytes);
2291
+ var msg = new proto.trb.strategysearch.v1.CreateSearchPresetRequest;
2292
+ return proto.trb.strategysearch.v1.CreateSearchPresetRequest.deserializeBinaryFromReader(msg, reader);
2293
+ };
2294
+
2295
+
2296
+ /**
2297
+ * Deserializes binary data (in protobuf wire format) from the
2298
+ * given reader into the given message object.
2299
+ * @param {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} msg The message object to deserialize into.
2300
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2301
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest}
2302
+ */
2303
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.deserializeBinaryFromReader = function(msg, reader) {
2304
+ while (reader.nextField()) {
2305
+ if (reader.isEndGroup()) {
2306
+ break;
2307
+ }
2308
+ var field = reader.getFieldNumber();
2309
+ switch (field) {
2310
+ case 1:
2311
+ var value = /** @type {string} */ (reader.readString());
2312
+ msg.setName(value);
2313
+ break;
2314
+ case 2:
2315
+ var value = new strategysearch_spec_pb.StrategySearchSpec;
2316
+ reader.readMessage(value,strategysearch_spec_pb.StrategySearchSpec.deserializeBinaryFromReader);
2317
+ msg.setBaseSpec(value);
2318
+ break;
2319
+ case 3:
2320
+ var value = new strategysearch_search_pb.ParamRange;
2321
+ reader.readMessage(value,strategysearch_search_pb.ParamRange.deserializeBinaryFromReader);
2322
+ msg.addSearchSpace(value);
2323
+ break;
2324
+ case 4:
2325
+ var value = new strategysearch_search_pb.StudyConfig;
2326
+ reader.readMessage(value,strategysearch_search_pb.StudyConfig.deserializeBinaryFromReader);
2327
+ msg.setStudy(value);
2328
+ break;
2329
+ case 5:
2330
+ var value = new strategysearch_backtest_pb.BacktestConfig;
2331
+ reader.readMessage(value,strategysearch_backtest_pb.BacktestConfig.deserializeBinaryFromReader);
2332
+ msg.setConfig(value);
2333
+ break;
2334
+ default:
2335
+ reader.skipField();
2336
+ break;
2337
+ }
2338
+ }
2339
+ return msg;
2340
+ };
2341
+
2342
+
2343
+ /**
2344
+ * Serializes the message to binary data (in protobuf wire format).
2345
+ * @return {!Uint8Array}
2346
+ */
2347
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.serializeBinary = function() {
2348
+ var writer = new jspb.BinaryWriter();
2349
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.serializeBinaryToWriter(this, writer);
2350
+ return writer.getResultBuffer();
2351
+ };
2352
+
2353
+
2354
+ /**
2355
+ * Serializes the given message to binary data (in protobuf wire
2356
+ * format), writing to the given BinaryWriter.
2357
+ * @param {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} message
2358
+ * @param {!jspb.BinaryWriter} writer
2359
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2360
+ */
2361
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.serializeBinaryToWriter = function(message, writer) {
2362
+ var f = undefined;
2363
+ f = message.getName();
2364
+ if (f.length > 0) {
2365
+ writer.writeString(
2366
+ 1,
2367
+ f
2368
+ );
2369
+ }
2370
+ f = message.getBaseSpec();
2371
+ if (f != null) {
2372
+ writer.writeMessage(
2373
+ 2,
2374
+ f,
2375
+ strategysearch_spec_pb.StrategySearchSpec.serializeBinaryToWriter
2376
+ );
2377
+ }
2378
+ f = message.getSearchSpaceList();
2379
+ if (f.length > 0) {
2380
+ writer.writeRepeatedMessage(
2381
+ 3,
2382
+ f,
2383
+ strategysearch_search_pb.ParamRange.serializeBinaryToWriter
2384
+ );
2385
+ }
2386
+ f = message.getStudy();
2387
+ if (f != null) {
2388
+ writer.writeMessage(
2389
+ 4,
2390
+ f,
2391
+ strategysearch_search_pb.StudyConfig.serializeBinaryToWriter
2392
+ );
2393
+ }
2394
+ f = message.getConfig();
2395
+ if (f != null) {
2396
+ writer.writeMessage(
2397
+ 5,
2398
+ f,
2399
+ strategysearch_backtest_pb.BacktestConfig.serializeBinaryToWriter
2400
+ );
2401
+ }
2402
+ };
2403
+
2404
+
2405
+ /**
2406
+ * optional string name = 1;
2407
+ * @return {string}
2408
+ */
2409
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.getName = function() {
2410
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2411
+ };
2412
+
2413
+
2414
+ /**
2415
+ * @param {string} value
2416
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} returns this
2417
+ */
2418
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.setName = function(value) {
2419
+ return jspb.Message.setProto3StringField(this, 1, value);
2420
+ };
2421
+
2422
+
2423
+ /**
2424
+ * optional StrategySearchSpec base_spec = 2;
2425
+ * @return {?proto.trb.strategysearch.v1.StrategySearchSpec}
2426
+ */
2427
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.getBaseSpec = function() {
2428
+ return /** @type{?proto.trb.strategysearch.v1.StrategySearchSpec} */ (
2429
+ jspb.Message.getWrapperField(this, strategysearch_spec_pb.StrategySearchSpec, 2));
2430
+ };
2431
+
2432
+
2433
+ /**
2434
+ * @param {?proto.trb.strategysearch.v1.StrategySearchSpec|undefined} value
2435
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} returns this
2436
+ */
2437
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.setBaseSpec = function(value) {
2438
+ return jspb.Message.setWrapperField(this, 2, value);
2439
+ };
2440
+
2441
+
2442
+ /**
2443
+ * Clears the message field making it undefined.
2444
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} returns this
2445
+ */
2446
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.clearBaseSpec = function() {
2447
+ return this.setBaseSpec(undefined);
2448
+ };
2449
+
2450
+
2451
+ /**
2452
+ * Returns whether this field is set.
2453
+ * @return {boolean}
2454
+ */
2455
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.hasBaseSpec = function() {
2456
+ return jspb.Message.getField(this, 2) != null;
2457
+ };
2458
+
2459
+
2460
+ /**
2461
+ * repeated ParamRange search_space = 3;
2462
+ * @return {!Array<!proto.trb.strategysearch.v1.ParamRange>}
2463
+ */
2464
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.getSearchSpaceList = function() {
2465
+ return /** @type{!Array<!proto.trb.strategysearch.v1.ParamRange>} */ (
2466
+ jspb.Message.getRepeatedWrapperField(this, strategysearch_search_pb.ParamRange, 3));
2467
+ };
2468
+
2469
+
2470
+ /**
2471
+ * @param {!Array<!proto.trb.strategysearch.v1.ParamRange>} value
2472
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} returns this
2473
+ */
2474
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.setSearchSpaceList = function(value) {
2475
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
2476
+ };
2477
+
2478
+
2479
+ /**
2480
+ * @param {!proto.trb.strategysearch.v1.ParamRange=} opt_value
2481
+ * @param {number=} opt_index
2482
+ * @return {!proto.trb.strategysearch.v1.ParamRange}
2483
+ */
2484
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.addSearchSpace = function(opt_value, opt_index) {
2485
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.trb.strategysearch.v1.ParamRange, opt_index);
2486
+ };
2487
+
2488
+
2489
+ /**
2490
+ * Clears the list making it empty but non-null.
2491
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} returns this
2492
+ */
2493
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.clearSearchSpaceList = function() {
2494
+ return this.setSearchSpaceList([]);
2495
+ };
2496
+
2497
+
2498
+ /**
2499
+ * optional StudyConfig study = 4;
2500
+ * @return {?proto.trb.strategysearch.v1.StudyConfig}
2501
+ */
2502
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.getStudy = function() {
2503
+ return /** @type{?proto.trb.strategysearch.v1.StudyConfig} */ (
2504
+ jspb.Message.getWrapperField(this, strategysearch_search_pb.StudyConfig, 4));
2505
+ };
2506
+
2507
+
2508
+ /**
2509
+ * @param {?proto.trb.strategysearch.v1.StudyConfig|undefined} value
2510
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} returns this
2511
+ */
2512
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.setStudy = function(value) {
2513
+ return jspb.Message.setWrapperField(this, 4, value);
2514
+ };
2515
+
2516
+
2517
+ /**
2518
+ * Clears the message field making it undefined.
2519
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} returns this
2520
+ */
2521
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.clearStudy = function() {
2522
+ return this.setStudy(undefined);
2523
+ };
2524
+
2525
+
2526
+ /**
2527
+ * Returns whether this field is set.
2528
+ * @return {boolean}
2529
+ */
2530
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.hasStudy = function() {
2531
+ return jspb.Message.getField(this, 4) != null;
2532
+ };
2533
+
2534
+
2535
+ /**
2536
+ * optional BacktestConfig config = 5;
2537
+ * @return {?proto.trb.strategysearch.v1.BacktestConfig}
2538
+ */
2539
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.getConfig = function() {
2540
+ return /** @type{?proto.trb.strategysearch.v1.BacktestConfig} */ (
2541
+ jspb.Message.getWrapperField(this, strategysearch_backtest_pb.BacktestConfig, 5));
2542
+ };
2543
+
2544
+
2545
+ /**
2546
+ * @param {?proto.trb.strategysearch.v1.BacktestConfig|undefined} value
2547
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} returns this
2548
+ */
2549
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.setConfig = function(value) {
2550
+ return jspb.Message.setWrapperField(this, 5, value);
2551
+ };
2552
+
2553
+
2554
+ /**
2555
+ * Clears the message field making it undefined.
2556
+ * @return {!proto.trb.strategysearch.v1.CreateSearchPresetRequest} returns this
2557
+ */
2558
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.clearConfig = function() {
2559
+ return this.setConfig(undefined);
2560
+ };
2561
+
2562
+
2563
+ /**
2564
+ * Returns whether this field is set.
2565
+ * @return {boolean}
2566
+ */
2567
+ proto.trb.strategysearch.v1.CreateSearchPresetRequest.prototype.hasConfig = function() {
2568
+ return jspb.Message.getField(this, 5) != null;
2569
+ };
2570
+
2571
+
2572
+
2573
+
2574
+
2575
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2576
+ /**
2577
+ * Creates an object representation of this proto.
2578
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2579
+ * Optional fields that are not set will be set to undefined.
2580
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2581
+ * For the list of reserved names please see:
2582
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2583
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2584
+ * JSPB instance for transitional soy proto support:
2585
+ * http://goto/soy-param-migration
2586
+ * @return {!Object}
2587
+ */
2588
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.prototype.toObject = function(opt_includeInstance) {
2589
+ return proto.trb.strategysearch.v1.ListSearchPresetsRequest.toObject(opt_includeInstance, this);
2590
+ };
2591
+
2592
+
2593
+ /**
2594
+ * Static version of the {@see toObject} method.
2595
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2596
+ * the JSPB instance for transitional soy proto support:
2597
+ * http://goto/soy-param-migration
2598
+ * @param {!proto.trb.strategysearch.v1.ListSearchPresetsRequest} msg The msg instance to transform.
2599
+ * @return {!Object}
2600
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2601
+ */
2602
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.toObject = function(includeInstance, msg) {
2603
+ var f, obj = {
2604
+ limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
2605
+ offset: jspb.Message.getFieldWithDefault(msg, 2, 0)
2606
+ };
2607
+
2608
+ if (includeInstance) {
2609
+ obj.$jspbMessageInstance = msg;
2610
+ }
2611
+ return obj;
2612
+ };
2613
+ }
2614
+
2615
+
2616
+ /**
2617
+ * Deserializes binary data (in protobuf wire format).
2618
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2619
+ * @return {!proto.trb.strategysearch.v1.ListSearchPresetsRequest}
2620
+ */
2621
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.deserializeBinary = function(bytes) {
2622
+ var reader = new jspb.BinaryReader(bytes);
2623
+ var msg = new proto.trb.strategysearch.v1.ListSearchPresetsRequest;
2624
+ return proto.trb.strategysearch.v1.ListSearchPresetsRequest.deserializeBinaryFromReader(msg, reader);
2625
+ };
2626
+
2627
+
2628
+ /**
2629
+ * Deserializes binary data (in protobuf wire format) from the
2630
+ * given reader into the given message object.
2631
+ * @param {!proto.trb.strategysearch.v1.ListSearchPresetsRequest} msg The message object to deserialize into.
2632
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2633
+ * @return {!proto.trb.strategysearch.v1.ListSearchPresetsRequest}
2634
+ */
2635
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.deserializeBinaryFromReader = function(msg, reader) {
2636
+ while (reader.nextField()) {
2637
+ if (reader.isEndGroup()) {
2638
+ break;
2639
+ }
2640
+ var field = reader.getFieldNumber();
2641
+ switch (field) {
2642
+ case 1:
2643
+ var value = /** @type {number} */ (reader.readInt32());
2644
+ msg.setLimit(value);
2645
+ break;
2646
+ case 2:
2647
+ var value = /** @type {number} */ (reader.readInt32());
2648
+ msg.setOffset(value);
2649
+ break;
2650
+ default:
2651
+ reader.skipField();
2652
+ break;
2653
+ }
2654
+ }
2655
+ return msg;
2656
+ };
2657
+
2658
+
2659
+ /**
2660
+ * Serializes the message to binary data (in protobuf wire format).
2661
+ * @return {!Uint8Array}
2662
+ */
2663
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.prototype.serializeBinary = function() {
2664
+ var writer = new jspb.BinaryWriter();
2665
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.serializeBinaryToWriter(this, writer);
2666
+ return writer.getResultBuffer();
2667
+ };
2668
+
2669
+
2670
+ /**
2671
+ * Serializes the given message to binary data (in protobuf wire
2672
+ * format), writing to the given BinaryWriter.
2673
+ * @param {!proto.trb.strategysearch.v1.ListSearchPresetsRequest} message
2674
+ * @param {!jspb.BinaryWriter} writer
2675
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2676
+ */
2677
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.serializeBinaryToWriter = function(message, writer) {
2678
+ var f = undefined;
2679
+ f = message.getLimit();
2680
+ if (f !== 0) {
2681
+ writer.writeInt32(
2682
+ 1,
2683
+ f
2684
+ );
2685
+ }
2686
+ f = message.getOffset();
2687
+ if (f !== 0) {
2688
+ writer.writeInt32(
2689
+ 2,
2690
+ f
2691
+ );
2692
+ }
2693
+ };
2694
+
2695
+
2696
+ /**
2697
+ * optional int32 limit = 1;
2698
+ * @return {number}
2699
+ */
2700
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.prototype.getLimit = function() {
2701
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2702
+ };
2703
+
2704
+
2705
+ /**
2706
+ * @param {number} value
2707
+ * @return {!proto.trb.strategysearch.v1.ListSearchPresetsRequest} returns this
2708
+ */
2709
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.prototype.setLimit = function(value) {
2710
+ return jspb.Message.setProto3IntField(this, 1, value);
2711
+ };
2712
+
2713
+
2714
+ /**
2715
+ * optional int32 offset = 2;
2716
+ * @return {number}
2717
+ */
2718
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.prototype.getOffset = function() {
2719
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
2720
+ };
2721
+
2722
+
2723
+ /**
2724
+ * @param {number} value
2725
+ * @return {!proto.trb.strategysearch.v1.ListSearchPresetsRequest} returns this
2726
+ */
2727
+ proto.trb.strategysearch.v1.ListSearchPresetsRequest.prototype.setOffset = function(value) {
2728
+ return jspb.Message.setProto3IntField(this, 2, value);
2729
+ };
2730
+
2731
+
2732
+
2733
+ /**
2734
+ * List of repeated fields within this message type.
2735
+ * @private {!Array<number>}
2736
+ * @const
2737
+ */
2738
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.repeatedFields_ = [1];
2739
+
2740
+
2741
+
2742
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2743
+ /**
2744
+ * Creates an object representation of this proto.
2745
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2746
+ * Optional fields that are not set will be set to undefined.
2747
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2748
+ * For the list of reserved names please see:
2749
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2750
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2751
+ * JSPB instance for transitional soy proto support:
2752
+ * http://goto/soy-param-migration
2753
+ * @return {!Object}
2754
+ */
2755
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.prototype.toObject = function(opt_includeInstance) {
2756
+ return proto.trb.strategysearch.v1.ListSearchPresetsResponse.toObject(opt_includeInstance, this);
2757
+ };
2758
+
2759
+
2760
+ /**
2761
+ * Static version of the {@see toObject} method.
2762
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2763
+ * the JSPB instance for transitional soy proto support:
2764
+ * http://goto/soy-param-migration
2765
+ * @param {!proto.trb.strategysearch.v1.ListSearchPresetsResponse} msg The msg instance to transform.
2766
+ * @return {!Object}
2767
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2768
+ */
2769
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.toObject = function(includeInstance, msg) {
2770
+ var f, obj = {
2771
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
2772
+ proto.trb.strategysearch.v1.SearchPreset.toObject, includeInstance),
2773
+ total: jspb.Message.getFieldWithDefault(msg, 2, 0)
2774
+ };
2775
+
2776
+ if (includeInstance) {
2777
+ obj.$jspbMessageInstance = msg;
2778
+ }
2779
+ return obj;
2780
+ };
2781
+ }
2782
+
2783
+
2784
+ /**
2785
+ * Deserializes binary data (in protobuf wire format).
2786
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2787
+ * @return {!proto.trb.strategysearch.v1.ListSearchPresetsResponse}
2788
+ */
2789
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.deserializeBinary = function(bytes) {
2790
+ var reader = new jspb.BinaryReader(bytes);
2791
+ var msg = new proto.trb.strategysearch.v1.ListSearchPresetsResponse;
2792
+ return proto.trb.strategysearch.v1.ListSearchPresetsResponse.deserializeBinaryFromReader(msg, reader);
2793
+ };
2794
+
2795
+
2796
+ /**
2797
+ * Deserializes binary data (in protobuf wire format) from the
2798
+ * given reader into the given message object.
2799
+ * @param {!proto.trb.strategysearch.v1.ListSearchPresetsResponse} msg The message object to deserialize into.
2800
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2801
+ * @return {!proto.trb.strategysearch.v1.ListSearchPresetsResponse}
2802
+ */
2803
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.deserializeBinaryFromReader = function(msg, reader) {
2804
+ while (reader.nextField()) {
2805
+ if (reader.isEndGroup()) {
2806
+ break;
2807
+ }
2808
+ var field = reader.getFieldNumber();
2809
+ switch (field) {
2810
+ case 1:
2811
+ var value = new proto.trb.strategysearch.v1.SearchPreset;
2812
+ reader.readMessage(value,proto.trb.strategysearch.v1.SearchPreset.deserializeBinaryFromReader);
2813
+ msg.addItems(value);
2814
+ break;
2815
+ case 2:
2816
+ var value = /** @type {number} */ (reader.readInt32());
2817
+ msg.setTotal(value);
2818
+ break;
2819
+ default:
2820
+ reader.skipField();
2821
+ break;
2822
+ }
2823
+ }
2824
+ return msg;
2825
+ };
2826
+
2827
+
2828
+ /**
2829
+ * Serializes the message to binary data (in protobuf wire format).
2830
+ * @return {!Uint8Array}
2831
+ */
2832
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.prototype.serializeBinary = function() {
2833
+ var writer = new jspb.BinaryWriter();
2834
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.serializeBinaryToWriter(this, writer);
2835
+ return writer.getResultBuffer();
2836
+ };
2837
+
2838
+
2839
+ /**
2840
+ * Serializes the given message to binary data (in protobuf wire
2841
+ * format), writing to the given BinaryWriter.
2842
+ * @param {!proto.trb.strategysearch.v1.ListSearchPresetsResponse} message
2843
+ * @param {!jspb.BinaryWriter} writer
2844
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2845
+ */
2846
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.serializeBinaryToWriter = function(message, writer) {
2847
+ var f = undefined;
2848
+ f = message.getItemsList();
2849
+ if (f.length > 0) {
2850
+ writer.writeRepeatedMessage(
2851
+ 1,
2852
+ f,
2853
+ proto.trb.strategysearch.v1.SearchPreset.serializeBinaryToWriter
2854
+ );
2855
+ }
2856
+ f = message.getTotal();
2857
+ if (f !== 0) {
2858
+ writer.writeInt32(
2859
+ 2,
2860
+ f
2861
+ );
2862
+ }
2863
+ };
2864
+
2865
+
2866
+ /**
2867
+ * repeated SearchPreset items = 1;
2868
+ * @return {!Array<!proto.trb.strategysearch.v1.SearchPreset>}
2869
+ */
2870
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.prototype.getItemsList = function() {
2871
+ return /** @type{!Array<!proto.trb.strategysearch.v1.SearchPreset>} */ (
2872
+ jspb.Message.getRepeatedWrapperField(this, proto.trb.strategysearch.v1.SearchPreset, 1));
2873
+ };
2874
+
2875
+
2876
+ /**
2877
+ * @param {!Array<!proto.trb.strategysearch.v1.SearchPreset>} value
2878
+ * @return {!proto.trb.strategysearch.v1.ListSearchPresetsResponse} returns this
2879
+ */
2880
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.prototype.setItemsList = function(value) {
2881
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
2882
+ };
2883
+
2884
+
2885
+ /**
2886
+ * @param {!proto.trb.strategysearch.v1.SearchPreset=} opt_value
2887
+ * @param {number=} opt_index
2888
+ * @return {!proto.trb.strategysearch.v1.SearchPreset}
2889
+ */
2890
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.prototype.addItems = function(opt_value, opt_index) {
2891
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.trb.strategysearch.v1.SearchPreset, opt_index);
2892
+ };
2893
+
2894
+
2895
+ /**
2896
+ * Clears the list making it empty but non-null.
2897
+ * @return {!proto.trb.strategysearch.v1.ListSearchPresetsResponse} returns this
2898
+ */
2899
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.prototype.clearItemsList = function() {
2900
+ return this.setItemsList([]);
2901
+ };
2902
+
2903
+
2904
+ /**
2905
+ * optional int32 total = 2;
2906
+ * @return {number}
2907
+ */
2908
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.prototype.getTotal = function() {
2909
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
2910
+ };
2911
+
2912
+
2913
+ /**
2914
+ * @param {number} value
2915
+ * @return {!proto.trb.strategysearch.v1.ListSearchPresetsResponse} returns this
2916
+ */
2917
+ proto.trb.strategysearch.v1.ListSearchPresetsResponse.prototype.setTotal = function(value) {
2918
+ return jspb.Message.setProto3IntField(this, 2, value);
2919
+ };
2920
+
2921
+
2922
+
2923
+
2924
+
2925
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2926
+ /**
2927
+ * Creates an object representation of this proto.
2928
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2929
+ * Optional fields that are not set will be set to undefined.
2930
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2931
+ * For the list of reserved names please see:
2932
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2933
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2934
+ * JSPB instance for transitional soy proto support:
2935
+ * http://goto/soy-param-migration
2936
+ * @return {!Object}
2937
+ */
2938
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest.prototype.toObject = function(opt_includeInstance) {
2939
+ return proto.trb.strategysearch.v1.DeleteSearchPresetRequest.toObject(opt_includeInstance, this);
2940
+ };
2941
+
2942
+
2943
+ /**
2944
+ * Static version of the {@see toObject} method.
2945
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2946
+ * the JSPB instance for transitional soy proto support:
2947
+ * http://goto/soy-param-migration
2948
+ * @param {!proto.trb.strategysearch.v1.DeleteSearchPresetRequest} msg The msg instance to transform.
2949
+ * @return {!Object}
2950
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2951
+ */
2952
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest.toObject = function(includeInstance, msg) {
2953
+ var f, obj = {
2954
+ id: jspb.Message.getFieldWithDefault(msg, 1, "")
2955
+ };
2956
+
2957
+ if (includeInstance) {
2958
+ obj.$jspbMessageInstance = msg;
2959
+ }
2960
+ return obj;
2961
+ };
2962
+ }
2963
+
2964
+
2965
+ /**
2966
+ * Deserializes binary data (in protobuf wire format).
2967
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2968
+ * @return {!proto.trb.strategysearch.v1.DeleteSearchPresetRequest}
2969
+ */
2970
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest.deserializeBinary = function(bytes) {
2971
+ var reader = new jspb.BinaryReader(bytes);
2972
+ var msg = new proto.trb.strategysearch.v1.DeleteSearchPresetRequest;
2973
+ return proto.trb.strategysearch.v1.DeleteSearchPresetRequest.deserializeBinaryFromReader(msg, reader);
2974
+ };
2975
+
2976
+
2977
+ /**
2978
+ * Deserializes binary data (in protobuf wire format) from the
2979
+ * given reader into the given message object.
2980
+ * @param {!proto.trb.strategysearch.v1.DeleteSearchPresetRequest} msg The message object to deserialize into.
2981
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2982
+ * @return {!proto.trb.strategysearch.v1.DeleteSearchPresetRequest}
2983
+ */
2984
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest.deserializeBinaryFromReader = function(msg, reader) {
2985
+ while (reader.nextField()) {
2986
+ if (reader.isEndGroup()) {
2987
+ break;
2988
+ }
2989
+ var field = reader.getFieldNumber();
2990
+ switch (field) {
2991
+ case 1:
2992
+ var value = /** @type {string} */ (reader.readString());
2993
+ msg.setId(value);
2994
+ break;
2995
+ default:
2996
+ reader.skipField();
2997
+ break;
2998
+ }
2999
+ }
3000
+ return msg;
3001
+ };
3002
+
3003
+
3004
+ /**
3005
+ * Serializes the message to binary data (in protobuf wire format).
3006
+ * @return {!Uint8Array}
3007
+ */
3008
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest.prototype.serializeBinary = function() {
3009
+ var writer = new jspb.BinaryWriter();
3010
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest.serializeBinaryToWriter(this, writer);
3011
+ return writer.getResultBuffer();
3012
+ };
3013
+
3014
+
3015
+ /**
3016
+ * Serializes the given message to binary data (in protobuf wire
3017
+ * format), writing to the given BinaryWriter.
3018
+ * @param {!proto.trb.strategysearch.v1.DeleteSearchPresetRequest} message
3019
+ * @param {!jspb.BinaryWriter} writer
3020
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3021
+ */
3022
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest.serializeBinaryToWriter = function(message, writer) {
3023
+ var f = undefined;
3024
+ f = message.getId();
3025
+ if (f.length > 0) {
3026
+ writer.writeString(
3027
+ 1,
3028
+ f
3029
+ );
3030
+ }
3031
+ };
3032
+
3033
+
3034
+ /**
3035
+ * optional string id = 1;
3036
+ * @return {string}
3037
+ */
3038
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest.prototype.getId = function() {
3039
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3040
+ };
3041
+
3042
+
3043
+ /**
3044
+ * @param {string} value
3045
+ * @return {!proto.trb.strategysearch.v1.DeleteSearchPresetRequest} returns this
3046
+ */
3047
+ proto.trb.strategysearch.v1.DeleteSearchPresetRequest.prototype.setId = function(value) {
3048
+ return jspb.Message.setProto3StringField(this, 1, value);
3049
+ };
3050
+
3051
+
3052
+
3053
+
3054
+
3055
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3056
+ /**
3057
+ * Creates an object representation of this proto.
3058
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3059
+ * Optional fields that are not set will be set to undefined.
3060
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3061
+ * For the list of reserved names please see:
3062
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3063
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3064
+ * JSPB instance for transitional soy proto support:
3065
+ * http://goto/soy-param-migration
3066
+ * @return {!Object}
3067
+ */
3068
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse.prototype.toObject = function(opt_includeInstance) {
3069
+ return proto.trb.strategysearch.v1.DeleteSearchPresetResponse.toObject(opt_includeInstance, this);
3070
+ };
3071
+
3072
+
3073
+ /**
3074
+ * Static version of the {@see toObject} method.
3075
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3076
+ * the JSPB instance for transitional soy proto support:
3077
+ * http://goto/soy-param-migration
3078
+ * @param {!proto.trb.strategysearch.v1.DeleteSearchPresetResponse} msg The msg instance to transform.
3079
+ * @return {!Object}
3080
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3081
+ */
3082
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse.toObject = function(includeInstance, msg) {
3083
+ var f, obj = {
3084
+ id: jspb.Message.getFieldWithDefault(msg, 1, "")
3085
+ };
3086
+
3087
+ if (includeInstance) {
3088
+ obj.$jspbMessageInstance = msg;
3089
+ }
3090
+ return obj;
3091
+ };
3092
+ }
3093
+
3094
+
3095
+ /**
3096
+ * Deserializes binary data (in protobuf wire format).
3097
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3098
+ * @return {!proto.trb.strategysearch.v1.DeleteSearchPresetResponse}
3099
+ */
3100
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse.deserializeBinary = function(bytes) {
3101
+ var reader = new jspb.BinaryReader(bytes);
3102
+ var msg = new proto.trb.strategysearch.v1.DeleteSearchPresetResponse;
3103
+ return proto.trb.strategysearch.v1.DeleteSearchPresetResponse.deserializeBinaryFromReader(msg, reader);
3104
+ };
3105
+
3106
+
3107
+ /**
3108
+ * Deserializes binary data (in protobuf wire format) from the
3109
+ * given reader into the given message object.
3110
+ * @param {!proto.trb.strategysearch.v1.DeleteSearchPresetResponse} msg The message object to deserialize into.
3111
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3112
+ * @return {!proto.trb.strategysearch.v1.DeleteSearchPresetResponse}
3113
+ */
3114
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse.deserializeBinaryFromReader = function(msg, reader) {
3115
+ while (reader.nextField()) {
3116
+ if (reader.isEndGroup()) {
3117
+ break;
3118
+ }
3119
+ var field = reader.getFieldNumber();
3120
+ switch (field) {
3121
+ case 1:
3122
+ var value = /** @type {string} */ (reader.readString());
3123
+ msg.setId(value);
3124
+ break;
3125
+ default:
3126
+ reader.skipField();
3127
+ break;
3128
+ }
3129
+ }
3130
+ return msg;
3131
+ };
3132
+
3133
+
3134
+ /**
3135
+ * Serializes the message to binary data (in protobuf wire format).
3136
+ * @return {!Uint8Array}
3137
+ */
3138
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse.prototype.serializeBinary = function() {
3139
+ var writer = new jspb.BinaryWriter();
3140
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse.serializeBinaryToWriter(this, writer);
3141
+ return writer.getResultBuffer();
3142
+ };
3143
+
3144
+
3145
+ /**
3146
+ * Serializes the given message to binary data (in protobuf wire
3147
+ * format), writing to the given BinaryWriter.
3148
+ * @param {!proto.trb.strategysearch.v1.DeleteSearchPresetResponse} message
3149
+ * @param {!jspb.BinaryWriter} writer
3150
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3151
+ */
3152
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse.serializeBinaryToWriter = function(message, writer) {
3153
+ var f = undefined;
3154
+ f = message.getId();
3155
+ if (f.length > 0) {
3156
+ writer.writeString(
3157
+ 1,
3158
+ f
3159
+ );
3160
+ }
3161
+ };
3162
+
3163
+
3164
+ /**
3165
+ * optional string id = 1;
3166
+ * @return {string}
3167
+ */
3168
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse.prototype.getId = function() {
3169
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3170
+ };
3171
+
3172
+
3173
+ /**
3174
+ * @param {string} value
3175
+ * @return {!proto.trb.strategysearch.v1.DeleteSearchPresetResponse} returns this
3176
+ */
3177
+ proto.trb.strategysearch.v1.DeleteSearchPresetResponse.prototype.setId = function(value) {
3178
+ return jspb.Message.setProto3StringField(this, 1, value);
3179
+ };
3180
+
3181
+
1671
3182
  goog.object.extend(exports, proto.trb.strategysearch.v1);