protobuf-platform 1.0.115 → 1.0.117

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.
@@ -0,0 +1,10 @@
1
+ syntax = "proto3";
2
+
3
+ package bonus;
4
+
5
+ service Bonus {
6
+ rpc checkConnection(PingRequest) returns (PongResponse);
7
+ }
8
+
9
+ message PingRequest { string ping = 1; }
10
+ message PongResponse { string pong = 1; }
@@ -0,0 +1,44 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var bonus_pb = require('./bonus_pb.js');
6
+
7
+ function serialize_bonus_PingRequest(arg) {
8
+ if (!(arg instanceof bonus_pb.PingRequest)) {
9
+ throw new Error('Expected argument of type bonus.PingRequest');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_bonus_PingRequest(buffer_arg) {
15
+ return bonus_pb.PingRequest.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
18
+ function serialize_bonus_PongResponse(arg) {
19
+ if (!(arg instanceof bonus_pb.PongResponse)) {
20
+ throw new Error('Expected argument of type bonus.PongResponse');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_bonus_PongResponse(buffer_arg) {
26
+ return bonus_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
29
+
30
+ var BonusService = exports.BonusService = {
31
+ checkConnection: {
32
+ path: '/bonus.Bonus/checkConnection',
33
+ requestStream: false,
34
+ responseStream: false,
35
+ requestType: bonus_pb.PingRequest,
36
+ responseType: bonus_pb.PongResponse,
37
+ requestSerialize: serialize_bonus_PingRequest,
38
+ requestDeserialize: deserialize_bonus_PingRequest,
39
+ responseSerialize: serialize_bonus_PongResponse,
40
+ responseDeserialize: deserialize_bonus_PongResponse,
41
+ },
42
+ };
43
+
44
+ exports.BonusClient = grpc.makeGenericClientConstructor(BonusService);
@@ -0,0 +1,328 @@
1
+ // source: bonus.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
+ goog.exportSymbol('proto.bonus.PingRequest', null, global);
25
+ goog.exportSymbol('proto.bonus.PongResponse', null, global);
26
+ /**
27
+ * Generated by JsPbCodeGenerator.
28
+ * @param {Array=} opt_data Optional initial data array, typically from a
29
+ * server response, or constructed directly in Javascript. The array is used
30
+ * in place and becomes part of the constructed object. It is not cloned.
31
+ * If no data is provided, the constructed object will be empty, but still
32
+ * valid.
33
+ * @extends {jspb.Message}
34
+ * @constructor
35
+ */
36
+ proto.bonus.PingRequest = function(opt_data) {
37
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
38
+ };
39
+ goog.inherits(proto.bonus.PingRequest, jspb.Message);
40
+ if (goog.DEBUG && !COMPILED) {
41
+ /**
42
+ * @public
43
+ * @override
44
+ */
45
+ proto.bonus.PingRequest.displayName = 'proto.bonus.PingRequest';
46
+ }
47
+ /**
48
+ * Generated by JsPbCodeGenerator.
49
+ * @param {Array=} opt_data Optional initial data array, typically from a
50
+ * server response, or constructed directly in Javascript. The array is used
51
+ * in place and becomes part of the constructed object. It is not cloned.
52
+ * If no data is provided, the constructed object will be empty, but still
53
+ * valid.
54
+ * @extends {jspb.Message}
55
+ * @constructor
56
+ */
57
+ proto.bonus.PongResponse = function(opt_data) {
58
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
59
+ };
60
+ goog.inherits(proto.bonus.PongResponse, jspb.Message);
61
+ if (goog.DEBUG && !COMPILED) {
62
+ /**
63
+ * @public
64
+ * @override
65
+ */
66
+ proto.bonus.PongResponse.displayName = 'proto.bonus.PongResponse';
67
+ }
68
+
69
+
70
+
71
+ if (jspb.Message.GENERATE_TO_OBJECT) {
72
+ /**
73
+ * Creates an object representation of this proto.
74
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
75
+ * Optional fields that are not set will be set to undefined.
76
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
77
+ * For the list of reserved names please see:
78
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
79
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
80
+ * JSPB instance for transitional soy proto support:
81
+ * http://goto/soy-param-migration
82
+ * @return {!Object}
83
+ */
84
+ proto.bonus.PingRequest.prototype.toObject = function(opt_includeInstance) {
85
+ return proto.bonus.PingRequest.toObject(opt_includeInstance, this);
86
+ };
87
+
88
+
89
+ /**
90
+ * Static version of the {@see toObject} method.
91
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
92
+ * the JSPB instance for transitional soy proto support:
93
+ * http://goto/soy-param-migration
94
+ * @param {!proto.bonus.PingRequest} msg The msg instance to transform.
95
+ * @return {!Object}
96
+ * @suppress {unusedLocalVariables} f is only used for nested messages
97
+ */
98
+ proto.bonus.PingRequest.toObject = function(includeInstance, msg) {
99
+ var f, obj = {
100
+ ping: jspb.Message.getFieldWithDefault(msg, 1, "")
101
+ };
102
+
103
+ if (includeInstance) {
104
+ obj.$jspbMessageInstance = msg;
105
+ }
106
+ return obj;
107
+ };
108
+ }
109
+
110
+
111
+ /**
112
+ * Deserializes binary data (in protobuf wire format).
113
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
114
+ * @return {!proto.bonus.PingRequest}
115
+ */
116
+ proto.bonus.PingRequest.deserializeBinary = function(bytes) {
117
+ var reader = new jspb.BinaryReader(bytes);
118
+ var msg = new proto.bonus.PingRequest;
119
+ return proto.bonus.PingRequest.deserializeBinaryFromReader(msg, reader);
120
+ };
121
+
122
+
123
+ /**
124
+ * Deserializes binary data (in protobuf wire format) from the
125
+ * given reader into the given message object.
126
+ * @param {!proto.bonus.PingRequest} msg The message object to deserialize into.
127
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
128
+ * @return {!proto.bonus.PingRequest}
129
+ */
130
+ proto.bonus.PingRequest.deserializeBinaryFromReader = function(msg, reader) {
131
+ while (reader.nextField()) {
132
+ if (reader.isEndGroup()) {
133
+ break;
134
+ }
135
+ var field = reader.getFieldNumber();
136
+ switch (field) {
137
+ case 1:
138
+ var value = /** @type {string} */ (reader.readString());
139
+ msg.setPing(value);
140
+ break;
141
+ default:
142
+ reader.skipField();
143
+ break;
144
+ }
145
+ }
146
+ return msg;
147
+ };
148
+
149
+
150
+ /**
151
+ * Serializes the message to binary data (in protobuf wire format).
152
+ * @return {!Uint8Array}
153
+ */
154
+ proto.bonus.PingRequest.prototype.serializeBinary = function() {
155
+ var writer = new jspb.BinaryWriter();
156
+ proto.bonus.PingRequest.serializeBinaryToWriter(this, writer);
157
+ return writer.getResultBuffer();
158
+ };
159
+
160
+
161
+ /**
162
+ * Serializes the given message to binary data (in protobuf wire
163
+ * format), writing to the given BinaryWriter.
164
+ * @param {!proto.bonus.PingRequest} message
165
+ * @param {!jspb.BinaryWriter} writer
166
+ * @suppress {unusedLocalVariables} f is only used for nested messages
167
+ */
168
+ proto.bonus.PingRequest.serializeBinaryToWriter = function(message, writer) {
169
+ var f = undefined;
170
+ f = message.getPing();
171
+ if (f.length > 0) {
172
+ writer.writeString(
173
+ 1,
174
+ f
175
+ );
176
+ }
177
+ };
178
+
179
+
180
+ /**
181
+ * optional string ping = 1;
182
+ * @return {string}
183
+ */
184
+ proto.bonus.PingRequest.prototype.getPing = function() {
185
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
186
+ };
187
+
188
+
189
+ /**
190
+ * @param {string} value
191
+ * @return {!proto.bonus.PingRequest} returns this
192
+ */
193
+ proto.bonus.PingRequest.prototype.setPing = function(value) {
194
+ return jspb.Message.setProto3StringField(this, 1, value);
195
+ };
196
+
197
+
198
+
199
+
200
+
201
+ if (jspb.Message.GENERATE_TO_OBJECT) {
202
+ /**
203
+ * Creates an object representation of this proto.
204
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
205
+ * Optional fields that are not set will be set to undefined.
206
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
207
+ * For the list of reserved names please see:
208
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
209
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
210
+ * JSPB instance for transitional soy proto support:
211
+ * http://goto/soy-param-migration
212
+ * @return {!Object}
213
+ */
214
+ proto.bonus.PongResponse.prototype.toObject = function(opt_includeInstance) {
215
+ return proto.bonus.PongResponse.toObject(opt_includeInstance, this);
216
+ };
217
+
218
+
219
+ /**
220
+ * Static version of the {@see toObject} method.
221
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
222
+ * the JSPB instance for transitional soy proto support:
223
+ * http://goto/soy-param-migration
224
+ * @param {!proto.bonus.PongResponse} msg The msg instance to transform.
225
+ * @return {!Object}
226
+ * @suppress {unusedLocalVariables} f is only used for nested messages
227
+ */
228
+ proto.bonus.PongResponse.toObject = function(includeInstance, msg) {
229
+ var f, obj = {
230
+ pong: jspb.Message.getFieldWithDefault(msg, 1, "")
231
+ };
232
+
233
+ if (includeInstance) {
234
+ obj.$jspbMessageInstance = msg;
235
+ }
236
+ return obj;
237
+ };
238
+ }
239
+
240
+
241
+ /**
242
+ * Deserializes binary data (in protobuf wire format).
243
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
244
+ * @return {!proto.bonus.PongResponse}
245
+ */
246
+ proto.bonus.PongResponse.deserializeBinary = function(bytes) {
247
+ var reader = new jspb.BinaryReader(bytes);
248
+ var msg = new proto.bonus.PongResponse;
249
+ return proto.bonus.PongResponse.deserializeBinaryFromReader(msg, reader);
250
+ };
251
+
252
+
253
+ /**
254
+ * Deserializes binary data (in protobuf wire format) from the
255
+ * given reader into the given message object.
256
+ * @param {!proto.bonus.PongResponse} msg The message object to deserialize into.
257
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
258
+ * @return {!proto.bonus.PongResponse}
259
+ */
260
+ proto.bonus.PongResponse.deserializeBinaryFromReader = function(msg, reader) {
261
+ while (reader.nextField()) {
262
+ if (reader.isEndGroup()) {
263
+ break;
264
+ }
265
+ var field = reader.getFieldNumber();
266
+ switch (field) {
267
+ case 1:
268
+ var value = /** @type {string} */ (reader.readString());
269
+ msg.setPong(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.bonus.PongResponse.prototype.serializeBinary = function() {
285
+ var writer = new jspb.BinaryWriter();
286
+ proto.bonus.PongResponse.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.bonus.PongResponse} message
295
+ * @param {!jspb.BinaryWriter} writer
296
+ * @suppress {unusedLocalVariables} f is only used for nested messages
297
+ */
298
+ proto.bonus.PongResponse.serializeBinaryToWriter = function(message, writer) {
299
+ var f = undefined;
300
+ f = message.getPong();
301
+ if (f.length > 0) {
302
+ writer.writeString(
303
+ 1,
304
+ f
305
+ );
306
+ }
307
+ };
308
+
309
+
310
+ /**
311
+ * optional string pong = 1;
312
+ * @return {string}
313
+ */
314
+ proto.bonus.PongResponse.prototype.getPong = function() {
315
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
316
+ };
317
+
318
+
319
+ /**
320
+ * @param {string} value
321
+ * @return {!proto.bonus.PongResponse} returns this
322
+ */
323
+ proto.bonus.PongResponse.prototype.setPong = function(value) {
324
+ return jspb.Message.setProto3StringField(this, 1, value);
325
+ };
326
+
327
+
328
+ goog.object.extend(exports, proto.bonus);
package/index.js CHANGED
@@ -15,6 +15,8 @@ const BetService = require('./bet/bet_grpc_pb');
15
15
  const BetServiceMessages = require('./bet/bet_pb');
16
16
  const CMSService = require('./cms/cms_grpc_pb');
17
17
  const CMSServiceMessages = require('./cms/cms_pb');
18
+ const BonusService = require('./bonus/bonus_grpc_pb');
19
+ const BonusServiceMessages = require('./bonus/bonus_pb');
18
20
  module.exports = {
19
21
  gRPC: gRPC,
20
22
  maxSendMessageLength: 10388608,
@@ -48,4 +50,8 @@ module.exports = {
48
50
  service: CMSService,
49
51
  messages: CMSServiceMessages
50
52
  },
53
+ bonus: {
54
+ service: BonusService,
55
+ messages: BonusServiceMessages
56
+ },
51
57
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.115",
3
+ "version": "1.0.117",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,4 +6,5 @@ grpc_tools_node_protoc --js_out=import_style=commonjs,binary:log --grpc_out=grpc
6
6
  grpc_tools_node_protoc --js_out=import_style=commonjs,binary:game --grpc_out=grpc_js:game --proto_path=./game ./game/*.proto &&
7
7
  grpc_tools_node_protoc --js_out=import_style=commonjs,binary:file --grpc_out=grpc_js:file --proto_path=./file ./file/*.proto &&
8
8
  grpc_tools_node_protoc --js_out=import_style=commonjs,binary:bet --grpc_out=grpc_js:bet --proto_path=./bet ./bet/*.proto &&
9
- grpc_tools_node_protoc --js_out=import_style=commonjs,binary:cms --grpc_out=grpc_js:cms --proto_path=./cms ./cms/*.proto
9
+ grpc_tools_node_protoc --js_out=import_style=commonjs,binary:cms --grpc_out=grpc_js:cms --proto_path=./cms ./cms/*.proto &&
10
+ grpc_tools_node_protoc --js_out=import_style=commonjs,binary:bonus --grpc_out=grpc_js:bonus --proto_path=./bonus ./bonus/*.proto
package/user/user.proto CHANGED
@@ -26,11 +26,19 @@ service User {
26
26
 
27
27
  message PingRequest { string ping = 1; }
28
28
  message PongResponse { string pong = 1; }
29
- message PaginationRequest { int32 limit = 1; int32 offset = 2; optional UserSearchParams user_search_params = 3; }
29
+ message PaginationRequest {
30
+ int32 limit = 1;
31
+ int32 offset = 2;
32
+ optional UserSearchParams user_search_params = 3;
33
+ optional SegmentSearchParams segment_search_params = 4;
34
+ }
30
35
  message UserSearchParams {
31
36
  repeated string user_public_ids = 1;
32
37
  repeated int32 user_ids = 2;
33
38
  }
39
+ message SegmentSearchParams {
40
+ string type = 1;
41
+ }
34
42
 
35
43
  //Auth [Registration & Login]
36
44
  message RegistrationRequest {
package/user/user_pb.js CHANGED
@@ -36,6 +36,7 @@ goog.exportSymbol('proto.user.RolesItemsResponse', null, global);
36
36
  goog.exportSymbol('proto.user.SegmentItemsResponse', null, global);
37
37
  goog.exportSymbol('proto.user.SegmentRequest', null, global);
38
38
  goog.exportSymbol('proto.user.SegmentResponse', null, global);
39
+ goog.exportSymbol('proto.user.SegmentSearchParams', null, global);
39
40
  goog.exportSymbol('proto.user.SegmentStatusResponse', null, global);
40
41
  goog.exportSymbol('proto.user.UserDataRequest', null, global);
41
42
  goog.exportSymbol('proto.user.UserDataResponse', null, global);
@@ -125,6 +126,27 @@ if (goog.DEBUG && !COMPILED) {
125
126
  */
126
127
  proto.user.UserSearchParams.displayName = 'proto.user.UserSearchParams';
127
128
  }
129
+ /**
130
+ * Generated by JsPbCodeGenerator.
131
+ * @param {Array=} opt_data Optional initial data array, typically from a
132
+ * server response, or constructed directly in Javascript. The array is used
133
+ * in place and becomes part of the constructed object. It is not cloned.
134
+ * If no data is provided, the constructed object will be empty, but still
135
+ * valid.
136
+ * @extends {jspb.Message}
137
+ * @constructor
138
+ */
139
+ proto.user.SegmentSearchParams = function(opt_data) {
140
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
141
+ };
142
+ goog.inherits(proto.user.SegmentSearchParams, jspb.Message);
143
+ if (goog.DEBUG && !COMPILED) {
144
+ /**
145
+ * @public
146
+ * @override
147
+ */
148
+ proto.user.SegmentSearchParams.displayName = 'proto.user.SegmentSearchParams';
149
+ }
128
150
  /**
129
151
  * Generated by JsPbCodeGenerator.
130
152
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -755,7 +777,8 @@ proto.user.PaginationRequest.toObject = function(includeInstance, msg) {
755
777
  var f, obj = {
756
778
  limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
757
779
  offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
758
- userSearchParams: (f = msg.getUserSearchParams()) && proto.user.UserSearchParams.toObject(includeInstance, f)
780
+ userSearchParams: (f = msg.getUserSearchParams()) && proto.user.UserSearchParams.toObject(includeInstance, f),
781
+ segmentSearchParams: (f = msg.getSegmentSearchParams()) && proto.user.SegmentSearchParams.toObject(includeInstance, f)
759
782
  };
760
783
 
761
784
  if (includeInstance) {
@@ -805,6 +828,11 @@ proto.user.PaginationRequest.deserializeBinaryFromReader = function(msg, reader)
805
828
  reader.readMessage(value,proto.user.UserSearchParams.deserializeBinaryFromReader);
806
829
  msg.setUserSearchParams(value);
807
830
  break;
831
+ case 4:
832
+ var value = new proto.user.SegmentSearchParams;
833
+ reader.readMessage(value,proto.user.SegmentSearchParams.deserializeBinaryFromReader);
834
+ msg.setSegmentSearchParams(value);
835
+ break;
808
836
  default:
809
837
  reader.skipField();
810
838
  break;
@@ -856,6 +884,14 @@ proto.user.PaginationRequest.serializeBinaryToWriter = function(message, writer)
856
884
  proto.user.UserSearchParams.serializeBinaryToWriter
857
885
  );
858
886
  }
887
+ f = message.getSegmentSearchParams();
888
+ if (f != null) {
889
+ writer.writeMessage(
890
+ 4,
891
+ f,
892
+ proto.user.SegmentSearchParams.serializeBinaryToWriter
893
+ );
894
+ }
859
895
  };
860
896
 
861
897
 
@@ -932,6 +968,43 @@ proto.user.PaginationRequest.prototype.hasUserSearchParams = function() {
932
968
  };
933
969
 
934
970
 
971
+ /**
972
+ * optional SegmentSearchParams segment_search_params = 4;
973
+ * @return {?proto.user.SegmentSearchParams}
974
+ */
975
+ proto.user.PaginationRequest.prototype.getSegmentSearchParams = function() {
976
+ return /** @type{?proto.user.SegmentSearchParams} */ (
977
+ jspb.Message.getWrapperField(this, proto.user.SegmentSearchParams, 4));
978
+ };
979
+
980
+
981
+ /**
982
+ * @param {?proto.user.SegmentSearchParams|undefined} value
983
+ * @return {!proto.user.PaginationRequest} returns this
984
+ */
985
+ proto.user.PaginationRequest.prototype.setSegmentSearchParams = function(value) {
986
+ return jspb.Message.setWrapperField(this, 4, value);
987
+ };
988
+
989
+
990
+ /**
991
+ * Clears the message field making it undefined.
992
+ * @return {!proto.user.PaginationRequest} returns this
993
+ */
994
+ proto.user.PaginationRequest.prototype.clearSegmentSearchParams = function() {
995
+ return this.setSegmentSearchParams(undefined);
996
+ };
997
+
998
+
999
+ /**
1000
+ * Returns whether this field is set.
1001
+ * @return {boolean}
1002
+ */
1003
+ proto.user.PaginationRequest.prototype.hasSegmentSearchParams = function() {
1004
+ return jspb.Message.getField(this, 4) != null;
1005
+ };
1006
+
1007
+
935
1008
 
936
1009
  /**
937
1010
  * List of repeated fields within this message type.
@@ -1142,6 +1215,136 @@ proto.user.UserSearchParams.prototype.clearUserIdsList = function() {
1142
1215
 
1143
1216
 
1144
1217
 
1218
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1219
+ /**
1220
+ * Creates an object representation of this proto.
1221
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1222
+ * Optional fields that are not set will be set to undefined.
1223
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1224
+ * For the list of reserved names please see:
1225
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1226
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1227
+ * JSPB instance for transitional soy proto support:
1228
+ * http://goto/soy-param-migration
1229
+ * @return {!Object}
1230
+ */
1231
+ proto.user.SegmentSearchParams.prototype.toObject = function(opt_includeInstance) {
1232
+ return proto.user.SegmentSearchParams.toObject(opt_includeInstance, this);
1233
+ };
1234
+
1235
+
1236
+ /**
1237
+ * Static version of the {@see toObject} method.
1238
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1239
+ * the JSPB instance for transitional soy proto support:
1240
+ * http://goto/soy-param-migration
1241
+ * @param {!proto.user.SegmentSearchParams} msg The msg instance to transform.
1242
+ * @return {!Object}
1243
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1244
+ */
1245
+ proto.user.SegmentSearchParams.toObject = function(includeInstance, msg) {
1246
+ var f, obj = {
1247
+ type: jspb.Message.getFieldWithDefault(msg, 1, "")
1248
+ };
1249
+
1250
+ if (includeInstance) {
1251
+ obj.$jspbMessageInstance = msg;
1252
+ }
1253
+ return obj;
1254
+ };
1255
+ }
1256
+
1257
+
1258
+ /**
1259
+ * Deserializes binary data (in protobuf wire format).
1260
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1261
+ * @return {!proto.user.SegmentSearchParams}
1262
+ */
1263
+ proto.user.SegmentSearchParams.deserializeBinary = function(bytes) {
1264
+ var reader = new jspb.BinaryReader(bytes);
1265
+ var msg = new proto.user.SegmentSearchParams;
1266
+ return proto.user.SegmentSearchParams.deserializeBinaryFromReader(msg, reader);
1267
+ };
1268
+
1269
+
1270
+ /**
1271
+ * Deserializes binary data (in protobuf wire format) from the
1272
+ * given reader into the given message object.
1273
+ * @param {!proto.user.SegmentSearchParams} msg The message object to deserialize into.
1274
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1275
+ * @return {!proto.user.SegmentSearchParams}
1276
+ */
1277
+ proto.user.SegmentSearchParams.deserializeBinaryFromReader = function(msg, reader) {
1278
+ while (reader.nextField()) {
1279
+ if (reader.isEndGroup()) {
1280
+ break;
1281
+ }
1282
+ var field = reader.getFieldNumber();
1283
+ switch (field) {
1284
+ case 1:
1285
+ var value = /** @type {string} */ (reader.readString());
1286
+ msg.setType(value);
1287
+ break;
1288
+ default:
1289
+ reader.skipField();
1290
+ break;
1291
+ }
1292
+ }
1293
+ return msg;
1294
+ };
1295
+
1296
+
1297
+ /**
1298
+ * Serializes the message to binary data (in protobuf wire format).
1299
+ * @return {!Uint8Array}
1300
+ */
1301
+ proto.user.SegmentSearchParams.prototype.serializeBinary = function() {
1302
+ var writer = new jspb.BinaryWriter();
1303
+ proto.user.SegmentSearchParams.serializeBinaryToWriter(this, writer);
1304
+ return writer.getResultBuffer();
1305
+ };
1306
+
1307
+
1308
+ /**
1309
+ * Serializes the given message to binary data (in protobuf wire
1310
+ * format), writing to the given BinaryWriter.
1311
+ * @param {!proto.user.SegmentSearchParams} message
1312
+ * @param {!jspb.BinaryWriter} writer
1313
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1314
+ */
1315
+ proto.user.SegmentSearchParams.serializeBinaryToWriter = function(message, writer) {
1316
+ var f = undefined;
1317
+ f = message.getType();
1318
+ if (f.length > 0) {
1319
+ writer.writeString(
1320
+ 1,
1321
+ f
1322
+ );
1323
+ }
1324
+ };
1325
+
1326
+
1327
+ /**
1328
+ * optional string type = 1;
1329
+ * @return {string}
1330
+ */
1331
+ proto.user.SegmentSearchParams.prototype.getType = function() {
1332
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1333
+ };
1334
+
1335
+
1336
+ /**
1337
+ * @param {string} value
1338
+ * @return {!proto.user.SegmentSearchParams} returns this
1339
+ */
1340
+ proto.user.SegmentSearchParams.prototype.setType = function(value) {
1341
+ return jspb.Message.setProto3StringField(this, 1, value);
1342
+ };
1343
+
1344
+
1345
+
1346
+
1347
+
1145
1348
  if (jspb.Message.GENERATE_TO_OBJECT) {
1146
1349
  /**
1147
1350
  * Creates an object representation of this proto.