@aldiokta/protocgen 1.1.51 → 1.1.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/package.json +1 -1
  2. package/prisca/v1/bidding/bidding_grpc_pb.js +23 -0
  3. package/prisca/v1/bidding/bidding_pb.js +463 -2
  4. package/prisca/v1/budget/budget_grpc_pb.js +213 -0
  5. package/prisca/v1/budget/budget_pb.js +3008 -0
  6. package/prisca/v1/budget_activity/budget_activity_grpc_pb.js +212 -0
  7. package/prisca/v1/budget_activity/budget_activity_pb.js +2886 -0
  8. package/prisca/v1/budget_categories/budget_categories_grpc_pb.js +212 -0
  9. package/prisca/v1/budget_categories/budget_categories_pb.js +2916 -0
  10. package/prisca/v1/budget_planning/budget_planning_grpc_pb.js +214 -0
  11. package/prisca/v1/budget_planning/budget_planning_pb.js +3682 -0
  12. package/prisca/v1/business_fields/business_fields_grpc_pb.js +33 -0
  13. package/prisca/v1/business_fields/business_fields_pb.js +356 -0
  14. package/prisca/v1/core/access_api/access_api_grpc_pb.js +204 -0
  15. package/prisca/v1/core/access_api/access_api_pb.js +3024 -0
  16. package/prisca/v1/core/access_manager/access_manager_grpc_pb.js +66 -0
  17. package/prisca/v1/core/access_manager/access_manager_pb.js +1758 -19
  18. package/prisca/v1/core/attribute/attribute_grpc_pb.js +474 -0
  19. package/prisca/v1/core/attribute/attribute_pb.js +6550 -0
  20. package/prisca/v1/core/auth/auth_grpc_pb.js +22 -0
  21. package/prisca/v1/core/auth/auth_pb.js +152 -0
  22. package/prisca/v1/core/commodity/commodity_grpc_pb.js +156 -0
  23. package/prisca/v1/core/commodity/commodity_pb.js +1988 -0
  24. package/prisca/v1/core/employee/employee_grpc_pb.js +14 -3
  25. package/prisca/v1/core/employee/employee_pb.js +203 -0
  26. package/prisca/v1/core/identity_provider/identity_provider_grpc_pb.js +156 -0
  27. package/prisca/v1/core/identity_provider/identity_provider_pb.js +2018 -0
  28. package/prisca/v1/core/item_transaction/item_transaction_pb.js +102 -12
  29. package/prisca/v1/core/line_of_approval_delegation/line_of_approval_delegation_pb.js +65 -35
  30. package/prisca/v1/core/material/material_grpc_pb.js +2 -0
  31. package/prisca/v1/core/material/material_pb.js +420 -2
  32. package/prisca/v1/core/messaging/email_template_grpc_pb.js +33 -0
  33. package/prisca/v1/core/messaging/email_template_pb.js +385 -0
  34. package/prisca/v1/core/number_range/number_range_grpc_pb.js +33 -0
  35. package/prisca/v1/core/number_range/number_range_pb.js +385 -0
  36. package/prisca/v1/core/report/report_pb.js +31 -1
  37. package/prisca/v1/core/tax_code/tax_code_pb.js +14 -14
  38. package/prisca/v1/core/transaction_builder/transaction_builder_grpc_pb.js +33 -0
  39. package/prisca/v1/core/transaction_builder/transaction_builder_pb.js +364 -0
  40. package/prisca/v1/core/users/users_grpc_pb.js +1 -0
  41. package/prisca/v1/core/users/users_pb.js +2 -0
  42. package/prisca/v1/delivery_order/delivery_order_grpc_pb.js +33 -0
  43. package/prisca/v1/delivery_order/delivery_order_pb.js +31 -1
  44. package/prisca/v1/good_receipt/good_receipt_grpc_pb.js +33 -0
  45. package/prisca/v1/good_receipt/good_receipt_pb.js +36 -6
  46. package/prisca/v1/invoice/invoice_grpc_pb.js +33 -0
  47. package/prisca/v1/purchase_order/purchase_order_grpc_pb.js +33 -0
  48. package/prisca/v1/purchase_order/purchase_order_pb.js +717 -29
  49. package/prisca/v1/purchase_requisition_trx/purchase_requisition_trx_grpc_pb.js +35 -0
  50. package/prisca/v1/purchase_requisition_trx/purchase_requisition_trx_pb.js +112 -57
  51. package/prisca/v1/quotation/quotation_pb.js +55 -2
  52. package/prisca/v1/request_for_quotation/request_for_quotation_pb.js +0 -123
  53. package/prisca/v1/vendor_domain/vendor_domain_grpc_pb.js +34 -0
  54. package/prisca/v1/vendor_domain/vendor_domain_pb.js +1365 -0
@@ -0,0 +1,1988 @@
1
+ // source: prisca/v1/core/commodity/commodity.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 = globalThis;
17
+
18
+ var prisca_v1_global_meta_meta_pb = require('../../../../prisca/v1/global/meta/meta_pb.js');
19
+ goog.object.extend(proto, prisca_v1_global_meta_meta_pb);
20
+ var prisca_v1_core_company_company_pb = require('../../../../prisca/v1/core/company/company_pb.js');
21
+ goog.object.extend(proto, prisca_v1_core_company_company_pb);
22
+ goog.exportSymbol('proto.BaseCommodity', null, global);
23
+ goog.exportSymbol('proto.Commodity', null, global);
24
+ goog.exportSymbol('proto.CommodityGetByIdRequest', null, global);
25
+ goog.exportSymbol('proto.CreateCommodityRequest', null, global);
26
+ goog.exportSymbol('proto.DeleteCommodityRequest', null, global);
27
+ goog.exportSymbol('proto.DeleteCommodityResponse', null, global);
28
+ goog.exportSymbol('proto.GetListCommodityRequest', null, global);
29
+ goog.exportSymbol('proto.GetListCommodityResponse', null, global);
30
+ goog.exportSymbol('proto.UpdateCommodityRequest', null, global);
31
+ /**
32
+ * Generated by JsPbCodeGenerator.
33
+ * @param {Array=} opt_data Optional initial data array, typically from a
34
+ * server response, or constructed directly in Javascript. The array is used
35
+ * in place and becomes part of the constructed object. It is not cloned.
36
+ * If no data is provided, the constructed object will be empty, but still
37
+ * valid.
38
+ * @extends {jspb.Message}
39
+ * @constructor
40
+ */
41
+ proto.Commodity = function(opt_data) {
42
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
43
+ };
44
+ goog.inherits(proto.Commodity, jspb.Message);
45
+ if (goog.DEBUG && !COMPILED) {
46
+ /**
47
+ * @public
48
+ * @override
49
+ */
50
+ proto.Commodity.displayName = 'proto.Commodity';
51
+ }
52
+ /**
53
+ * Generated by JsPbCodeGenerator.
54
+ * @param {Array=} opt_data Optional initial data array, typically from a
55
+ * server response, or constructed directly in Javascript. The array is used
56
+ * in place and becomes part of the constructed object. It is not cloned.
57
+ * If no data is provided, the constructed object will be empty, but still
58
+ * valid.
59
+ * @extends {jspb.Message}
60
+ * @constructor
61
+ */
62
+ proto.BaseCommodity = function(opt_data) {
63
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
64
+ };
65
+ goog.inherits(proto.BaseCommodity, jspb.Message);
66
+ if (goog.DEBUG && !COMPILED) {
67
+ /**
68
+ * @public
69
+ * @override
70
+ */
71
+ proto.BaseCommodity.displayName = 'proto.BaseCommodity';
72
+ }
73
+ /**
74
+ * Generated by JsPbCodeGenerator.
75
+ * @param {Array=} opt_data Optional initial data array, typically from a
76
+ * server response, or constructed directly in Javascript. The array is used
77
+ * in place and becomes part of the constructed object. It is not cloned.
78
+ * If no data is provided, the constructed object will be empty, but still
79
+ * valid.
80
+ * @extends {jspb.Message}
81
+ * @constructor
82
+ */
83
+ proto.CommodityGetByIdRequest = function(opt_data) {
84
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
85
+ };
86
+ goog.inherits(proto.CommodityGetByIdRequest, jspb.Message);
87
+ if (goog.DEBUG && !COMPILED) {
88
+ /**
89
+ * @public
90
+ * @override
91
+ */
92
+ proto.CommodityGetByIdRequest.displayName = 'proto.CommodityGetByIdRequest';
93
+ }
94
+ /**
95
+ * Generated by JsPbCodeGenerator.
96
+ * @param {Array=} opt_data Optional initial data array, typically from a
97
+ * server response, or constructed directly in Javascript. The array is used
98
+ * in place and becomes part of the constructed object. It is not cloned.
99
+ * If no data is provided, the constructed object will be empty, but still
100
+ * valid.
101
+ * @extends {jspb.Message}
102
+ * @constructor
103
+ */
104
+ proto.CreateCommodityRequest = function(opt_data) {
105
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
106
+ };
107
+ goog.inherits(proto.CreateCommodityRequest, jspb.Message);
108
+ if (goog.DEBUG && !COMPILED) {
109
+ /**
110
+ * @public
111
+ * @override
112
+ */
113
+ proto.CreateCommodityRequest.displayName = 'proto.CreateCommodityRequest';
114
+ }
115
+ /**
116
+ * Generated by JsPbCodeGenerator.
117
+ * @param {Array=} opt_data Optional initial data array, typically from a
118
+ * server response, or constructed directly in Javascript. The array is used
119
+ * in place and becomes part of the constructed object. It is not cloned.
120
+ * If no data is provided, the constructed object will be empty, but still
121
+ * valid.
122
+ * @extends {jspb.Message}
123
+ * @constructor
124
+ */
125
+ proto.UpdateCommodityRequest = function(opt_data) {
126
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
127
+ };
128
+ goog.inherits(proto.UpdateCommodityRequest, jspb.Message);
129
+ if (goog.DEBUG && !COMPILED) {
130
+ /**
131
+ * @public
132
+ * @override
133
+ */
134
+ proto.UpdateCommodityRequest.displayName = 'proto.UpdateCommodityRequest';
135
+ }
136
+ /**
137
+ * Generated by JsPbCodeGenerator.
138
+ * @param {Array=} opt_data Optional initial data array, typically from a
139
+ * server response, or constructed directly in Javascript. The array is used
140
+ * in place and becomes part of the constructed object. It is not cloned.
141
+ * If no data is provided, the constructed object will be empty, but still
142
+ * valid.
143
+ * @extends {jspb.Message}
144
+ * @constructor
145
+ */
146
+ proto.DeleteCommodityRequest = function(opt_data) {
147
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.DeleteCommodityRequest.repeatedFields_, null);
148
+ };
149
+ goog.inherits(proto.DeleteCommodityRequest, jspb.Message);
150
+ if (goog.DEBUG && !COMPILED) {
151
+ /**
152
+ * @public
153
+ * @override
154
+ */
155
+ proto.DeleteCommodityRequest.displayName = 'proto.DeleteCommodityRequest';
156
+ }
157
+ /**
158
+ * Generated by JsPbCodeGenerator.
159
+ * @param {Array=} opt_data Optional initial data array, typically from a
160
+ * server response, or constructed directly in Javascript. The array is used
161
+ * in place and becomes part of the constructed object. It is not cloned.
162
+ * If no data is provided, the constructed object will be empty, but still
163
+ * valid.
164
+ * @extends {jspb.Message}
165
+ * @constructor
166
+ */
167
+ proto.DeleteCommodityResponse = function(opt_data) {
168
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.DeleteCommodityResponse.repeatedFields_, null);
169
+ };
170
+ goog.inherits(proto.DeleteCommodityResponse, jspb.Message);
171
+ if (goog.DEBUG && !COMPILED) {
172
+ /**
173
+ * @public
174
+ * @override
175
+ */
176
+ proto.DeleteCommodityResponse.displayName = 'proto.DeleteCommodityResponse';
177
+ }
178
+ /**
179
+ * Generated by JsPbCodeGenerator.
180
+ * @param {Array=} opt_data Optional initial data array, typically from a
181
+ * server response, or constructed directly in Javascript. The array is used
182
+ * in place and becomes part of the constructed object. It is not cloned.
183
+ * If no data is provided, the constructed object will be empty, but still
184
+ * valid.
185
+ * @extends {jspb.Message}
186
+ * @constructor
187
+ */
188
+ proto.GetListCommodityRequest = function(opt_data) {
189
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
190
+ };
191
+ goog.inherits(proto.GetListCommodityRequest, jspb.Message);
192
+ if (goog.DEBUG && !COMPILED) {
193
+ /**
194
+ * @public
195
+ * @override
196
+ */
197
+ proto.GetListCommodityRequest.displayName = 'proto.GetListCommodityRequest';
198
+ }
199
+ /**
200
+ * Generated by JsPbCodeGenerator.
201
+ * @param {Array=} opt_data Optional initial data array, typically from a
202
+ * server response, or constructed directly in Javascript. The array is used
203
+ * in place and becomes part of the constructed object. It is not cloned.
204
+ * If no data is provided, the constructed object will be empty, but still
205
+ * valid.
206
+ * @extends {jspb.Message}
207
+ * @constructor
208
+ */
209
+ proto.GetListCommodityResponse = function(opt_data) {
210
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.GetListCommodityResponse.repeatedFields_, null);
211
+ };
212
+ goog.inherits(proto.GetListCommodityResponse, jspb.Message);
213
+ if (goog.DEBUG && !COMPILED) {
214
+ /**
215
+ * @public
216
+ * @override
217
+ */
218
+ proto.GetListCommodityResponse.displayName = 'proto.GetListCommodityResponse';
219
+ }
220
+
221
+
222
+
223
+ if (jspb.Message.GENERATE_TO_OBJECT) {
224
+ /**
225
+ * Creates an object representation of this proto.
226
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
227
+ * Optional fields that are not set will be set to undefined.
228
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
229
+ * For the list of reserved names please see:
230
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
231
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
232
+ * JSPB instance for transitional soy proto support:
233
+ * http://goto/soy-param-migration
234
+ * @return {!Object}
235
+ */
236
+ proto.Commodity.prototype.toObject = function(opt_includeInstance) {
237
+ return proto.Commodity.toObject(opt_includeInstance, this);
238
+ };
239
+
240
+
241
+ /**
242
+ * Static version of the {@see toObject} method.
243
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
244
+ * the JSPB instance for transitional soy proto support:
245
+ * http://goto/soy-param-migration
246
+ * @param {!proto.Commodity} msg The msg instance to transform.
247
+ * @return {!Object}
248
+ * @suppress {unusedLocalVariables} f is only used for nested messages
249
+ */
250
+ proto.Commodity.toObject = function(includeInstance, msg) {
251
+ var f, obj = {
252
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
253
+ name: jspb.Message.getFieldWithDefault(msg, 2, ""),
254
+ referencesId: jspb.Message.getFieldWithDefault(msg, 3, ""),
255
+ createdAt: jspb.Message.getFieldWithDefault(msg, 4, ""),
256
+ updatedAt: jspb.Message.getFieldWithDefault(msg, 5, ""),
257
+ createdBy: jspb.Message.getFieldWithDefault(msg, 6, ""),
258
+ updatedBy: jspb.Message.getFieldWithDefault(msg, 7, ""),
259
+ companiesReferencesId: jspb.Message.getFieldWithDefault(msg, 8, ""),
260
+ code: jspb.Message.getFieldWithDefault(msg, 9, "")
261
+ };
262
+
263
+ if (includeInstance) {
264
+ obj.$jspbMessageInstance = msg;
265
+ }
266
+ return obj;
267
+ };
268
+ }
269
+
270
+
271
+ /**
272
+ * Deserializes binary data (in protobuf wire format).
273
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
274
+ * @return {!proto.Commodity}
275
+ */
276
+ proto.Commodity.deserializeBinary = function(bytes) {
277
+ var reader = new jspb.BinaryReader(bytes);
278
+ var msg = new proto.Commodity;
279
+ return proto.Commodity.deserializeBinaryFromReader(msg, reader);
280
+ };
281
+
282
+
283
+ /**
284
+ * Deserializes binary data (in protobuf wire format) from the
285
+ * given reader into the given message object.
286
+ * @param {!proto.Commodity} msg The message object to deserialize into.
287
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
288
+ * @return {!proto.Commodity}
289
+ */
290
+ proto.Commodity.deserializeBinaryFromReader = function(msg, reader) {
291
+ while (reader.nextField()) {
292
+ if (reader.isEndGroup()) {
293
+ break;
294
+ }
295
+ var field = reader.getFieldNumber();
296
+ switch (field) {
297
+ case 1:
298
+ var value = /** @type {number} */ (reader.readInt64());
299
+ msg.setId(value);
300
+ break;
301
+ case 2:
302
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
303
+ msg.setName(value);
304
+ break;
305
+ case 3:
306
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
307
+ msg.setReferencesId(value);
308
+ break;
309
+ case 4:
310
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
311
+ msg.setCreatedAt(value);
312
+ break;
313
+ case 5:
314
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
315
+ msg.setUpdatedAt(value);
316
+ break;
317
+ case 6:
318
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
319
+ msg.setCreatedBy(value);
320
+ break;
321
+ case 7:
322
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
323
+ msg.setUpdatedBy(value);
324
+ break;
325
+ case 8:
326
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
327
+ msg.setCompaniesReferencesId(value);
328
+ break;
329
+ case 9:
330
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
331
+ msg.setCode(value);
332
+ break;
333
+ default:
334
+ reader.skipField();
335
+ break;
336
+ }
337
+ }
338
+ return msg;
339
+ };
340
+
341
+
342
+ /**
343
+ * Serializes the message to binary data (in protobuf wire format).
344
+ * @return {!Uint8Array}
345
+ */
346
+ proto.Commodity.prototype.serializeBinary = function() {
347
+ var writer = new jspb.BinaryWriter();
348
+ proto.Commodity.serializeBinaryToWriter(this, writer);
349
+ return writer.getResultBuffer();
350
+ };
351
+
352
+
353
+ /**
354
+ * Serializes the given message to binary data (in protobuf wire
355
+ * format), writing to the given BinaryWriter.
356
+ * @param {!proto.Commodity} message
357
+ * @param {!jspb.BinaryWriter} writer
358
+ * @suppress {unusedLocalVariables} f is only used for nested messages
359
+ */
360
+ proto.Commodity.serializeBinaryToWriter = function(message, writer) {
361
+ var f = undefined;
362
+ f = message.getId();
363
+ if (f !== 0) {
364
+ writer.writeInt64(
365
+ 1,
366
+ f
367
+ );
368
+ }
369
+ f = message.getName();
370
+ if (f.length > 0) {
371
+ writer.writeString(
372
+ 2,
373
+ f
374
+ );
375
+ }
376
+ f = message.getReferencesId();
377
+ if (f.length > 0) {
378
+ writer.writeString(
379
+ 3,
380
+ f
381
+ );
382
+ }
383
+ f = message.getCreatedAt();
384
+ if (f.length > 0) {
385
+ writer.writeString(
386
+ 4,
387
+ f
388
+ );
389
+ }
390
+ f = message.getUpdatedAt();
391
+ if (f.length > 0) {
392
+ writer.writeString(
393
+ 5,
394
+ f
395
+ );
396
+ }
397
+ f = message.getCreatedBy();
398
+ if (f.length > 0) {
399
+ writer.writeString(
400
+ 6,
401
+ f
402
+ );
403
+ }
404
+ f = message.getUpdatedBy();
405
+ if (f.length > 0) {
406
+ writer.writeString(
407
+ 7,
408
+ f
409
+ );
410
+ }
411
+ f = message.getCompaniesReferencesId();
412
+ if (f.length > 0) {
413
+ writer.writeString(
414
+ 8,
415
+ f
416
+ );
417
+ }
418
+ f = message.getCode();
419
+ if (f.length > 0) {
420
+ writer.writeString(
421
+ 9,
422
+ f
423
+ );
424
+ }
425
+ };
426
+
427
+
428
+ /**
429
+ * optional int64 id = 1;
430
+ * @return {number}
431
+ */
432
+ proto.Commodity.prototype.getId = function() {
433
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
434
+ };
435
+
436
+
437
+ /**
438
+ * @param {number} value
439
+ * @return {!proto.Commodity} returns this
440
+ */
441
+ proto.Commodity.prototype.setId = function(value) {
442
+ return jspb.Message.setProto3IntField(this, 1, value);
443
+ };
444
+
445
+
446
+ /**
447
+ * optional string name = 2;
448
+ * @return {string}
449
+ */
450
+ proto.Commodity.prototype.getName = function() {
451
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
452
+ };
453
+
454
+
455
+ /**
456
+ * @param {string} value
457
+ * @return {!proto.Commodity} returns this
458
+ */
459
+ proto.Commodity.prototype.setName = function(value) {
460
+ return jspb.Message.setProto3StringField(this, 2, value);
461
+ };
462
+
463
+
464
+ /**
465
+ * optional string references_id = 3;
466
+ * @return {string}
467
+ */
468
+ proto.Commodity.prototype.getReferencesId = function() {
469
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
470
+ };
471
+
472
+
473
+ /**
474
+ * @param {string} value
475
+ * @return {!proto.Commodity} returns this
476
+ */
477
+ proto.Commodity.prototype.setReferencesId = function(value) {
478
+ return jspb.Message.setProto3StringField(this, 3, value);
479
+ };
480
+
481
+
482
+ /**
483
+ * optional string created_at = 4;
484
+ * @return {string}
485
+ */
486
+ proto.Commodity.prototype.getCreatedAt = function() {
487
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
488
+ };
489
+
490
+
491
+ /**
492
+ * @param {string} value
493
+ * @return {!proto.Commodity} returns this
494
+ */
495
+ proto.Commodity.prototype.setCreatedAt = function(value) {
496
+ return jspb.Message.setProto3StringField(this, 4, value);
497
+ };
498
+
499
+
500
+ /**
501
+ * optional string updated_at = 5;
502
+ * @return {string}
503
+ */
504
+ proto.Commodity.prototype.getUpdatedAt = function() {
505
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
506
+ };
507
+
508
+
509
+ /**
510
+ * @param {string} value
511
+ * @return {!proto.Commodity} returns this
512
+ */
513
+ proto.Commodity.prototype.setUpdatedAt = function(value) {
514
+ return jspb.Message.setProto3StringField(this, 5, value);
515
+ };
516
+
517
+
518
+ /**
519
+ * optional string created_by = 6;
520
+ * @return {string}
521
+ */
522
+ proto.Commodity.prototype.getCreatedBy = function() {
523
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
524
+ };
525
+
526
+
527
+ /**
528
+ * @param {string} value
529
+ * @return {!proto.Commodity} returns this
530
+ */
531
+ proto.Commodity.prototype.setCreatedBy = function(value) {
532
+ return jspb.Message.setProto3StringField(this, 6, value);
533
+ };
534
+
535
+
536
+ /**
537
+ * optional string updated_by = 7;
538
+ * @return {string}
539
+ */
540
+ proto.Commodity.prototype.getUpdatedBy = function() {
541
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
542
+ };
543
+
544
+
545
+ /**
546
+ * @param {string} value
547
+ * @return {!proto.Commodity} returns this
548
+ */
549
+ proto.Commodity.prototype.setUpdatedBy = function(value) {
550
+ return jspb.Message.setProto3StringField(this, 7, value);
551
+ };
552
+
553
+
554
+ /**
555
+ * optional string companies_references_id = 8;
556
+ * @return {string}
557
+ */
558
+ proto.Commodity.prototype.getCompaniesReferencesId = function() {
559
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
560
+ };
561
+
562
+
563
+ /**
564
+ * @param {string} value
565
+ * @return {!proto.Commodity} returns this
566
+ */
567
+ proto.Commodity.prototype.setCompaniesReferencesId = function(value) {
568
+ return jspb.Message.setProto3StringField(this, 8, value);
569
+ };
570
+
571
+
572
+ /**
573
+ * optional string code = 9;
574
+ * @return {string}
575
+ */
576
+ proto.Commodity.prototype.getCode = function() {
577
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
578
+ };
579
+
580
+
581
+ /**
582
+ * @param {string} value
583
+ * @return {!proto.Commodity} returns this
584
+ */
585
+ proto.Commodity.prototype.setCode = function(value) {
586
+ return jspb.Message.setProto3StringField(this, 9, value);
587
+ };
588
+
589
+
590
+
591
+
592
+
593
+ if (jspb.Message.GENERATE_TO_OBJECT) {
594
+ /**
595
+ * Creates an object representation of this proto.
596
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
597
+ * Optional fields that are not set will be set to undefined.
598
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
599
+ * For the list of reserved names please see:
600
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
601
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
602
+ * JSPB instance for transitional soy proto support:
603
+ * http://goto/soy-param-migration
604
+ * @return {!Object}
605
+ */
606
+ proto.BaseCommodity.prototype.toObject = function(opt_includeInstance) {
607
+ return proto.BaseCommodity.toObject(opt_includeInstance, this);
608
+ };
609
+
610
+
611
+ /**
612
+ * Static version of the {@see toObject} method.
613
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
614
+ * the JSPB instance for transitional soy proto support:
615
+ * http://goto/soy-param-migration
616
+ * @param {!proto.BaseCommodity} msg The msg instance to transform.
617
+ * @return {!Object}
618
+ * @suppress {unusedLocalVariables} f is only used for nested messages
619
+ */
620
+ proto.BaseCommodity.toObject = function(includeInstance, msg) {
621
+ var f, obj = {
622
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
623
+ name: jspb.Message.getFieldWithDefault(msg, 2, ""),
624
+ code: jspb.Message.getFieldWithDefault(msg, 3, "")
625
+ };
626
+
627
+ if (includeInstance) {
628
+ obj.$jspbMessageInstance = msg;
629
+ }
630
+ return obj;
631
+ };
632
+ }
633
+
634
+
635
+ /**
636
+ * Deserializes binary data (in protobuf wire format).
637
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
638
+ * @return {!proto.BaseCommodity}
639
+ */
640
+ proto.BaseCommodity.deserializeBinary = function(bytes) {
641
+ var reader = new jspb.BinaryReader(bytes);
642
+ var msg = new proto.BaseCommodity;
643
+ return proto.BaseCommodity.deserializeBinaryFromReader(msg, reader);
644
+ };
645
+
646
+
647
+ /**
648
+ * Deserializes binary data (in protobuf wire format) from the
649
+ * given reader into the given message object.
650
+ * @param {!proto.BaseCommodity} msg The message object to deserialize into.
651
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
652
+ * @return {!proto.BaseCommodity}
653
+ */
654
+ proto.BaseCommodity.deserializeBinaryFromReader = function(msg, reader) {
655
+ while (reader.nextField()) {
656
+ if (reader.isEndGroup()) {
657
+ break;
658
+ }
659
+ var field = reader.getFieldNumber();
660
+ switch (field) {
661
+ case 1:
662
+ var value = /** @type {number} */ (reader.readInt64());
663
+ msg.setId(value);
664
+ break;
665
+ case 2:
666
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
667
+ msg.setName(value);
668
+ break;
669
+ case 3:
670
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
671
+ msg.setCode(value);
672
+ break;
673
+ default:
674
+ reader.skipField();
675
+ break;
676
+ }
677
+ }
678
+ return msg;
679
+ };
680
+
681
+
682
+ /**
683
+ * Serializes the message to binary data (in protobuf wire format).
684
+ * @return {!Uint8Array}
685
+ */
686
+ proto.BaseCommodity.prototype.serializeBinary = function() {
687
+ var writer = new jspb.BinaryWriter();
688
+ proto.BaseCommodity.serializeBinaryToWriter(this, writer);
689
+ return writer.getResultBuffer();
690
+ };
691
+
692
+
693
+ /**
694
+ * Serializes the given message to binary data (in protobuf wire
695
+ * format), writing to the given BinaryWriter.
696
+ * @param {!proto.BaseCommodity} message
697
+ * @param {!jspb.BinaryWriter} writer
698
+ * @suppress {unusedLocalVariables} f is only used for nested messages
699
+ */
700
+ proto.BaseCommodity.serializeBinaryToWriter = function(message, writer) {
701
+ var f = undefined;
702
+ f = message.getId();
703
+ if (f !== 0) {
704
+ writer.writeInt64(
705
+ 1,
706
+ f
707
+ );
708
+ }
709
+ f = message.getName();
710
+ if (f.length > 0) {
711
+ writer.writeString(
712
+ 2,
713
+ f
714
+ );
715
+ }
716
+ f = message.getCode();
717
+ if (f.length > 0) {
718
+ writer.writeString(
719
+ 3,
720
+ f
721
+ );
722
+ }
723
+ };
724
+
725
+
726
+ /**
727
+ * optional int64 id = 1;
728
+ * @return {number}
729
+ */
730
+ proto.BaseCommodity.prototype.getId = function() {
731
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
732
+ };
733
+
734
+
735
+ /**
736
+ * @param {number} value
737
+ * @return {!proto.BaseCommodity} returns this
738
+ */
739
+ proto.BaseCommodity.prototype.setId = function(value) {
740
+ return jspb.Message.setProto3IntField(this, 1, value);
741
+ };
742
+
743
+
744
+ /**
745
+ * optional string name = 2;
746
+ * @return {string}
747
+ */
748
+ proto.BaseCommodity.prototype.getName = function() {
749
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
750
+ };
751
+
752
+
753
+ /**
754
+ * @param {string} value
755
+ * @return {!proto.BaseCommodity} returns this
756
+ */
757
+ proto.BaseCommodity.prototype.setName = function(value) {
758
+ return jspb.Message.setProto3StringField(this, 2, value);
759
+ };
760
+
761
+
762
+ /**
763
+ * optional string code = 3;
764
+ * @return {string}
765
+ */
766
+ proto.BaseCommodity.prototype.getCode = function() {
767
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
768
+ };
769
+
770
+
771
+ /**
772
+ * @param {string} value
773
+ * @return {!proto.BaseCommodity} returns this
774
+ */
775
+ proto.BaseCommodity.prototype.setCode = function(value) {
776
+ return jspb.Message.setProto3StringField(this, 3, value);
777
+ };
778
+
779
+
780
+
781
+
782
+
783
+ if (jspb.Message.GENERATE_TO_OBJECT) {
784
+ /**
785
+ * Creates an object representation of this proto.
786
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
787
+ * Optional fields that are not set will be set to undefined.
788
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
789
+ * For the list of reserved names please see:
790
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
791
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
792
+ * JSPB instance for transitional soy proto support:
793
+ * http://goto/soy-param-migration
794
+ * @return {!Object}
795
+ */
796
+ proto.CommodityGetByIdRequest.prototype.toObject = function(opt_includeInstance) {
797
+ return proto.CommodityGetByIdRequest.toObject(opt_includeInstance, this);
798
+ };
799
+
800
+
801
+ /**
802
+ * Static version of the {@see toObject} method.
803
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
804
+ * the JSPB instance for transitional soy proto support:
805
+ * http://goto/soy-param-migration
806
+ * @param {!proto.CommodityGetByIdRequest} msg The msg instance to transform.
807
+ * @return {!Object}
808
+ * @suppress {unusedLocalVariables} f is only used for nested messages
809
+ */
810
+ proto.CommodityGetByIdRequest.toObject = function(includeInstance, msg) {
811
+ var f, obj = {
812
+ referencesId: jspb.Message.getFieldWithDefault(msg, 1, "")
813
+ };
814
+
815
+ if (includeInstance) {
816
+ obj.$jspbMessageInstance = msg;
817
+ }
818
+ return obj;
819
+ };
820
+ }
821
+
822
+
823
+ /**
824
+ * Deserializes binary data (in protobuf wire format).
825
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
826
+ * @return {!proto.CommodityGetByIdRequest}
827
+ */
828
+ proto.CommodityGetByIdRequest.deserializeBinary = function(bytes) {
829
+ var reader = new jspb.BinaryReader(bytes);
830
+ var msg = new proto.CommodityGetByIdRequest;
831
+ return proto.CommodityGetByIdRequest.deserializeBinaryFromReader(msg, reader);
832
+ };
833
+
834
+
835
+ /**
836
+ * Deserializes binary data (in protobuf wire format) from the
837
+ * given reader into the given message object.
838
+ * @param {!proto.CommodityGetByIdRequest} msg The message object to deserialize into.
839
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
840
+ * @return {!proto.CommodityGetByIdRequest}
841
+ */
842
+ proto.CommodityGetByIdRequest.deserializeBinaryFromReader = function(msg, reader) {
843
+ while (reader.nextField()) {
844
+ if (reader.isEndGroup()) {
845
+ break;
846
+ }
847
+ var field = reader.getFieldNumber();
848
+ switch (field) {
849
+ case 1:
850
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
851
+ msg.setReferencesId(value);
852
+ break;
853
+ default:
854
+ reader.skipField();
855
+ break;
856
+ }
857
+ }
858
+ return msg;
859
+ };
860
+
861
+
862
+ /**
863
+ * Serializes the message to binary data (in protobuf wire format).
864
+ * @return {!Uint8Array}
865
+ */
866
+ proto.CommodityGetByIdRequest.prototype.serializeBinary = function() {
867
+ var writer = new jspb.BinaryWriter();
868
+ proto.CommodityGetByIdRequest.serializeBinaryToWriter(this, writer);
869
+ return writer.getResultBuffer();
870
+ };
871
+
872
+
873
+ /**
874
+ * Serializes the given message to binary data (in protobuf wire
875
+ * format), writing to the given BinaryWriter.
876
+ * @param {!proto.CommodityGetByIdRequest} message
877
+ * @param {!jspb.BinaryWriter} writer
878
+ * @suppress {unusedLocalVariables} f is only used for nested messages
879
+ */
880
+ proto.CommodityGetByIdRequest.serializeBinaryToWriter = function(message, writer) {
881
+ var f = undefined;
882
+ f = message.getReferencesId();
883
+ if (f.length > 0) {
884
+ writer.writeString(
885
+ 1,
886
+ f
887
+ );
888
+ }
889
+ };
890
+
891
+
892
+ /**
893
+ * optional string references_id = 1;
894
+ * @return {string}
895
+ */
896
+ proto.CommodityGetByIdRequest.prototype.getReferencesId = function() {
897
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
898
+ };
899
+
900
+
901
+ /**
902
+ * @param {string} value
903
+ * @return {!proto.CommodityGetByIdRequest} returns this
904
+ */
905
+ proto.CommodityGetByIdRequest.prototype.setReferencesId = function(value) {
906
+ return jspb.Message.setProto3StringField(this, 1, value);
907
+ };
908
+
909
+
910
+
911
+
912
+
913
+ if (jspb.Message.GENERATE_TO_OBJECT) {
914
+ /**
915
+ * Creates an object representation of this proto.
916
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
917
+ * Optional fields that are not set will be set to undefined.
918
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
919
+ * For the list of reserved names please see:
920
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
921
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
922
+ * JSPB instance for transitional soy proto support:
923
+ * http://goto/soy-param-migration
924
+ * @return {!Object}
925
+ */
926
+ proto.CreateCommodityRequest.prototype.toObject = function(opt_includeInstance) {
927
+ return proto.CreateCommodityRequest.toObject(opt_includeInstance, this);
928
+ };
929
+
930
+
931
+ /**
932
+ * Static version of the {@see toObject} method.
933
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
934
+ * the JSPB instance for transitional soy proto support:
935
+ * http://goto/soy-param-migration
936
+ * @param {!proto.CreateCommodityRequest} msg The msg instance to transform.
937
+ * @return {!Object}
938
+ * @suppress {unusedLocalVariables} f is only used for nested messages
939
+ */
940
+ proto.CreateCommodityRequest.toObject = function(includeInstance, msg) {
941
+ var f, obj = {
942
+ commodity: (f = msg.getCommodity()) && proto.BaseCommodity.toObject(includeInstance, f)
943
+ };
944
+
945
+ if (includeInstance) {
946
+ obj.$jspbMessageInstance = msg;
947
+ }
948
+ return obj;
949
+ };
950
+ }
951
+
952
+
953
+ /**
954
+ * Deserializes binary data (in protobuf wire format).
955
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
956
+ * @return {!proto.CreateCommodityRequest}
957
+ */
958
+ proto.CreateCommodityRequest.deserializeBinary = function(bytes) {
959
+ var reader = new jspb.BinaryReader(bytes);
960
+ var msg = new proto.CreateCommodityRequest;
961
+ return proto.CreateCommodityRequest.deserializeBinaryFromReader(msg, reader);
962
+ };
963
+
964
+
965
+ /**
966
+ * Deserializes binary data (in protobuf wire format) from the
967
+ * given reader into the given message object.
968
+ * @param {!proto.CreateCommodityRequest} msg The message object to deserialize into.
969
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
970
+ * @return {!proto.CreateCommodityRequest}
971
+ */
972
+ proto.CreateCommodityRequest.deserializeBinaryFromReader = function(msg, reader) {
973
+ while (reader.nextField()) {
974
+ if (reader.isEndGroup()) {
975
+ break;
976
+ }
977
+ var field = reader.getFieldNumber();
978
+ switch (field) {
979
+ case 1:
980
+ var value = new proto.BaseCommodity;
981
+ reader.readMessage(value,proto.BaseCommodity.deserializeBinaryFromReader);
982
+ msg.setCommodity(value);
983
+ break;
984
+ default:
985
+ reader.skipField();
986
+ break;
987
+ }
988
+ }
989
+ return msg;
990
+ };
991
+
992
+
993
+ /**
994
+ * Serializes the message to binary data (in protobuf wire format).
995
+ * @return {!Uint8Array}
996
+ */
997
+ proto.CreateCommodityRequest.prototype.serializeBinary = function() {
998
+ var writer = new jspb.BinaryWriter();
999
+ proto.CreateCommodityRequest.serializeBinaryToWriter(this, writer);
1000
+ return writer.getResultBuffer();
1001
+ };
1002
+
1003
+
1004
+ /**
1005
+ * Serializes the given message to binary data (in protobuf wire
1006
+ * format), writing to the given BinaryWriter.
1007
+ * @param {!proto.CreateCommodityRequest} message
1008
+ * @param {!jspb.BinaryWriter} writer
1009
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1010
+ */
1011
+ proto.CreateCommodityRequest.serializeBinaryToWriter = function(message, writer) {
1012
+ var f = undefined;
1013
+ f = message.getCommodity();
1014
+ if (f != null) {
1015
+ writer.writeMessage(
1016
+ 1,
1017
+ f,
1018
+ proto.BaseCommodity.serializeBinaryToWriter
1019
+ );
1020
+ }
1021
+ };
1022
+
1023
+
1024
+ /**
1025
+ * optional BaseCommodity Commodity = 1;
1026
+ * @return {?proto.BaseCommodity}
1027
+ */
1028
+ proto.CreateCommodityRequest.prototype.getCommodity = function() {
1029
+ return /** @type{?proto.BaseCommodity} */ (
1030
+ jspb.Message.getWrapperField(this, proto.BaseCommodity, 1));
1031
+ };
1032
+
1033
+
1034
+ /**
1035
+ * @param {?proto.BaseCommodity|undefined} value
1036
+ * @return {!proto.CreateCommodityRequest} returns this
1037
+ */
1038
+ proto.CreateCommodityRequest.prototype.setCommodity = function(value) {
1039
+ return jspb.Message.setWrapperField(this, 1, value);
1040
+ };
1041
+
1042
+
1043
+ /**
1044
+ * Clears the message field making it undefined.
1045
+ * @return {!proto.CreateCommodityRequest} returns this
1046
+ */
1047
+ proto.CreateCommodityRequest.prototype.clearCommodity = function() {
1048
+ return this.setCommodity(undefined);
1049
+ };
1050
+
1051
+
1052
+ /**
1053
+ * Returns whether this field is set.
1054
+ * @return {boolean}
1055
+ */
1056
+ proto.CreateCommodityRequest.prototype.hasCommodity = function() {
1057
+ return jspb.Message.getField(this, 1) != null;
1058
+ };
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1065
+ /**
1066
+ * Creates an object representation of this proto.
1067
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1068
+ * Optional fields that are not set will be set to undefined.
1069
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1070
+ * For the list of reserved names please see:
1071
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1072
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1073
+ * JSPB instance for transitional soy proto support:
1074
+ * http://goto/soy-param-migration
1075
+ * @return {!Object}
1076
+ */
1077
+ proto.UpdateCommodityRequest.prototype.toObject = function(opt_includeInstance) {
1078
+ return proto.UpdateCommodityRequest.toObject(opt_includeInstance, this);
1079
+ };
1080
+
1081
+
1082
+ /**
1083
+ * Static version of the {@see toObject} method.
1084
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1085
+ * the JSPB instance for transitional soy proto support:
1086
+ * http://goto/soy-param-migration
1087
+ * @param {!proto.UpdateCommodityRequest} msg The msg instance to transform.
1088
+ * @return {!Object}
1089
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1090
+ */
1091
+ proto.UpdateCommodityRequest.toObject = function(includeInstance, msg) {
1092
+ var f, obj = {
1093
+ commodity: (f = msg.getCommodity()) && proto.Commodity.toObject(includeInstance, f)
1094
+ };
1095
+
1096
+ if (includeInstance) {
1097
+ obj.$jspbMessageInstance = msg;
1098
+ }
1099
+ return obj;
1100
+ };
1101
+ }
1102
+
1103
+
1104
+ /**
1105
+ * Deserializes binary data (in protobuf wire format).
1106
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1107
+ * @return {!proto.UpdateCommodityRequest}
1108
+ */
1109
+ proto.UpdateCommodityRequest.deserializeBinary = function(bytes) {
1110
+ var reader = new jspb.BinaryReader(bytes);
1111
+ var msg = new proto.UpdateCommodityRequest;
1112
+ return proto.UpdateCommodityRequest.deserializeBinaryFromReader(msg, reader);
1113
+ };
1114
+
1115
+
1116
+ /**
1117
+ * Deserializes binary data (in protobuf wire format) from the
1118
+ * given reader into the given message object.
1119
+ * @param {!proto.UpdateCommodityRequest} msg The message object to deserialize into.
1120
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1121
+ * @return {!proto.UpdateCommodityRequest}
1122
+ */
1123
+ proto.UpdateCommodityRequest.deserializeBinaryFromReader = function(msg, reader) {
1124
+ while (reader.nextField()) {
1125
+ if (reader.isEndGroup()) {
1126
+ break;
1127
+ }
1128
+ var field = reader.getFieldNumber();
1129
+ switch (field) {
1130
+ case 2:
1131
+ var value = new proto.Commodity;
1132
+ reader.readMessage(value,proto.Commodity.deserializeBinaryFromReader);
1133
+ msg.setCommodity(value);
1134
+ break;
1135
+ default:
1136
+ reader.skipField();
1137
+ break;
1138
+ }
1139
+ }
1140
+ return msg;
1141
+ };
1142
+
1143
+
1144
+ /**
1145
+ * Serializes the message to binary data (in protobuf wire format).
1146
+ * @return {!Uint8Array}
1147
+ */
1148
+ proto.UpdateCommodityRequest.prototype.serializeBinary = function() {
1149
+ var writer = new jspb.BinaryWriter();
1150
+ proto.UpdateCommodityRequest.serializeBinaryToWriter(this, writer);
1151
+ return writer.getResultBuffer();
1152
+ };
1153
+
1154
+
1155
+ /**
1156
+ * Serializes the given message to binary data (in protobuf wire
1157
+ * format), writing to the given BinaryWriter.
1158
+ * @param {!proto.UpdateCommodityRequest} message
1159
+ * @param {!jspb.BinaryWriter} writer
1160
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1161
+ */
1162
+ proto.UpdateCommodityRequest.serializeBinaryToWriter = function(message, writer) {
1163
+ var f = undefined;
1164
+ f = message.getCommodity();
1165
+ if (f != null) {
1166
+ writer.writeMessage(
1167
+ 2,
1168
+ f,
1169
+ proto.Commodity.serializeBinaryToWriter
1170
+ );
1171
+ }
1172
+ };
1173
+
1174
+
1175
+ /**
1176
+ * optional Commodity Commodity = 2;
1177
+ * @return {?proto.Commodity}
1178
+ */
1179
+ proto.UpdateCommodityRequest.prototype.getCommodity = function() {
1180
+ return /** @type{?proto.Commodity} */ (
1181
+ jspb.Message.getWrapperField(this, proto.Commodity, 2));
1182
+ };
1183
+
1184
+
1185
+ /**
1186
+ * @param {?proto.Commodity|undefined} value
1187
+ * @return {!proto.UpdateCommodityRequest} returns this
1188
+ */
1189
+ proto.UpdateCommodityRequest.prototype.setCommodity = function(value) {
1190
+ return jspb.Message.setWrapperField(this, 2, value);
1191
+ };
1192
+
1193
+
1194
+ /**
1195
+ * Clears the message field making it undefined.
1196
+ * @return {!proto.UpdateCommodityRequest} returns this
1197
+ */
1198
+ proto.UpdateCommodityRequest.prototype.clearCommodity = function() {
1199
+ return this.setCommodity(undefined);
1200
+ };
1201
+
1202
+
1203
+ /**
1204
+ * Returns whether this field is set.
1205
+ * @return {boolean}
1206
+ */
1207
+ proto.UpdateCommodityRequest.prototype.hasCommodity = function() {
1208
+ return jspb.Message.getField(this, 2) != null;
1209
+ };
1210
+
1211
+
1212
+
1213
+ /**
1214
+ * List of repeated fields within this message type.
1215
+ * @private {!Array<number>}
1216
+ * @const
1217
+ */
1218
+ proto.DeleteCommodityRequest.repeatedFields_ = [1];
1219
+
1220
+
1221
+
1222
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1223
+ /**
1224
+ * Creates an object representation of this proto.
1225
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1226
+ * Optional fields that are not set will be set to undefined.
1227
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1228
+ * For the list of reserved names please see:
1229
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1230
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1231
+ * JSPB instance for transitional soy proto support:
1232
+ * http://goto/soy-param-migration
1233
+ * @return {!Object}
1234
+ */
1235
+ proto.DeleteCommodityRequest.prototype.toObject = function(opt_includeInstance) {
1236
+ return proto.DeleteCommodityRequest.toObject(opt_includeInstance, this);
1237
+ };
1238
+
1239
+
1240
+ /**
1241
+ * Static version of the {@see toObject} method.
1242
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1243
+ * the JSPB instance for transitional soy proto support:
1244
+ * http://goto/soy-param-migration
1245
+ * @param {!proto.DeleteCommodityRequest} msg The msg instance to transform.
1246
+ * @return {!Object}
1247
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1248
+ */
1249
+ proto.DeleteCommodityRequest.toObject = function(includeInstance, msg) {
1250
+ var f, obj = {
1251
+ referenceIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
1252
+ };
1253
+
1254
+ if (includeInstance) {
1255
+ obj.$jspbMessageInstance = msg;
1256
+ }
1257
+ return obj;
1258
+ };
1259
+ }
1260
+
1261
+
1262
+ /**
1263
+ * Deserializes binary data (in protobuf wire format).
1264
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1265
+ * @return {!proto.DeleteCommodityRequest}
1266
+ */
1267
+ proto.DeleteCommodityRequest.deserializeBinary = function(bytes) {
1268
+ var reader = new jspb.BinaryReader(bytes);
1269
+ var msg = new proto.DeleteCommodityRequest;
1270
+ return proto.DeleteCommodityRequest.deserializeBinaryFromReader(msg, reader);
1271
+ };
1272
+
1273
+
1274
+ /**
1275
+ * Deserializes binary data (in protobuf wire format) from the
1276
+ * given reader into the given message object.
1277
+ * @param {!proto.DeleteCommodityRequest} msg The message object to deserialize into.
1278
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1279
+ * @return {!proto.DeleteCommodityRequest}
1280
+ */
1281
+ proto.DeleteCommodityRequest.deserializeBinaryFromReader = function(msg, reader) {
1282
+ while (reader.nextField()) {
1283
+ if (reader.isEndGroup()) {
1284
+ break;
1285
+ }
1286
+ var field = reader.getFieldNumber();
1287
+ switch (field) {
1288
+ case 1:
1289
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1290
+ msg.addReferenceIds(value);
1291
+ break;
1292
+ default:
1293
+ reader.skipField();
1294
+ break;
1295
+ }
1296
+ }
1297
+ return msg;
1298
+ };
1299
+
1300
+
1301
+ /**
1302
+ * Serializes the message to binary data (in protobuf wire format).
1303
+ * @return {!Uint8Array}
1304
+ */
1305
+ proto.DeleteCommodityRequest.prototype.serializeBinary = function() {
1306
+ var writer = new jspb.BinaryWriter();
1307
+ proto.DeleteCommodityRequest.serializeBinaryToWriter(this, writer);
1308
+ return writer.getResultBuffer();
1309
+ };
1310
+
1311
+
1312
+ /**
1313
+ * Serializes the given message to binary data (in protobuf wire
1314
+ * format), writing to the given BinaryWriter.
1315
+ * @param {!proto.DeleteCommodityRequest} message
1316
+ * @param {!jspb.BinaryWriter} writer
1317
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1318
+ */
1319
+ proto.DeleteCommodityRequest.serializeBinaryToWriter = function(message, writer) {
1320
+ var f = undefined;
1321
+ f = message.getReferenceIdsList();
1322
+ if (f.length > 0) {
1323
+ writer.writeRepeatedString(
1324
+ 1,
1325
+ f
1326
+ );
1327
+ }
1328
+ };
1329
+
1330
+
1331
+ /**
1332
+ * repeated string reference_ids = 1;
1333
+ * @return {!Array<string>}
1334
+ */
1335
+ proto.DeleteCommodityRequest.prototype.getReferenceIdsList = function() {
1336
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
1337
+ };
1338
+
1339
+
1340
+ /**
1341
+ * @param {!Array<string>} value
1342
+ * @return {!proto.DeleteCommodityRequest} returns this
1343
+ */
1344
+ proto.DeleteCommodityRequest.prototype.setReferenceIdsList = function(value) {
1345
+ return jspb.Message.setField(this, 1, value || []);
1346
+ };
1347
+
1348
+
1349
+ /**
1350
+ * @param {string} value
1351
+ * @param {number=} opt_index
1352
+ * @return {!proto.DeleteCommodityRequest} returns this
1353
+ */
1354
+ proto.DeleteCommodityRequest.prototype.addReferenceIds = function(value, opt_index) {
1355
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
1356
+ };
1357
+
1358
+
1359
+ /**
1360
+ * Clears the list making it empty but non-null.
1361
+ * @return {!proto.DeleteCommodityRequest} returns this
1362
+ */
1363
+ proto.DeleteCommodityRequest.prototype.clearReferenceIdsList = function() {
1364
+ return this.setReferenceIdsList([]);
1365
+ };
1366
+
1367
+
1368
+
1369
+ /**
1370
+ * List of repeated fields within this message type.
1371
+ * @private {!Array<number>}
1372
+ * @const
1373
+ */
1374
+ proto.DeleteCommodityResponse.repeatedFields_ = [1];
1375
+
1376
+
1377
+
1378
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1379
+ /**
1380
+ * Creates an object representation of this proto.
1381
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1382
+ * Optional fields that are not set will be set to undefined.
1383
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1384
+ * For the list of reserved names please see:
1385
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1386
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1387
+ * JSPB instance for transitional soy proto support:
1388
+ * http://goto/soy-param-migration
1389
+ * @return {!Object}
1390
+ */
1391
+ proto.DeleteCommodityResponse.prototype.toObject = function(opt_includeInstance) {
1392
+ return proto.DeleteCommodityResponse.toObject(opt_includeInstance, this);
1393
+ };
1394
+
1395
+
1396
+ /**
1397
+ * Static version of the {@see toObject} method.
1398
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1399
+ * the JSPB instance for transitional soy proto support:
1400
+ * http://goto/soy-param-migration
1401
+ * @param {!proto.DeleteCommodityResponse} msg The msg instance to transform.
1402
+ * @return {!Object}
1403
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1404
+ */
1405
+ proto.DeleteCommodityResponse.toObject = function(includeInstance, msg) {
1406
+ var f, obj = {
1407
+ referenceIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
1408
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
1409
+ };
1410
+
1411
+ if (includeInstance) {
1412
+ obj.$jspbMessageInstance = msg;
1413
+ }
1414
+ return obj;
1415
+ };
1416
+ }
1417
+
1418
+
1419
+ /**
1420
+ * Deserializes binary data (in protobuf wire format).
1421
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1422
+ * @return {!proto.DeleteCommodityResponse}
1423
+ */
1424
+ proto.DeleteCommodityResponse.deserializeBinary = function(bytes) {
1425
+ var reader = new jspb.BinaryReader(bytes);
1426
+ var msg = new proto.DeleteCommodityResponse;
1427
+ return proto.DeleteCommodityResponse.deserializeBinaryFromReader(msg, reader);
1428
+ };
1429
+
1430
+
1431
+ /**
1432
+ * Deserializes binary data (in protobuf wire format) from the
1433
+ * given reader into the given message object.
1434
+ * @param {!proto.DeleteCommodityResponse} msg The message object to deserialize into.
1435
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1436
+ * @return {!proto.DeleteCommodityResponse}
1437
+ */
1438
+ proto.DeleteCommodityResponse.deserializeBinaryFromReader = function(msg, reader) {
1439
+ while (reader.nextField()) {
1440
+ if (reader.isEndGroup()) {
1441
+ break;
1442
+ }
1443
+ var field = reader.getFieldNumber();
1444
+ switch (field) {
1445
+ case 1:
1446
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1447
+ msg.addReferenceIds(value);
1448
+ break;
1449
+ case 2:
1450
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
1451
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
1452
+ msg.setMeta(value);
1453
+ break;
1454
+ default:
1455
+ reader.skipField();
1456
+ break;
1457
+ }
1458
+ }
1459
+ return msg;
1460
+ };
1461
+
1462
+
1463
+ /**
1464
+ * Serializes the message to binary data (in protobuf wire format).
1465
+ * @return {!Uint8Array}
1466
+ */
1467
+ proto.DeleteCommodityResponse.prototype.serializeBinary = function() {
1468
+ var writer = new jspb.BinaryWriter();
1469
+ proto.DeleteCommodityResponse.serializeBinaryToWriter(this, writer);
1470
+ return writer.getResultBuffer();
1471
+ };
1472
+
1473
+
1474
+ /**
1475
+ * Serializes the given message to binary data (in protobuf wire
1476
+ * format), writing to the given BinaryWriter.
1477
+ * @param {!proto.DeleteCommodityResponse} message
1478
+ * @param {!jspb.BinaryWriter} writer
1479
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1480
+ */
1481
+ proto.DeleteCommodityResponse.serializeBinaryToWriter = function(message, writer) {
1482
+ var f = undefined;
1483
+ f = message.getReferenceIdsList();
1484
+ if (f.length > 0) {
1485
+ writer.writeRepeatedString(
1486
+ 1,
1487
+ f
1488
+ );
1489
+ }
1490
+ f = message.getMeta();
1491
+ if (f != null) {
1492
+ writer.writeMessage(
1493
+ 2,
1494
+ f,
1495
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
1496
+ );
1497
+ }
1498
+ };
1499
+
1500
+
1501
+ /**
1502
+ * repeated string reference_ids = 1;
1503
+ * @return {!Array<string>}
1504
+ */
1505
+ proto.DeleteCommodityResponse.prototype.getReferenceIdsList = function() {
1506
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
1507
+ };
1508
+
1509
+
1510
+ /**
1511
+ * @param {!Array<string>} value
1512
+ * @return {!proto.DeleteCommodityResponse} returns this
1513
+ */
1514
+ proto.DeleteCommodityResponse.prototype.setReferenceIdsList = function(value) {
1515
+ return jspb.Message.setField(this, 1, value || []);
1516
+ };
1517
+
1518
+
1519
+ /**
1520
+ * @param {string} value
1521
+ * @param {number=} opt_index
1522
+ * @return {!proto.DeleteCommodityResponse} returns this
1523
+ */
1524
+ proto.DeleteCommodityResponse.prototype.addReferenceIds = function(value, opt_index) {
1525
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
1526
+ };
1527
+
1528
+
1529
+ /**
1530
+ * Clears the list making it empty but non-null.
1531
+ * @return {!proto.DeleteCommodityResponse} returns this
1532
+ */
1533
+ proto.DeleteCommodityResponse.prototype.clearReferenceIdsList = function() {
1534
+ return this.setReferenceIdsList([]);
1535
+ };
1536
+
1537
+
1538
+ /**
1539
+ * optional prisca.v1.global.meta.Meta meta = 2;
1540
+ * @return {?proto.prisca.v1.global.meta.Meta}
1541
+ */
1542
+ proto.DeleteCommodityResponse.prototype.getMeta = function() {
1543
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
1544
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
1545
+ };
1546
+
1547
+
1548
+ /**
1549
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
1550
+ * @return {!proto.DeleteCommodityResponse} returns this
1551
+ */
1552
+ proto.DeleteCommodityResponse.prototype.setMeta = function(value) {
1553
+ return jspb.Message.setWrapperField(this, 2, value);
1554
+ };
1555
+
1556
+
1557
+ /**
1558
+ * Clears the message field making it undefined.
1559
+ * @return {!proto.DeleteCommodityResponse} returns this
1560
+ */
1561
+ proto.DeleteCommodityResponse.prototype.clearMeta = function() {
1562
+ return this.setMeta(undefined);
1563
+ };
1564
+
1565
+
1566
+ /**
1567
+ * Returns whether this field is set.
1568
+ * @return {boolean}
1569
+ */
1570
+ proto.DeleteCommodityResponse.prototype.hasMeta = function() {
1571
+ return jspb.Message.getField(this, 2) != null;
1572
+ };
1573
+
1574
+
1575
+
1576
+
1577
+
1578
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1579
+ /**
1580
+ * Creates an object representation of this proto.
1581
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1582
+ * Optional fields that are not set will be set to undefined.
1583
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1584
+ * For the list of reserved names please see:
1585
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1586
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1587
+ * JSPB instance for transitional soy proto support:
1588
+ * http://goto/soy-param-migration
1589
+ * @return {!Object}
1590
+ */
1591
+ proto.GetListCommodityRequest.prototype.toObject = function(opt_includeInstance) {
1592
+ return proto.GetListCommodityRequest.toObject(opt_includeInstance, this);
1593
+ };
1594
+
1595
+
1596
+ /**
1597
+ * Static version of the {@see toObject} method.
1598
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1599
+ * the JSPB instance for transitional soy proto support:
1600
+ * http://goto/soy-param-migration
1601
+ * @param {!proto.GetListCommodityRequest} msg The msg instance to transform.
1602
+ * @return {!Object}
1603
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1604
+ */
1605
+ proto.GetListCommodityRequest.toObject = function(includeInstance, msg) {
1606
+ var f, obj = {
1607
+ pagination: (f = msg.getPagination()) && prisca_v1_global_meta_meta_pb.PaginationRequest.toObject(includeInstance, f),
1608
+ query: (f = msg.getQuery()) && prisca_v1_global_meta_meta_pb.FilterRequest.toObject(includeInstance, f)
1609
+ };
1610
+
1611
+ if (includeInstance) {
1612
+ obj.$jspbMessageInstance = msg;
1613
+ }
1614
+ return obj;
1615
+ };
1616
+ }
1617
+
1618
+
1619
+ /**
1620
+ * Deserializes binary data (in protobuf wire format).
1621
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1622
+ * @return {!proto.GetListCommodityRequest}
1623
+ */
1624
+ proto.GetListCommodityRequest.deserializeBinary = function(bytes) {
1625
+ var reader = new jspb.BinaryReader(bytes);
1626
+ var msg = new proto.GetListCommodityRequest;
1627
+ return proto.GetListCommodityRequest.deserializeBinaryFromReader(msg, reader);
1628
+ };
1629
+
1630
+
1631
+ /**
1632
+ * Deserializes binary data (in protobuf wire format) from the
1633
+ * given reader into the given message object.
1634
+ * @param {!proto.GetListCommodityRequest} msg The message object to deserialize into.
1635
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1636
+ * @return {!proto.GetListCommodityRequest}
1637
+ */
1638
+ proto.GetListCommodityRequest.deserializeBinaryFromReader = function(msg, reader) {
1639
+ while (reader.nextField()) {
1640
+ if (reader.isEndGroup()) {
1641
+ break;
1642
+ }
1643
+ var field = reader.getFieldNumber();
1644
+ switch (field) {
1645
+ case 1:
1646
+ var value = new prisca_v1_global_meta_meta_pb.PaginationRequest;
1647
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.PaginationRequest.deserializeBinaryFromReader);
1648
+ msg.setPagination(value);
1649
+ break;
1650
+ case 2:
1651
+ var value = new prisca_v1_global_meta_meta_pb.FilterRequest;
1652
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.FilterRequest.deserializeBinaryFromReader);
1653
+ msg.setQuery(value);
1654
+ break;
1655
+ default:
1656
+ reader.skipField();
1657
+ break;
1658
+ }
1659
+ }
1660
+ return msg;
1661
+ };
1662
+
1663
+
1664
+ /**
1665
+ * Serializes the message to binary data (in protobuf wire format).
1666
+ * @return {!Uint8Array}
1667
+ */
1668
+ proto.GetListCommodityRequest.prototype.serializeBinary = function() {
1669
+ var writer = new jspb.BinaryWriter();
1670
+ proto.GetListCommodityRequest.serializeBinaryToWriter(this, writer);
1671
+ return writer.getResultBuffer();
1672
+ };
1673
+
1674
+
1675
+ /**
1676
+ * Serializes the given message to binary data (in protobuf wire
1677
+ * format), writing to the given BinaryWriter.
1678
+ * @param {!proto.GetListCommodityRequest} message
1679
+ * @param {!jspb.BinaryWriter} writer
1680
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1681
+ */
1682
+ proto.GetListCommodityRequest.serializeBinaryToWriter = function(message, writer) {
1683
+ var f = undefined;
1684
+ f = message.getPagination();
1685
+ if (f != null) {
1686
+ writer.writeMessage(
1687
+ 1,
1688
+ f,
1689
+ prisca_v1_global_meta_meta_pb.PaginationRequest.serializeBinaryToWriter
1690
+ );
1691
+ }
1692
+ f = message.getQuery();
1693
+ if (f != null) {
1694
+ writer.writeMessage(
1695
+ 2,
1696
+ f,
1697
+ prisca_v1_global_meta_meta_pb.FilterRequest.serializeBinaryToWriter
1698
+ );
1699
+ }
1700
+ };
1701
+
1702
+
1703
+ /**
1704
+ * optional prisca.v1.global.meta.PaginationRequest pagination = 1;
1705
+ * @return {?proto.prisca.v1.global.meta.PaginationRequest}
1706
+ */
1707
+ proto.GetListCommodityRequest.prototype.getPagination = function() {
1708
+ return /** @type{?proto.prisca.v1.global.meta.PaginationRequest} */ (
1709
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.PaginationRequest, 1));
1710
+ };
1711
+
1712
+
1713
+ /**
1714
+ * @param {?proto.prisca.v1.global.meta.PaginationRequest|undefined} value
1715
+ * @return {!proto.GetListCommodityRequest} returns this
1716
+ */
1717
+ proto.GetListCommodityRequest.prototype.setPagination = function(value) {
1718
+ return jspb.Message.setWrapperField(this, 1, value);
1719
+ };
1720
+
1721
+
1722
+ /**
1723
+ * Clears the message field making it undefined.
1724
+ * @return {!proto.GetListCommodityRequest} returns this
1725
+ */
1726
+ proto.GetListCommodityRequest.prototype.clearPagination = function() {
1727
+ return this.setPagination(undefined);
1728
+ };
1729
+
1730
+
1731
+ /**
1732
+ * Returns whether this field is set.
1733
+ * @return {boolean}
1734
+ */
1735
+ proto.GetListCommodityRequest.prototype.hasPagination = function() {
1736
+ return jspb.Message.getField(this, 1) != null;
1737
+ };
1738
+
1739
+
1740
+ /**
1741
+ * optional prisca.v1.global.meta.FilterRequest query = 2;
1742
+ * @return {?proto.prisca.v1.global.meta.FilterRequest}
1743
+ */
1744
+ proto.GetListCommodityRequest.prototype.getQuery = function() {
1745
+ return /** @type{?proto.prisca.v1.global.meta.FilterRequest} */ (
1746
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.FilterRequest, 2));
1747
+ };
1748
+
1749
+
1750
+ /**
1751
+ * @param {?proto.prisca.v1.global.meta.FilterRequest|undefined} value
1752
+ * @return {!proto.GetListCommodityRequest} returns this
1753
+ */
1754
+ proto.GetListCommodityRequest.prototype.setQuery = function(value) {
1755
+ return jspb.Message.setWrapperField(this, 2, value);
1756
+ };
1757
+
1758
+
1759
+ /**
1760
+ * Clears the message field making it undefined.
1761
+ * @return {!proto.GetListCommodityRequest} returns this
1762
+ */
1763
+ proto.GetListCommodityRequest.prototype.clearQuery = function() {
1764
+ return this.setQuery(undefined);
1765
+ };
1766
+
1767
+
1768
+ /**
1769
+ * Returns whether this field is set.
1770
+ * @return {boolean}
1771
+ */
1772
+ proto.GetListCommodityRequest.prototype.hasQuery = function() {
1773
+ return jspb.Message.getField(this, 2) != null;
1774
+ };
1775
+
1776
+
1777
+
1778
+ /**
1779
+ * List of repeated fields within this message type.
1780
+ * @private {!Array<number>}
1781
+ * @const
1782
+ */
1783
+ proto.GetListCommodityResponse.repeatedFields_ = [1];
1784
+
1785
+
1786
+
1787
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1788
+ /**
1789
+ * Creates an object representation of this proto.
1790
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1791
+ * Optional fields that are not set will be set to undefined.
1792
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1793
+ * For the list of reserved names please see:
1794
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1795
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1796
+ * JSPB instance for transitional soy proto support:
1797
+ * http://goto/soy-param-migration
1798
+ * @return {!Object}
1799
+ */
1800
+ proto.GetListCommodityResponse.prototype.toObject = function(opt_includeInstance) {
1801
+ return proto.GetListCommodityResponse.toObject(opt_includeInstance, this);
1802
+ };
1803
+
1804
+
1805
+ /**
1806
+ * Static version of the {@see toObject} method.
1807
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1808
+ * the JSPB instance for transitional soy proto support:
1809
+ * http://goto/soy-param-migration
1810
+ * @param {!proto.GetListCommodityResponse} msg The msg instance to transform.
1811
+ * @return {!Object}
1812
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1813
+ */
1814
+ proto.GetListCommodityResponse.toObject = function(includeInstance, msg) {
1815
+ var f, obj = {
1816
+ commodityList: jspb.Message.toObjectList(msg.getCommodityList(),
1817
+ proto.Commodity.toObject, includeInstance),
1818
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
1819
+ };
1820
+
1821
+ if (includeInstance) {
1822
+ obj.$jspbMessageInstance = msg;
1823
+ }
1824
+ return obj;
1825
+ };
1826
+ }
1827
+
1828
+
1829
+ /**
1830
+ * Deserializes binary data (in protobuf wire format).
1831
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1832
+ * @return {!proto.GetListCommodityResponse}
1833
+ */
1834
+ proto.GetListCommodityResponse.deserializeBinary = function(bytes) {
1835
+ var reader = new jspb.BinaryReader(bytes);
1836
+ var msg = new proto.GetListCommodityResponse;
1837
+ return proto.GetListCommodityResponse.deserializeBinaryFromReader(msg, reader);
1838
+ };
1839
+
1840
+
1841
+ /**
1842
+ * Deserializes binary data (in protobuf wire format) from the
1843
+ * given reader into the given message object.
1844
+ * @param {!proto.GetListCommodityResponse} msg The message object to deserialize into.
1845
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1846
+ * @return {!proto.GetListCommodityResponse}
1847
+ */
1848
+ proto.GetListCommodityResponse.deserializeBinaryFromReader = function(msg, reader) {
1849
+ while (reader.nextField()) {
1850
+ if (reader.isEndGroup()) {
1851
+ break;
1852
+ }
1853
+ var field = reader.getFieldNumber();
1854
+ switch (field) {
1855
+ case 1:
1856
+ var value = new proto.Commodity;
1857
+ reader.readMessage(value,proto.Commodity.deserializeBinaryFromReader);
1858
+ msg.addCommodity(value);
1859
+ break;
1860
+ case 2:
1861
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
1862
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
1863
+ msg.setMeta(value);
1864
+ break;
1865
+ default:
1866
+ reader.skipField();
1867
+ break;
1868
+ }
1869
+ }
1870
+ return msg;
1871
+ };
1872
+
1873
+
1874
+ /**
1875
+ * Serializes the message to binary data (in protobuf wire format).
1876
+ * @return {!Uint8Array}
1877
+ */
1878
+ proto.GetListCommodityResponse.prototype.serializeBinary = function() {
1879
+ var writer = new jspb.BinaryWriter();
1880
+ proto.GetListCommodityResponse.serializeBinaryToWriter(this, writer);
1881
+ return writer.getResultBuffer();
1882
+ };
1883
+
1884
+
1885
+ /**
1886
+ * Serializes the given message to binary data (in protobuf wire
1887
+ * format), writing to the given BinaryWriter.
1888
+ * @param {!proto.GetListCommodityResponse} message
1889
+ * @param {!jspb.BinaryWriter} writer
1890
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1891
+ */
1892
+ proto.GetListCommodityResponse.serializeBinaryToWriter = function(message, writer) {
1893
+ var f = undefined;
1894
+ f = message.getCommodityList();
1895
+ if (f.length > 0) {
1896
+ writer.writeRepeatedMessage(
1897
+ 1,
1898
+ f,
1899
+ proto.Commodity.serializeBinaryToWriter
1900
+ );
1901
+ }
1902
+ f = message.getMeta();
1903
+ if (f != null) {
1904
+ writer.writeMessage(
1905
+ 2,
1906
+ f,
1907
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
1908
+ );
1909
+ }
1910
+ };
1911
+
1912
+
1913
+ /**
1914
+ * repeated Commodity Commodity = 1;
1915
+ * @return {!Array<!proto.Commodity>}
1916
+ */
1917
+ proto.GetListCommodityResponse.prototype.getCommodityList = function() {
1918
+ return /** @type{!Array<!proto.Commodity>} */ (
1919
+ jspb.Message.getRepeatedWrapperField(this, proto.Commodity, 1));
1920
+ };
1921
+
1922
+
1923
+ /**
1924
+ * @param {!Array<!proto.Commodity>} value
1925
+ * @return {!proto.GetListCommodityResponse} returns this
1926
+ */
1927
+ proto.GetListCommodityResponse.prototype.setCommodityList = function(value) {
1928
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1929
+ };
1930
+
1931
+
1932
+ /**
1933
+ * @param {!proto.Commodity=} opt_value
1934
+ * @param {number=} opt_index
1935
+ * @return {!proto.Commodity}
1936
+ */
1937
+ proto.GetListCommodityResponse.prototype.addCommodity = function(opt_value, opt_index) {
1938
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.Commodity, opt_index);
1939
+ };
1940
+
1941
+
1942
+ /**
1943
+ * Clears the list making it empty but non-null.
1944
+ * @return {!proto.GetListCommodityResponse} returns this
1945
+ */
1946
+ proto.GetListCommodityResponse.prototype.clearCommodityList = function() {
1947
+ return this.setCommodityList([]);
1948
+ };
1949
+
1950
+
1951
+ /**
1952
+ * optional prisca.v1.global.meta.Meta meta = 2;
1953
+ * @return {?proto.prisca.v1.global.meta.Meta}
1954
+ */
1955
+ proto.GetListCommodityResponse.prototype.getMeta = function() {
1956
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
1957
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
1958
+ };
1959
+
1960
+
1961
+ /**
1962
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
1963
+ * @return {!proto.GetListCommodityResponse} returns this
1964
+ */
1965
+ proto.GetListCommodityResponse.prototype.setMeta = function(value) {
1966
+ return jspb.Message.setWrapperField(this, 2, value);
1967
+ };
1968
+
1969
+
1970
+ /**
1971
+ * Clears the message field making it undefined.
1972
+ * @return {!proto.GetListCommodityResponse} returns this
1973
+ */
1974
+ proto.GetListCommodityResponse.prototype.clearMeta = function() {
1975
+ return this.setMeta(undefined);
1976
+ };
1977
+
1978
+
1979
+ /**
1980
+ * Returns whether this field is set.
1981
+ * @return {boolean}
1982
+ */
1983
+ proto.GetListCommodityResponse.prototype.hasMeta = function() {
1984
+ return jspb.Message.getField(this, 2) != null;
1985
+ };
1986
+
1987
+
1988
+ goog.object.extend(exports, proto);